2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-03-13 05:41:47 +00:00

create links from cave ids

This commit is contained in:
Philip Sargent 2022-09-22 00:25:02 +03:00
parent e2b280ccdc
commit 5c0835e076
5 changed files with 32 additions and 8 deletions

View File

@ -12,7 +12,7 @@ traced to produce Tunnel or Therion drawings and eventually the final complete c
<p>See also wallets
<ul>
<li>per year, e.g. <a href="/wallets/year/2018">2018</a>, <a href="/wallets/year/2019">2019</a>, <a href="/wallets/year/2022">2022</a>
<li>per cave, e.g. <a href="/cave/scans/1623-161">1623/161</a>, <a href="/cave/scans/1623-290">1623/290</a>, <a href="/cave/scans/1623-291">1623/291</a>, <a href="/cave/scans/1623-264">1623/264</a>
<li>per cave, e.g. <a href="/cave/scans/1623-161">1623-161</a>, <a href="/cave/scans/1626-359">1626-359</a>, <a href="/cave/scans/1623-290">1623-290</a>, <a href="/cave/scans/1623-291">1623-291</a>, <a href="/cave/scans/1623-264">1623-264</a>
<li>per person, e.g. <a href="/wallets/person/Wookey">Wookey</a>, <a href="/wallets/person/ChrisDensham">Chris Densham</a>, <a href="/wallets/person/BeckaLawson">Becka</a>
</ul>
@ -33,7 +33,7 @@ see https://docs.djangoproject.com/en/3.2/ref/models/querysets/#prefetch-related
<td style="padding:2px">
{% for survexblock in scanswallet.survexblock_set.all %}
{% ifchanged survexblock.survexfile.cave %}
<a href="/cave/scans/{{survexblock.survexfile.cave.slug}}">/{{survexblock.survexfile.cave.slug}}</a>
<a href="/cave/scans/{{survexblock.survexfile.cave.slug}}">{{survexblock.survexfile.cave.slug}}</a>
{% endifchanged %}
{% endfor %}

View File

@ -14,7 +14,7 @@ traced to produce Tunnel or Therion drawings and eventually the final complete c
<p>See also wallets
<ul>
<li>per year, e.g. <a href="/wallets/year/2018">2018</a>, <a href="/wallets/year/2019">2019</a>, <a href="/wallets/year/2022">2022</a>
<li>per cave, e.g. <a href="/cave/scans/1623-161">1623/161</a>, <a href="/cave/scans/1623-290">1623/290</a>, <a href="/cave/scans/1623-291">1623/291</a>, <a href="/cave/scans/1623-264">1623/264</a>
<li>per cave, e.g. <a href="/cave/scans/1623-161">1623-161</a>, <a href="/cave/scans/1626-359">1626-359</a>, <a href="/cave/scans/1623-290">1623-290</a>, <a href="/cave/scans/1623-291">1623-291</a>, <a href="/cave/scans/1623-264">1623-264</a>
</ul>
{% include 'wallet_table.html' %}
@ -28,7 +28,15 @@ traced to produce Tunnel or Therion drawings and eventually the final complete c
<td style="padding:2px" >{% if wallet.date %}{{wallet.date}}{% else %} {% endif %}</td>
<td style="padding:2px">{% if wallet.name %}{{wallet.name}}{% else %}<em>{% if wallet.displaynames %} {% for dn in wallet.displaynames %}{{dn}}{%if not forloop.last %}, {% endif %} {% endfor %}{% else %} {% endif %}</em>{% endif %}</td>
<td style="padding:2px">{{wallet.persons}}</td>
<td style="padding:2px">{% if wallet.cave %}{{wallet.cave}}{% else %} {% endif %}</td>
<td style="padding:2px">
{% if wallet.cave %}
{% if wallet.cave.slug %}
<a href="/cave/scans/{{wallet.cave.slug}}">{{wallet.cave}}</a>
{% else %}
{{wallet.cave}}
{% endif %}
{% else %}
{% endif %}</td>
<td align="center" style="padding:2px"><a href="{{wallet.get_absolute_url}}">{{wallet.singlescan_set.all|length}}</a></td>
<td style="padding:2px">

