/
entry_detail.html
55 lines (43 loc) · 2.44 KB
/
entry_detail.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{% extends "base.html" %}
{# http://stackoverflow.com/a/3410813 #}
{% block tags %}{% for tag in object.tags.all %}{{ tag.name }}{% if forloop.last %}{% else %}, {% endif %}{% endfor %}{% endblock tags %}
{% block headtitle %}
{% if object.kind == "L" %}Hypertexthero Linked List:{% else %} {# otherwise it is an original article #}Hypertexthero:
{% endif %} {{ object.title }}
{% endblock headtitle %}
{% block description %}{% if object.kind == "L" %}Hypertexthero Linked List: {% else %} {# otherwise it is an original article #}Hypertexthero: {% endif %}{{ object.title }}{% endblock %}
{% block bodyid %}logbook{% endblock bodyid %}
{% block bodyclass %}detail{% endblock bodyclass %}
{% block header %}
<p id="homelink"><a href="/" title="Hypertexthero homepage and portfolio.">Home</a></p>
<p class="breadcrumbs"><a href="/" title="Hypertexthero homepage.">Hypertexthero</a> / <a href="/logbook/" title="logbook front page.">Logbook</a> /</p>
{% endblock header %}
{% block content %}
{% if user.is_staff %}
<div class="pull-right">
<a class="edit small monospace" href="/admin/hth/entry/{{ entry.id }}">Edit</a>
</div>
{% endif %}
{% if object.kind == "L" %} {# if a value for linkurl is present in the head of files this is a link to another site #}
<dl>
<dt><a href="{{ object.url }}">{{ object.title }}</a> <a class="plink" title="Permanent link to {{ object.title }}" href="{{ object.get_linked_list_url }}"># {{ object.pub_date|date:"d b Y" }}</a></dt>
<dd>
{{ object.body_html|safe }}
</dd>
</dl>
{% else %} {# otherwise it is an original article #}
<h1><a href="{{ object.get_absolute_url }}" rel="permalink" title="Permanent link to {{ object.title }}.">{{ object.title }}</a></h1>
<p class="quiet"><time pubdate="pubdate">{{ object.pub_date|date:"l, F j Y" }}</time></p>
{{ object.body_html|safe }}
{% endif %} {# end if object.kind == "L" #}
<p class="paging">
{# https://docs.djangoproject.com/en/dev/ref/models/instances/?from=olddocs#django.db.models.Model.get_next_by_FOO #}
{% if object.get_previous_by_pub_date %}
<a rel="prev" href="{{ object.get_previous_by_pub_date.get_absolute_url }}"><i>Previous:</i> <b>{{ object.get_previous_by_pub_date }}</b></a>
{% endif %}
<br>
{% if object.get_next_by_pub_date %}
<a rel="next" href="{{ object.get_next_by_pub_date.get_absolute_url }}"><i>Next:</i> <b>{{ object.get_next_by_pub_date }}</b></a>
{% endif %}
</p>
{% endblock %}