2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2026-04-01 04:25:20 +01:00

moving primary survex file to each survexfile

This commit is contained in:
2023-09-06 17:19:20 +03:00
parent 3c6cae20ed
commit 0dc0e27519
7 changed files with 64 additions and 47 deletions

View File

@@ -12,20 +12,22 @@
<tr><th>Dir Path</th><th>Primary svx</th></tr>
{% for sd in survexdirs %}
<tr>
<td>{{sd.path}}</td>
<td><a href="/survexfile/{{sd.primarysurvexfile}}"><span {% if sd.pathbad %} style="color:red" {% endif %}>{{sd.primarysurvexfile}}.svx</span></a><span {% if sd.primarybad %} style="color:blue"> <b>MISMATCH</b> {% endif %}</span></td>
<td><span{% if sd.matchbad %} style="color:red" {% endif %}>{{sd.path}}</span></td>
<td><a href="/survexfile/{{sd.primarysurvexfile}}.svx"><span {% if sd.pathbad %} style="color:red" {% endif %}>{{sd.primarysurvexfile}}.svx</span></a></td>
</tr>
{% endfor %}
</table>
<p>
<h2>All SurvexFiles</h2>
<table>
<tr><th>Cave</th><th>Dir Path</th><th>svx</th></tr>
<tr><th>Cave</th><th>f.survexdirectory.path</th><th>f.primary.path.parent()</th><th>f.primary</th><th>f.path</th></tr>
{% for f in survexfiles %}
<tr>
<td>{{f.cave}}</td>
<td>{{f.survexdirectory.path}}</td>
<td><a href="/survexfile/{{f.path}}">{{f.path}}.svx</a></td>
<td><span {% if f.matchbad %} style="color:red" {% endif %}>{{f.survexdirectory.path}}</span></td>
<td><span {% if f.primarybad %} style="color:red" {% endif %}>{{f.pathparent}}</span></td>
<td> {{f.primary}}</td>
<td><span {% if f.pathbad %} style="color:red" {% endif %}><a href="/survexfile/{{f.path}}.svx">{{f.path}}.svx</a></span></td>
</tr>
{% endfor %}
</table>

View File

@@ -13,8 +13,8 @@
<p>Wallets: <a href="/cave/scans/{{cave|safe}}">{{cave|safe}}</a>
</p>
<p>
{% 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> &nbsp;
{% for svxdir in cave.sds %}
<a href="#T_{{svxdir.primarysurvexfile.path}}">{{svxdir.path}}</a> &nbsp;
{% 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>
@@ -39,11 +39,11 @@ 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.sds %}
<h3 id="T_{{survexdirectory.primarysurvexfile.path}}">{{survexdirectory.path}}</h3>
{% for svxdir in cave.sds %}
<h3 id="T_{{svxdir.primarysurvexfile.path}}">{{svxdir.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 %}
{% for survexfile in svxdir.survexfile_set.all %}
<tr>
{% if survexfile.exists %}
<td rowspan="{{survexfile.survexblock_set.all|length|add:"1"}}">
@@ -51,7 +51,7 @@ to go to a form to correct the online data.
<td class="survexnewfile" rowspan="{{survexfile.survexblock_set.all|length|add:"1"}}">
{% endif %}
{% if survexfile == survexdirectory.primarysurvexfile %}
{% if survexfile == svxdir.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 ?-->
@@ -98,6 +98,6 @@ to go to a form to correct the online data.
{% endfor %} <!-- survexblock -->
{% endfor %} <!-- survexfile -->
</table>
{% endfor %} <!-- survexdirectory -->
{% endfor %} <!-- svxdir -->
{% endfor %} <!-- caves -->
{% endblock %}