View File

@ -22,7 +22,15 @@
<td style="padding:2px"><a href="{{wallet.get_absolute_url}}">{{wallet.walletname}}</a></td>
<td style="padding:2px">{% if wallet.date %}{{wallet.date}}{% else %} {% endif %}</td>
<td style="padding:2px">{% if wallet.cave %}{{wallet.cave}}{% else %} {% endif %}</td>
<td style="padding:2px">
{% if wallet.cave %}
{% if wallet.cave.slug %}
<a href="/cave/scans/{{wallet.cave.slug}}">{{wallet.cave}}</a>
{% else %}
{{wallet.cave}}
{% endif %}
{% else %}
{% endif %}</td>
<td style="padding:2px">{% if wallet.name %}{{wallet.name}}{% else %}<em>{% if wallet.displaynames %} {% for dn in wallet.displaynames %}{{dn}}{%if not forloop.last %}, {% endif %} {% endfor %}{% else %} {% endif %}</em>{% endif %}</td>
<td style="padding:2px" align=center>
{% for survexblock in wallet.survexblock_set.all %}

View File

@ -138,7 +138,7 @@
<label for="cave">Cave ID (only needed if no survex file yet)</label>
<input
label = "Cave" name = "cave" size="12"
title="Cave id e.g. 2017-DM-01 or 1623/256"
title="Single cave id e.g. 2017-DM-01 or 1623-256. Not a list. "
placeholder="{{cave}}" value="{{cave}}" />
<br>
<label for="psg">Survey area (wallet name)</label>

View File

@ -15,7 +15,7 @@ traced to produce Tunnel or Therion drawings and eventually the final complete c
<p>See also wallets
<ul style="width: 78%">
<li>per cave, e.g. <a href="/cave/scans/1623-161">1623/161</a>, <a href="/cave/scans/1623-290">1623/290</a>, <a href="/cave/scans/1623-291">1623/291</a>, <a href="/cave/scans/1623-264">1623/264</a>
<li>per cave, e.g. <a href="/cave/scans/1623-161">1623-161</a>, <a href="/cave/scans/1626-359">1626-359</a>, <a href="/cave/scans/1623-290">1623-290</a>, <a href="/cave/scans/1623-291">1623-291</a>, <a href="/cave/scans/1623-264">1623-264</a>
<li>per person, e.g. <a href="/wallets/person/Wookey">Wookey</a>, <a href="/wallets/person/ChrisDensham">Chris Densham</a>, <a href="/wallets/person/BeckaLawson">Becka</a>
<li>other years:
{% for otherexpedition in expeditions %}
@ -38,7 +38,15 @@ traced to produce Tunnel or Therion drawings and eventually the final complete c
<td style="padding:2px">{% if wallet.date %}{{wallet.date}}{% else %} {% endif %}</td>
<td style="padding:2px">{% if wallet.name %}{{wallet.name}}{% else %}<em>{% if wallet.displaynames %} {% for dn in wallet.displaynames %}{{dn}}{%if not forloop.last %}, {% endif %} {% endfor %}{% else %} {% endif %}</em>{% endif %}</td>
<td style="padding:2px">{{wallet.persons}}</td>
<td style="padding:2px">{% if wallet.cave %}{{wallet.cave}}{% else %} {% endif %}</td>
<td style="padding:2px">
{% if wallet.cave %}
{% if wallet.cave.slug %}
<a href="/cave/scans/{{wallet.cave.slug}}">{{wallet.cave}}</a>
{% else %}
{{wallet.cave}}
{% endif %}
{% else %}
{% endif %}</td>
<td align="center" style="padding:2px"><a href="{{wallet.get_absolute_url}}">{{wallet.singlescan_set.all|length}}</a></td>
<td style="padding:2px">