summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/svxcavesingle404.html83
-rw-r--r--templates/svxfilecavelist.html4
2 files changed, 85 insertions, 2 deletions
diff --git a/templates/svxcavesingle404.html b/templates/svxcavesingle404.html
new file mode 100644
index 0000000..7409785
--- /dev/null
+++ b/templates/svxcavesingle404.html
@@ -0,0 +1,83 @@
+{% extends "base.html" %}
+{% load wiki_markup %}
+{% load link %}
+
+{% block title %}List of survex files{% endblock %}
+
+{% block content %}
+
+<h1>Surveys for cave - Cave not found</h1>
+
+<h3>Cave number looked for: '{{cave}}'</h3>
+<h3>kataster number like this not found</h3>
+<h3>unofficial number like this not found</h3>
+
+<p>
+{% for survexdirectory in cave.survexdirectory_set.all %}
+ <a href="#T_{{survexdirectory.primarysurvexfile.path}}">{{survexdirectory.path}}</a>
+{% endfor %}
+</p>
+
+{% for survexdirectory in cave.survexdirectory_set.all %}
+<h3 id="T_{{survexdirectory.primarysurvexfile.path}}">{{survexdirectory.path}}</h3>
+
+<table>
+<tr><th>Survex file</th><th>Block</th><th>Date</th><th>Explorers</th><th>length</th><th>Titles</th><th>Scans</th></tr>
+
+{% for survexfile in survexdirectory.survexfile_set.all %}
+<tr>
+ {% if survexfile.exists %}
+ <td rowspan="{{survexfile.survexblock_set.all|length|plusone}}">
+ {% else %}
+ <td class="survexnewfile" rowspan="{{survexfile.survexblock_set.all|length|plusone}}">
+ {% endif %}
+
+ {% ifequal survexfile survexdirectory.primarysurvexfile %}
+ <a href="{% url "svx" survexfile.path %}"><b>{{survexfile.path}}</b></a>
+ {% else %}
+ <a href="{% url "svx" survexfile.path %}">{{survexfile.path}}</a>
+ {% endifequal %}
+ </td>
+</tr>
+
+{% for survexblock in survexfile.survexblock_set.all %}
+<tr>
+ <td style="width:10 em">{{survexblock.name}}</td>
+ <td style="white-space:nowrap">
+ {% if survexblock.expedition %}
+ <a href="{{survexblock.expedition.get_absolute_url}}">{{survexblock.date|date:"D d M Y"}}</a>
+ {% else %}
+ <!--{{survexblock.date}}-->
+ {% endif %}
+ </td>
+
+ <td>
+ {% for personrole in survexblock.survexpersonrole_set.all %}
+ {% if personrole.personexpedition %}
+ <a href="{{personrole.personexpedition.get_absolute_url}}">{{personrole.personname}}</a>
+ {% else %}
+ {{personrole.personname}}
+ {% endif %}
+ {% endfor %}
+ </td>
+
+ <td style="padding-right: 3px; text-align:right">{{survexblock.legslength|stringformat:".1f"}}</td>
+
+ <td style="padding-left: 3px;">
+ {{survexblock.title}}
+ </td>
+
+ <td>
+ {% if survexblock.scansfolder %}
+ <b><a href="{{survexblock.scansfolder.get_absolute_url}}">{{survexblock.scansfolder.walletname}}</a></b>
+ {% endif %}
+ </td>
+</tr>
+{% endfor %}
+{% endfor %}
+</table>
+
+{% endfor %}
+
+{% endblock %}
+
diff --git a/templates/svxfilecavelist.html b/templates/svxfilecavelist.html
index 59f177f..f148b07 100644
--- a/templates/svxfilecavelist.html
+++ b/templates/svxfilecavelist.html
@@ -23,9 +23,9 @@
</td>
</tr>
-{% for primarycavefile, subcavefiles in subsurvdirs %}
+{% for name, primarycavefile, subcavefiles in subsurvdirs %}
<tr>
- <td><a href="{% url "svx" primarycavefile.0 %}">{{primarycavefile.1}}</a></td>
+ <td><a href="{% url "svx" primarycavefile.0 %}">{{name}}</a></td>
<td>
{% for cavepath, cavename in subcavefiles %}
<a href="{% url "svx" cavepath %}">{{cavename}}</a>