Files
Illustrations/web/templates/entry_view.html
T

100 lines
3.7 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends "base.html" %}
{% load static %}
{% block content %}
<div class="container">
<!-- Top toolbar: back to search + pager + actions -->
<div class="toolbar">
<div class="toolbar-left">
<a class="btn btn-secondary" href="{% url 'search' %}">← Back to Search</a>
{% if count %}
<span class="toolbar-count">{{ position }} of {{ count }}</span>
{% endif %}
</div>
<div class="toolbar-right">
<form method="get" action="{% url 'nav_prev' %}" class="inline">
<input type="hidden" name="i" value="{{ position|add:'-2' }}">
<button class="btn" {% if position <= 1 %}disabled{% endif %}> Prev</button>
</form>
<form method="get" action="{% url 'nav_next' %}" class="inline">
<input type="hidden" name="i" value="{{ position|add:'0' }}">
<button class="btn" {% if position >= count %}disabled{% endif %}>Next </button>
</form>
{% if user.is_authenticated and user.is_staff %}
<a class="btn btn-primary" href="{% url 'entry_edit' entry.id %}">Unlock / Edit</a>
<a class="btn btn-danger" href="{% url 'entry_delete' entry.id %}">Delete</a>
{% endif %}
</div>
</div>
<!-- Entry card -->
<div class="card">
<div class="card-header">
<h1 class="card-title">
{% if entry.talk_title %}{{ entry.talk_title }}{% else %}Untitled{% endif %}
</h1>
<div class="meta">
{% if entry.talk_number %}<span class="chip">Talk #{{ entry.talk_number }}</span>{% endif %}
{% if entry.entry_code %}<span class="chip chip-muted">Code: {{ entry.entry_code }}</span>{% endif %}
{% if entry.date_added %}<span class="chip chip-muted">Added: {{ entry.date_added }}</span>{% endif %}
{% if entry.date_edited %}<span class="chip chip-muted">Edited: {{ entry.date_edited }}</span>{% endif %}
</div>
</div>
<div class="card-body grid-2">
<div class="field">
<div class="label">Subject</div>
<div class="value">
{% if subject_list %}
{% for s in subject_list %}<span class="chip">{{ s }}</span>{% endfor %}
{% else %}
<span class="muted"></span>
{% endif %}
</div>
</div>
<div class="field">
<div class="label">Source</div>
<div class="value">{{ entry.source|default:"—" }}</div>
</div>
<div class="field col-span-2">
<div class="label">Illustration</div>
<div class="value prose">{{ entry.illustration|linebreaksbr|default:"—" }}</div>
</div>
<div class="field col-span-2">
<div class="label">Application</div>
<div class="value prose">{{ entry.application|linebreaksbr|default:"—" }}</div>
</div>
<div class="field col-span-2">
<div class="label">Scripture</div>
<div class="value">
{% if scripture_list %}
{% for sc in scripture_list %}<span class="chip chip-link">{{ sc }}</span>{% endfor %}
{% else %}
<span class="muted"></span>
{% endif %}
</div>
</div>
</div>
</div>
<!-- Bottom pager (mobile friendly) -->
<div class="pager">
<form method="get" action="{% url 'nav_prev' %}" class="inline">
<input type="hidden" name="i" value="{{ position|add:'-2' }}">
<button class="btn btn-wide" {% if position <= 1 %}disabled{% endif %}> Prev</button>
</form>
<div class="pager-spacer">{{ position }} / {{ count }}</div>
<form method="get" action="{% url 'nav_next' %}" class="inline">
<input type="hidden" name="i" value="{{ position|add:'0' }}">
<button class="btn btn-wide" {% if position >= count %}disabled{% endif %}>Next </button>
</form>
</div>
</div>
{% endblock %}