UNDESCENDED caves now written in red ink

This commit is contained in:
2025-07-28 19:10:02 +02:00
parent 89e38397b9
commit 5f2791816d
6 changed files with 18 additions and 17 deletions

View File

@@ -74,19 +74,10 @@ class CaveForm(ModelForm):
required=False,
widget=HTMLarea(attrs={"height": "80%", "rows": 20, "placeholder": "Enter page content (using HTML)"}),
)
# survey = forms.CharField(required = False, widget=TinyMCE(attrs={'cols': 80, 'rows': 10}))
# kataster_status = forms.CharField(required=False,
# label = "Kataster status, see below",
# widget=forms.TextInput(attrs={"placeholder": "see example below"})
# )
kataster_code = forms.CharField(required=False,
label = "Kataster code, see explanation at bottom of page",
label = "Exploration code, see explanation at bottom of page",
widget=forms.TextInput(attrs={"placeholder": "e.g. 2/S= See below"})
)
# underground_centre_line = forms.CharField(
# required=False,
# widget=HTMLarea(attrs={"height": "80%", "rows": 20, "placeholder": "Enter page content (using HTML)"}),
# )
notes = forms.CharField(
required=False,
label = "Notes, e.g. progress on issuing kataster no.",
@@ -106,7 +97,6 @@ class CaveForm(ModelForm):
areacode = forms.CharField(required=False, label="Area code", widget=forms.TextInput(attrs={"placeholder": "e.g. 1623"})) # should be required=True?
subarea = forms.CharField(required=False, label="Subarea (do not use for new caves)", widget=forms.TextInput(attrs={"placeholder": "usually blank, archaic"}))
#cave_slug = forms.CharField()
identified_login = forms.BooleanField(required=False,widget=forms.CheckboxInput(attrs={"onclick":"return false"})) # makes it readonly
who_are_you = forms.CharField(
widget=forms.TextInput(
@@ -116,9 +106,9 @@ class CaveForm(ModelForm):
)
class Meta:
model = Cave
exclude = ("filename", "url", "underground_centre_line", "kataster_status")
exclude = ("filename", "url", "kataster_status")
field_order = ['unofficial_number', 'kataster_number', 'official_name', 'underground_description', 'survey',
field_order = ['unofficial_number', 'kataster_number', 'official_name', 'unexplored', 'underground_description', 'survey',
'underground_centre_line', 'explorers', 'equipment', 'notes', 'references', 'description_file', 'survex_file',
'areacode', 'subarea', 'length', 'depth', 'extent',
'kataster_code', 'kataster_status', 'fully_explored', 'non_public', 'identified_login', 'who_are_you']

View File

@@ -61,7 +61,7 @@ def get_cave_leniently(caveid):
class Cave(TroggleModel):
# (far) too much here perhaps,
areacode = models.CharField(max_length=4, blank=True, null=True) # could use models.IntegerChoices
subarea = models.CharField(max_length=25, blank=True, null=True) # 9, 8c etc.
subarea = models.CharField(max_length=25, blank=True, null=True) # 9, 8c etc. HISTORIC
depth = models.CharField(max_length=100, blank=True, null=True)
description_file = models.CharField(max_length=200, blank=True, null=True)
entrances = models.ManyToManyField("Entrance", through="CaveAndEntrance")
@@ -70,6 +70,7 @@ class Cave(TroggleModel):
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)
unexplored = models.BooleanField(default=True)
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)

View File

@@ -2,4 +2,5 @@ Red star <span style="color: red">*</span> against a name indicates that no surv
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.
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.<br />
<span style="color:red">Cavename in red</span> means that the cave is undescended/unexplored.

View File

@@ -1,4 +1,9 @@
<tr><td> <a href="/{{ cave.url }}">
{% if cave.unexplored %}
<span style="color:red">
{% else %}
<span>
{% endif %}
{% if cave.kataster_number %}
{{ cave.kataster_number }} <em>{{cave.official_name|safe}}</em></a>
{% if cave.unofficial_number %}
@@ -22,4 +27,5 @@
{% endif %}
{% endif %}
</span>
</td></tr>

View File

@@ -22,6 +22,9 @@
<td>
{{c.filename}}
</td>
<td>
{{c.fully_explored}}
</td>
{% endfor %}
</table>

View File

@@ -76,10 +76,10 @@ div > label {
<p><input style="font-weight: bold; font-size: 200%; font-variant-caps: small-caps; margin-left: 40%;" type="submit" value="Submit" /></p>
</form>
<h3>Kataster code</h3>
<h3>Exploration code</h3>
This is the 'length-or-depth/type exploration'
<a href="/katast.htm
">code used in the Austrian kataster</a>, e.g '1/S +'
">code used in the Austrian cave kataster</a>, e.g '1/S +'
means "more than 10 but less than 50m long or deep, with a pitch, completely explored". The number is:<br />
0 - length or depth unknown<br />
1 - 10 to 50m<br />