2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-15 02:57:17 +00:00

this year's cave list

This commit is contained in:
2025-07-24 15:02:33 +02:00
parent c1bf6e94aa
commit 2f7354d556
2 changed files with 85 additions and 0 deletions

View File

@@ -222,6 +222,21 @@ def caveindex(request):
caves1624.sort(key=caveKey)
caves1626.sort(key=caveKey)
caves1627.sort(key=caveKey)
allcaves = caves1623 + caves1624 + caves1626 + caves1627
caves_this_year = []
for c in allcaves:
if c.unofficial_number.startswith(current_expo()):
caves_this_year.append(c)
caves_this_year.sort(key=caveKey)
caves_last_year = []
for c in allcaves:
last_year = str(int(current_expo()) - 1)
if c.unofficial_number.startswith(last_year):
caves_last_year.append(c)
caves_this_year.sort(key=caveKey)
return render(
request,
"caveindex.html",
@@ -230,6 +245,8 @@ def caveindex(request):
"caves1627": caves1627,
"caves1624": caves1624,
"notablecaves": getnotablecaves(),
"caves_this_year": caves_this_year,
"caves_last_year": caves_last_year,
"cavepage": True, "year": current_expo()},
)

View File

@@ -34,6 +34,74 @@ Black triangle <span style="color: black">&#x25B2;</span> against a name indicat
<a href="/noinfo/cave-number-index">Cave Number Index - kept updated</a>
</p>
<h3>This year's caves</h3>
<div style="column-count: 3;">
<table class="searchable">
{% for cave in caves_this_year %}
<tr><td> <a href="/{{ cave.url }}">
{% if cave.kataster_number %}
{{ cave.kataster_number }} <em>{{cave.official_name|safe}}</em></a>
{% if cave.unofficial_number %}
({{cave.unofficial_number }})
{% endif %}
{% else %}
{{cave.unofficial_number }} <em>{{cave.official_name|safe}}</em></a>
{% endif %}
{% if cave.filename %}
{% if cave.entrances %}
{% if cave.no_location %}<span title="the cave has an Entrance, but no entrances have located survey station" style="color: black">&#x25B2;</span>{% endif %}
{% else %}<span title="the cave has no Entrance (and is not 'pending')" style="color: orange">&#x25B2;</span>
{% endif %}
{% else %}<span title="the cave is 'pending' creation properly" style="color: #43C6DB">&#x25BC;</span>
{% endif %}
{% if cave.survex_file %}{% else %}
{% if cave.fully_explored %}
<span title="no survex file is explicitly associated with the cave but it is fully explored" style="color: blue">*</span>
{% else %}
<span title="no survex file is explicitly associated with the cave" style="color: red">*</span>
{% endif %}
{% endif %}
</td></tr>
{% endfor %}
</table>
</div>
<h3>Last year's caves</h3>
<div style="column-count: 3;">
<table class="searchable">
{% for cave in caves_last_year %}
<tr><td> <a href="/{{ cave.url }}">
{% if cave.kataster_number %}
{{ cave.kataster_number }} <em>{{cave.official_name|safe}}</em></a>
{% if cave.unofficial_number %}
({{cave.unofficial_number }})
{% endif %}
{% else %}
{{cave.unofficial_number }} <em>{{cave.official_name|safe}}</em></a>
{% endif %}
{% if cave.filename %}
{% if cave.entrances %}
{% if cave.no_location %}<span title="the cave has an Entrance, but no entrances have located survey station" style="color: black">&#x25B2;</span>{% endif %}
{% else %}<span title="the cave has no Entrance (and is not 'pending')" style="color: orange">&#x25B2;</span>
{% endif %}
{% else %}<span title="the cave is 'pending' creation properly" style="color: #43C6DB">&#x25BC;</span>
{% endif %}
{% if cave.survex_file %}{% else %}
{% if cave.fully_explored %}
<span title="no survex file is explicitly associated with the cave but it is fully explored" style="color: blue">*</span>
{% else %}
<span title="no survex file is explicitly associated with the cave" style="color: red">*</span>
{% endif %}
{% endif %}
</td></tr>
{% endfor %}
</table>
</div>
<h3>1623</h3>
<div style="column-count: 3;">
<table class="searchable">