diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/expedition.html | 47 | ||||
-rw-r--r-- | templates/index.html | 12 | ||||
-rw-r--r-- | templates/logbookentry.html | 67 | ||||
-rw-r--r-- | templates/person.html | 36 | ||||
-rw-r--r-- | templates/personindex.html | 36 |
5 files changed, 145 insertions, 53 deletions
diff --git a/templates/expedition.html b/templates/expedition.html new file mode 100644 index 0000000..72fec15 --- /dev/null +++ b/templates/expedition.html @@ -0,0 +1,47 @@ +{% extends "base.html" %} +{% load wiki_markup %} + +{% block title %}Expedition {{expedition.name}}{% endblock %} + +{% block content %} +<h2>{{expedition.name}}: {{expedition.date_from}} - {{expedition.date_to}}</h2> + +<div id="col2"> +<table class="prevnextexpeditions"> +<tr> + <td>{% if expedition_prev %}< < <a href="{% url expedition expedition_prev.year %}">{{expedition_prev.year}}</a>{% endif %}</td> + <td>{% if expedition_next %}> > <a href="{% url expedition expedition_next.year %}">{{expedition_next.year}}</a>{% endif %}</td> +</tr> +</ul> + +<table class="expeditionpersonlist"> +<tr><th>Caver</th><th>From</th><th>To</th></tr> +{% for personexpedition in expedition.personexpedition_set.all %} + <tr> + <td><a href="{% url person personexpedition.person.href%}">{{personexpedition.person}}</a></td> + <td>{{personexpedition.date_from}}</td> + <td>{{personexpedition.date_to}}</td> + </tr> +{% endfor %} +</table> +</div> + +<div id="col1"> +<h3>Logbook entries</h3> +<form action="" method="GET"><input type="submit" name="reload" value="Reload"></form> +<p>debug message: {{message}}</p> + +<table class="expeditionlogbooks"> +<tr><th>Date</th><th>Title</th><th>Author</th><th>Place</th></tr> +{% for logbookentry in logbookentries %} + <tr> + <td>{{logbookentry.date}}</td> + <td><a href="{% url logbookentry logbookentry.id %}">{{logbookentry.title|safe}}</td> + <td><a href="{% url person logbookentry.author.person.href%}">{{logbookentry.author.name}}</a></td> + <td>{{logbookentry.place}}</td> + </tr> +{% endfor %} +</table> +</div> + +{% endblock %} diff --git a/templates/index.html b/templates/index.html index 0a19187..667fa28 100644 --- a/templates/index.html +++ b/templates/index.html @@ -8,9 +8,21 @@ <h2>The unfinished front page</h2>
<p>Some handy links into the less incomplete parts of this webpage</p>
+<h3>{{message}}</h3>
+
<ul>
<li><a href="{% url personindex %}">List osf people</a></li>
<li><a href="/statistics">Statistics of what's loaded in the database</a></li>
</ul>
+<form action="" method="GET"><input type="submit" name="reload" value="Reload"></form>
+
+<ul id="expeditionlist">
+ <li>
+ {% for expedition in expeditions %}
+ <a href="{% url expedition expedition.year %}">{{expedition.name}}</a>
+ {% endfor %}
+ </li>
+</ul>
+
{% endblock %}
diff --git a/templates/logbookentry.html b/templates/logbookentry.html index 2e34ba3..4a0dd61 100644 --- a/templates/logbookentry.html +++ b/templates/logbookentry.html @@ -2,25 +2,52 @@ {% load wiki_markup %}
{% block title %}Logbook {{logbookentry.id}}{% endblock %}
-{% block editLink %}<a href="{{settings.URL_ROOT}}admin/expo/logbookentry/{{logbookentry.id}}">edit </a>{% endblock %}
+
{% block content %}
- <div class="logbookblock">
- <h2>{{logbookentry.title}} - {{logbookentry.date}}</h2>
- <h3>place (to be a link to cave shaped object): <u>{{logbookentry.place}}</u></h3>
- <ul>
- {% for persontrip in logbookentry.persontrip_set.all %}
- <li>
- <a href="/person/{{persontrip.personexpedition.person.id}}">{{persontrip.personexpedition}}</a>
- <a href="{{settings.URL_ROOT}}admin/expo/logbookentry/{{logbookentry.id}}">edit </a>
- {% ifequal persontrip.personexpedition logbookentry.author %}
- (author)
- {% endifequal %}
- {% if persontrip.timeunderground %}
- - T/U {{persontrip.timeunderground}}</p>
- {% endif %}
- </li>
- {% endfor %}
- </ul>
- <div>{{logbookentry.text|wiki_to_html}}</div>
- </div>
+<h2>{{logbookentry.title|safe}}</h2>
+
+<div id="col2">
+<p><a href="{% url expedition logbookentry.expedition.year %}">{{logbookentry.expedition.name}}</a></p>
+<p>place: {{logbookentry.place}}</p>
+
+<table class="cavers">
+<tr><th>Caver</th><th>T/U</th><th>Prev</th><th>Next</th></tr>
+{% for persontrip in logbookentry.persontrip_set.all %}
+<tr>
+ {% ifequal persontrip.person_expedition logbookentry.author %}
+ <td class="author">
+ {% else %}
+ <td>
+ {% endifequal %}
+ <a href="{% url person persontrip.person_expedition.person.href %}">{{persontrip.person_expedition.person}}</a>
+ </td>
+
+ <td>
+ {% if persontrip.timeunderground %}
+ - T/U {{persontrip.timeunderground}}</p>
+ {% endif %}
+ </td>
+
+ <td>
+ {% if persontrip.persontrip_prev %}
+ <a href="{% url logbookentry persontrip.persontrip_prev.logbook_entry.id %}">{{persontrip.persontrip_prev.date}}</a>
+ {% endif %}
+ </td>
+ <td>
+ {% if persontrip.persontrip_next %}
+ <a href="{% url logbookentry persontrip.persontrip_next.logbook_entry.id %}">{{persontrip.persontrip_next.date}}</a>
+ {% endif %}
+ </td>
+</tr>
+{% endfor %}
+</table>
+</div>
+
+<div id="col1">
+<div class="logbookentry">
+<b>{{logbookentry.date}}</b>
+ {{logbookentry.text|wiki_to_html}}</div>
+</div>
+</div>
+
{% endblock %}
diff --git a/templates/person.html b/templates/person.html index ff1fe62..04eae1b 100644 --- a/templates/person.html +++ b/templates/person.html @@ -4,25 +4,25 @@ {% block title %}Person {{person|wiki_to_html_short}}{% endblock %}
{% block content %}
- <div class="personblock"><a href="/person/{{person.id}}">{{person|wiki_to_html_short}}</a>
+<div class="personblock"><a href="{% url person person.href%}">{{person|wiki_to_html_short}}</a>
+<ul>
+{% for personexpedition in person.personexpedition_set.all %}
+ <li>
+ <table><tr><td>
+ {{personexpedition.expedition}}
+ </td><td>
+ <div>
<ul>
- {% for personexpedition in person.personexpedition_set.all %}
- <li>
- <table><tr><td>
- {{personexpedition.expedition}}
- </td><td>
- <div>
- <ul>
- {% for persontrip in personexpedition.persontrip_set.all %}
- <li><a href="/logbookentry/{{persontrip.logbookentry.id}}">{{persontrip.date}}</a>
- ({{persontrip.logbookentry.place|wiki_to_html_short}}) -
- {{persontrip.logbookentry.title|wiki_to_html_short}}</li>
- {% endfor %}
- <ul>
- </div>
- </td></tr></table>
- </li>
+ {% for persontrip in personexpedition.persontrip_set.all %}
+ <li><a href="{% url logbookentry persontrip.logbook_entry.id %}">{{persontrip.date}}</a> {{persontrip.logbookentry}}
+ ({{persontrip.logbookentry.place|wiki_to_html_short}}) -
+ {{persontrip.logbookentry.title|wiki_to_html_short}}</li>
{% endfor %}
- </ul>
+ <ul>
+ </div>
+ </td></tr></table>
+ </li>
+{% endfor %}
+</ul>
</div>
{% endblock %}
diff --git a/templates/personindex.html b/templates/personindex.html index 6d39306..ca8b9b5 100644 --- a/templates/personindex.html +++ b/templates/personindex.html @@ -4,23 +4,29 @@ {% block title %}Person Index{% endblock %}
{% block content %}
+
{% for person in persons %}
- <div class="personblock"><a href="/person/{{person.id}}">{{person|wiki_to_html_short}}</a>
- <ul>
- {% for personexpedition in person.personexpedition_set.all %}
- <li>
- <table><tr><td>
- {{personexpedition.expedition}}
- </td><td>
- <div>
- {% for persontrip in personexpedition.persontrip_set.all %}
- <a href="/logbookentry/{{persontrip.logbookentry.id}}">{{persontrip.date}}</a>
- {% endfor %}
- </div>
- </td></tr></table>
- </li>
+<div class="personblock"><a href="{% url person person.href%}">{{person|wiki_to_html_short}}</a>
+<ul>
+{% for personexpedition in person.personexpedition_set.all %}
+ <li>
+
+ <table><tr><td>
+ {{personexpedition.expedition}}
+ </td><td>
+
+ <div>
+ {% for persontrip in personexpedition.persontrip_set.all %}
+ <a href="{% url logbookentry persontrip.logbook_entry.id %}">{{persontrip.date}}</a>
{% endfor %}
- </ul>
+ </div>
+
+ </td></tr></table>
+
+ </li>
+{% endfor %}
+</ul>
</div>
{% endfor %}
+
{% endblock %}
|