summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/models/caves.py1
-rw-r--r--parsers/caves.py5
-rw-r--r--templates/caveindex.html42
3 files changed, 39 insertions, 9 deletions
diff --git a/core/models/caves.py b/core/models/caves.py
index 8af9a76..691959b 100644
--- a/core/models/caves.py
+++ b/core/models/caves.py
@@ -87,6 +87,7 @@ class Cave(TroggleModel):
explorers = models.TextField(blank=True, null=True)
extent = models.CharField(max_length=100, blank=True, null=True)
filename = models.CharField(max_length=200) # if a cave is 'pending' this is not set. Otherwise it is.
+ fully_explored = models.BooleanField(default=False)
kataster_code = models.CharField(max_length=20, blank=True, null=True)
kataster_number = models.CharField(max_length=10, blank=True, null=True)
kataster_status = models.TextField(blank=True, null=True)
diff --git a/parsers/caves.py b/parsers/caves.py
index f2176e0..da55ea7 100644
--- a/parsers/caves.py
+++ b/parsers/caves.py
@@ -816,7 +816,7 @@ def read_cave(filename, mvf=None, cave=None):
length = getXMLmin0("length")
depth = getXMLmin0("depth")
extent = getXMLmin0("extent")
-
+
manual_edit = True
if not cave:
# we are parsing using databaseReset.py not an online edit
@@ -853,6 +853,9 @@ def read_cave(filename, mvf=None, cave=None):
cave.non_public=boolify(non_public)
cave.official_name=official_name[0]
cave.kataster_code=kataster_code[0]
+ if "+" in kataster_code[0]:
+ cave.fully_explored = True
+ print(f"{kataster_code[0]} {slug}")
cave.kataster_number=kataster_number[0]
cave.unofficial_number=unofficial_number[0]
cave.explorers=explorers[0]
diff --git a/templates/caveindex.html b/templates/caveindex.html
index 560eb1b..f444905 100644
--- a/templates/caveindex.html
+++ b/templates/caveindex.html
@@ -23,7 +23,8 @@
{% endfor %}
</ul>
-Red star <span style="color: red">*</span> against a name indicates that no survex file is explicitly associated with the cave (but there might be a *fix somewhere)<br />
+Red star <span style="color: red">*</span> against a name indicates that no survex file is explicitly associated with the cave<br />
+Blue star <span style="color: blue">*</span> against a name indicates that no survex file is explicitly associated with the cave but it is marked as 'fully explored'<br />
Blue triangle <span style="color: #43C6DB">&#x25BC;</span> against a name indicates that the cave is 'pending' creation properly.<br />
Orange triangle <span style="color: orange">&#x25B2;</span> against a name indicates that the cave has no Entrance (and is not 'pending').<br />
Black triangle <span style="color: black">&#x25B2;</span> against a name indicates that the cave has an Entrance, but no entrances have valid located survey stations.
@@ -48,7 +49,14 @@ Black triangle <span style="color: black">&#x25B2;</span> against a name indicat
{% endif %}
{% else %}<span title="the cave is 'pending' creation properly" style="color: #43C6DB">&#x25BC;</span>
{% endif %}
- {% if cave.survex_file %}{% else %}<span title="no survex file is explicitly associated with the cave (but there might be a *fix somewhere)" style="color: red">*</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 %}
@@ -72,8 +80,14 @@ Black triangle <span style="color: black">&#x25B2;</span> against a name indicat
{% endif %}
{% else %}<span style="color: #43C6DB">&#x25BC;</span>
{% endif %}
- {% if cave.survex_file %}{% else %}<span style="color: red">*</span>{% endif %}
- </td></tr>
+ {% 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>
@@ -97,8 +111,14 @@ Black triangle <span style="color: black">&#x25B2;</span> against a name indicat
{% endif %}
{% else %}<span style="color: #43C6DB">&#x25BC;</span>
{% endif %}
- {% if cave.survex_file %}{% else %}<span style="color: red">*</span>{% endif %}
- </td></tr>
+ {% 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>
@@ -120,8 +140,14 @@ Black triangle <span style="color: black">&#x25B2;</span> against a name indicat
{% endif %}
{% else %}<span style="color: #43C6DB">&#x25BC;</span>
{% endif %}
- {% if cave.survex_file %}{% else %}<span style="color: red">*</span>{% endif %}
- </td></tr>
+ {% 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>