From dfdbba6550e790278cec7a0d6f0cc82c542545c6 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Fri, 6 Oct 2023 14:57:41 +0300 Subject: [PATCH] Orange ▲ for caves with no Entranes --- core/views/caves.py | 7 ++++++- templates/caveindex.html | 21 ++++++++++++++++----- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/core/views/caves.py b/core/views/caves.py index e8db57744..cdac66dc7 100644 --- a/core/views/caves.py +++ b/core/views/caves.py @@ -125,7 +125,12 @@ def getnotablecaves(): def caveindex(request): - + #allcaves = Cave.objects.all() + allcaves = Cave.objects.filter(areacode="1626") # testing with subset + for c in allcaves: + if c.entrances: + pass + caves1623 = list(Cave.objects.filter(areacode="1623")) caves1626 = list(Cave.objects.filter(areacode="1626")) caves1627 = list(Cave.objects.filter(areacode="1627")) diff --git a/templates/caveindex.html b/templates/caveindex.html index 682815945..510e02d98 100644 --- a/templates/caveindex.html +++ b/templates/caveindex.html @@ -23,8 +23,10 @@ {% endfor %} -Red star * against a name indicates that no survex file is explicitly associated with the cave (but there might be a *fix somewhere) - +Red star * against a name indicates that no survex file is explicitly associated with the cave (but there might be a *fix somewhere)
+Orange triangle against a name indicates that the cave has no Entrance.
+ +

1623

@@ -37,7 +39,10 @@ Red star * against a name indicates that no surv {% endif %} {% else %} {{cave.unofficial_number }} {{cave.official_name|safe}} - {% endif %}{% if cave.survex_file %}{% else %}*{% endif %} + {% endif %} + {% if cave.survex_file %}{% else %}*{% endif %} + {% if cave.entrances %}{% else %}{% endif %} + {% endfor %}
@@ -52,7 +57,10 @@ Red star * against a name indicates that no surv
{% for cave in caves1626 %} - + {% endfor %}
{% if cave.kataster_number %}{{ cave.kataster_number }} {{cave.official_name|safe}} {% if cave.unofficial_number %}({{cave.unofficial_number }}){% endif %}{% else %}{{cave.unofficial_number }} {{cave.official_name|safe}} {% endif %}{% if cave.survex_file %}{% else %}*{% endif %}
{% if cave.kataster_number %}{{ cave.kataster_number }} {{cave.official_name|safe}} {% if cave.unofficial_number %}({{cave.unofficial_number }}){% endif %}{% else %}{{cave.unofficial_number }} {{cave.official_name|safe}} {% endif %} + {% if cave.survex_file %}{% else %}*{% endif %} + {% if cave.entrances %}{% else %}{% endif %} +
@@ -67,7 +75,10 @@ Red star * against a name indicates that no surv
{% for cave in caves1627 %} - + {% endfor %}
{% if cave.kataster_number %}{{ cave.kataster_number }} {{cave.official_name|safe}} {% if cave.unofficial_number %}({{cave.unofficial_number }}){% endif %}{% else %}{{cave.unofficial_number }} {{cave.official_name|safe}} {% endif %} {% if cave.survex_file %}{% else %}*{% endif %}
{% if cave.kataster_number %}{{ cave.kataster_number }} {{cave.official_name|safe}} {% if cave.unofficial_number %}({{cave.unofficial_number }}){% endif %}{% else %}{{cave.unofficial_number }} {{cave.official_name|safe}} {% endif %} + {% if cave.survex_file %}{% else %}*{% endif %} + {% if cave.entrances %}{% else %}{% endif %} +