diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/errors/svxcaves404.html (renamed from templates/errors/svxcavesingle404.html) | 0 | ||||
-rw-r--r-- | templates/svxcaves.html (renamed from templates/svxcavesingle.html) | 18 | ||||
-rw-r--r-- | templates/svxcaveseveral.html | 101 |
3 files changed, 8 insertions, 111 deletions
diff --git a/templates/errors/svxcavesingle404.html b/templates/errors/svxcaves404.html index dc5404f..dc5404f 100644 --- a/templates/errors/svxcavesingle404.html +++ b/templates/errors/svxcaves404.html diff --git a/templates/svxcavesingle.html b/templates/svxcaves.html index ea992b9..0eed31d 100644 --- a/templates/svxcavesingle.html +++ b/templates/svxcaves.html @@ -3,21 +3,18 @@ {% block title %}List of survex files{% endblock %} {% block content %} +{% for cave in caves %} {% autoescape off %} <h1>Surveys for <a href="/{{cave.url}}">{{cave.official_name}}</a> - id:{{cave}}</h1> {% endautoescape %} -<!-- the only thing passed into this template is the object identifier for a cave. -All the processing to extract the survex subdriectories and survex files is done in this template -CHANGE THAT and do the processing in python were it is easier to see what is going on and where -we don't need the SUrvexDirectory objects at all--> <p>Cave description: <a href="/{{cave.url}}">{{cave.url}}</a> <p>Wallets: <a href="/cave/scans/{{cave|safe}}">{{cave|safe}}</a> </p> <p> -{% for survexdirectory in cave.survexdirectory_set.all %} <!-- redo to use cave.survexfile_set.all() each of which has a .survexdirectory--> - <a href="#T_{{survexdirectory.primarysurvexfile.path}}">{{survexdirectory.path}}</a> +{% for survexdirectory in cave.sds %} <!-- redo to use cave.survexfile_set.all() each of which has a .survexdirectory--> + <a href="#T_{{survexdirectory.primarysurvexfile.path}}">{{survexdirectory.path}}</a> {% empty %} <p>If you were expecting to see a list of survex files here and a summary table of who did what and when, perhaps because you followed a link from <a href="/survexfile/caves/">the master caves' survex list</a> page which showed that such survex files clearly existed, and yet there is nothing here but a blank; then this will be because <br> @@ -42,7 +39,7 @@ to go to a form to correct the online data. Instructions for filling in this form are in this part <a href="/handbook/survey/caveentry.html"> of the survey handbook</a>. </p> -{% for survexdirectory in cave.survexdirectory_set.all %} +{% for survexdirectory in cave.sds %} <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> @@ -98,8 +95,9 @@ to go to a form to correct the online data. {% endif %} </td> </tr> - {% endfor %} - {% endfor %} + {% endfor %} <!-- survexblock --> + {% endfor %} <!-- survexfile --> </table> -{% endfor %} +{% endfor %} <!-- survexdirectory --> +{% endfor %} <!-- caves --> {% endblock %} diff --git a/templates/svxcaveseveral.html b/templates/svxcaveseveral.html deleted file mode 100644 index de45337..0000000 --- a/templates/svxcaveseveral.html +++ /dev/null @@ -1,101 +0,0 @@ -<!-- svxcaveseveral.html - this text visible because this template has been included --> -{% extends "base.html" %} -{% block title %}List of survex files{% endblock %} -{% block content %} - <!-- the only thing passed into this template is a list of object identifiers for caves. - All the processing to extract the survex subdriectories and survex files is done in this template --> -{% for cave in caves %} - - {% autoescape off %} - <h1>Surveys for <a href="/{{cave.url}}">{{cave.official_name}}</a> - identifier:{{cave}}</h1> - {% endautoescape %} - - <p>Cave description: <a href="/{{cave.url}}">{{cave.url}}</a> - </p> - <p> - {% for survexdirectory in cave.survexdirectory_set.all %} - This cave has a linked survexdirectory: <a href="#T_{{survexdirectory.primarysurvexfile.path}}">{{survexdirectory.path}}</a> in the database. See the table below. - {% empty %} - <p>If you were expecting to see a list of survex files here and a summary table of who did what and when, perhaps - because you followed a link from <a href="/survexfile/caves/">the master caves' survex list</a> page which showed that such survex files clearly existed, and yet there is nothing here but a blank; then this will be because the survex (.svx) files have been stored on the server in the - <a href="/handbook/computing/repos.html"><var>:loser:</var></a> repository - but whoever was - responsible has not yet created the appropriate entries in the XML file in the - <a href="/handbook/computing/repos.html"><var>:expoweb:</var></a> repository. - It is the XML file which registers the cave description and ties together - the survex files with everything else. - <p>The process for registering a new cave is documented in - <a href="/handbook/survey/caveentry.html">this part of the survey handbook</a>. - {% endfor %} - </p> - - <p>If you can see a filename here: [ <a href="/survexfile/{{cave.survex_file}}">{{cave.survex_file}}</a> ] - which does <em>not</em> match any in the list below <em>including the directories beginning with </em><strong>caves-162X/</strong></em> - not just the filename</em>, then (if logged on) you can - <strong>click here <var><a href="/{{cave.slug}}_cave_edit/">/{{cave.slug}}_cave_edit</a></var></strong> - to go to a form to correct the online data. - Instructions for filling in this form are in this part - <a href="/handbook/survey/caveentry.html"> of the survey handbook</a>. - </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|add:"1"}}"> - {% else %} - <td class="survexnewfile" rowspan="{{survexfile.survexblock_set.all|length|add:"1"}}"> - {% endif %} - - {% if survexfile == survexdirectory.primarysurvexfile %} - <a href="{% url "svx" survexfile.path %}"><b>{% url "svx" survexfile.path %}</b></a> - {% else %} - <a href="{% url "svx" survexfile.path %}"><i><small>{% url "svx" survexfile.path %}</small></i></a><!-- would like to extract only the last bit. Some javascript useful ?--> - {% endif %} - </td> - </tr> - {% for survexblock in survexfile.survexblock_set.all %} - <tr> - <!-- Block --> - <td style="width:10 em"><a href="{% url "svx" survexfile.path %}">{{survexblock.name}}</a></td> - - <!-- Date --> - <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> - <!-- Explorers --> - <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> - <!-- length --> - <td style="padding-right: 3px; text-align:right">{{survexblock.legslength|stringformat:".1f"}}</td> - - <!-- Titles --> - <td style="padding-left: 3px;"> - {{survexblock.title}} - </td> - <!-- Scans --> - <td> - {% if survexblock.scanswallet %} - <b><a href="{{survexblock.scanswallet.get_absolute_url}}">{{survexblock.scanswallet.walletname}}</a></b> - {% endif %} - </td> - </tr> - {% endfor %} - {% endfor %} - </table><p> - {% endfor %} -{% endfor %} -{% endblock %} |