Much QM re-engineering

This commit is contained in:
2023-03-17 20:01:52 +00:00
parent de54576d11
commit 7345e3a328
10 changed files with 252 additions and 178 deletions

View File

@@ -20,39 +20,42 @@
<li><a href="{% url 'caveQMs' '1626-359' %}">1626-359 QMs</a> Homecoming
</ul>
<p>For how to set up your own QMs, see <a href="/handbook/survey/qmentry.html">Adding QMs </a>.
<p>For full explanation of the current status of the QM system(s), see <a href="/handbook/troggle/scriptsqms.html">scriptsqms page</a>.
{% endblock %}
{% block content %}
<h3>Extant</h3>
<p>{% if cave.get_QMs %}
<ul>
{% for QM in cave.get_QMs %}
{% if QM.ticked %}
{% else %}
<h3>Open leads</h3>
<ul>{% for QM in cave.get_open_QMs %}
<li><a href="{{QM.get_absolute_url}}">{{QM}}</a>
{% if QM.nearest_station_description %}&vellip;<em>{{QM.nearest_station_description}}</em>&vellip;{% endif %} {{QM.location_description}} <b>{{QM.grade}}</b>
{% if QM.nearest_station_name %}&sect;<em>{{QM.nearest_station_name}}</em>&sect;{% endif %}
{{QM.location_description}} <b>{{QM.grade}}</b>
{% if QM.block %} <a href="/survexfile/{{QM.block.survexfile.path}}.svx">{{QM.block}}.svx</a> {{QM.block.date}} {% endif %}</li>
{% endif %}
{% empty %}
<li>No open leads.
{% endfor %}
</ul>
&sect; QM.nearest_station_name<br />
&star; QM.resolution_station_name<br />
<h3>Ticked off</h3>
<ul>
{% for QM in cave.get_QMs %}
{% if QM.ticked %}
<ul>{% for QM in cave.get_ticked_QMs %}
<li><a href="{{QM.get_absolute_url}}">{{QM}}</a>
{% if QM.nearest_station %}&vellip;<em>{{QM.nearest_station}}</em>&vellip;{% endif %}
{% if QM.nearest_station_name %}&vellip;<em>{{QM.nearest_station_name}}</em>&vellip;{% endif %}
{% if QM.nearest_station_description %}&vellip;<em>{{QM.nearest_station_description}}</em>&vellip;{% endif %} {{QM.location_description}} <b>{{QM.grade}}</b>
{% if QM.nearest_station_name %}&sect;<em>{{QM.nearest_station_name}}</em>&sect;{% endif %}
{% if QM.resolution_station_name %}&star;<em>{{QM.resolution_station_name}}</em>&star;{% endif %}
{{QM.location_description}} <b>{{QM.grade}}</b>
{% if QM.block %} <a href="/survexfile/{{QM.block.survexfile.path}}.svx">{{QM.block}}.svx</a> {{QM.block.date}} {% endif %}
{% if QM.completion_description %}
Completion page: <a href="/{{QM.get_completion_url}}">{{QM.completion_description}}</a>
{% endif %}
{% endif %}
{% endif %}
{% if QM.comment %}
Comment: <a href="/{{QM.get_completion_url}}">{{QM.comment}}</a>
{% endif %}
{% empty %}
<li>No ticked leads.
{% endfor %}
</ul>
{% endif %}</p>
</p>
&sect; QM.nearest_station_name<br />
&star; QM.resolution_station_name<br />
{% endblock %}

View File

@@ -18,16 +18,4 @@ Hacked up list of caves with grade "?"
{% endfor %} }
<br /><br />
------------------------------------------------------<br />
Hacked up list of caves with grade "V"
<br /><br />
{% for qm in object_list %}
{% if qm.grade == "V" %}<br />
"{{qm.id}}": ["{{qm.expoyear}}","{{qm.cave}}",{% if qm.ticked %}"TICKed",{% else %}"OPEN",{% endif %}
"{{qm.blockname}}","QM{{qm.number}}","{{qm.grade}}","{{qm.nearest_station_name}}","{{qm.resolution_station_name}}",
<a href="{{qm.get_absolute_url}}">"{{qm.get_absolute_url}}"</a>
]{% if not forloop.last %},{% endif %}
{% endif %}
{% endfor %} }
{% endblock %}

View File

@@ -2,6 +2,75 @@
{% load link %}
{% block title %} QM: {{qm|safe}} {% endblock %}
{% block contentheader %}
{% endblock %}
{% block related %}
{% endblock %}
{% block content %}
<table id="cavepage">
<tr>
<th id="kat_no"><a class="whitetext" href="{{qm.get_previous_by_id.get_absolute_url}}">Previous QM</a></th>
<th id="name">QM &nbsp;&nbsp;{{qm|safe}}</th>
<th id="status"><a class="whitetext" href="{{qm.get_next_by_id.get_absolute_url}}">Next QM</a></th>
</tr>
</table>
{% if qm.ticked %}
<h3>This QM is TICKED</h3>
{% if qm.resolution_station_name %}
The survey station which record the continuation of the cave past this QM is <b>{{qm.resolution_station_name}}</b>.<br />
{%endif %}
Tick off comment: '{{qm.comment}}'</a> <br />
Tick off completion description: '{{qm.completion_description}}' </a> <br />
Tick off url: <a href="/{{qm.get_completion_url}}">{{qm.get_completion_url}}</a> WRONG <br />
Tick off date: '{{qm.completion_date}}' [For survex file ticks. not implemented yet]</a> <br />
{% endif %}
{% if qm.cave %}
<h3>Cave: {{qm.cave|safe }}</h3>
<a href="{% url 'caveQMs' qm.cave|safe %}">All QMs on this cave </a>{{ qm.cave|safe }} <br>
<a href="/{{ qm.cave.url }}"> Cave description </a> {{ qm.cave|safe }}
{% else %}
<h3>This QM is OPEN</h3>
Comment: '{{qm.comment}}'</a> <br />
{% endif %}
QM page_ref: '{{qm.page_ref}}'<br>
<h3>QM Number: {{qm.number}} Grade: {{qm.grade}} </h3>
<p>Explanation of Grade letters: <a href="/handbook/survey/qm.html">Handbook - QM grades</a>
{% if qm.block %}
<h3>Survexfile</h3>
{{qm.block.date}} <a href="/survexfile/{{qm.block.survexfile.path}}.svx">{{qm.block}}.svx</a>
{% endif %}
<h3>QM original closest survey station</h3>
{% if qm.block %}
Survex block: {{qm.blockname}}
<br>
{% endif %}
Nearest station: '{{qm.nearest_station_name}}' {{nearest_station_description}}
<h3>QM original description</h3>
{{qm.location_description}}
{% if qm.found_by %}
<h3>Creation</h3>
Found by <a href="{{qm.found_by.get_absolute_url}}">{{qm.found_by}}</a> on {{qm.found_by.date}}.
{% endif %}
<hr />
<h3>QMs available for these caves from CSV import</h3>
<ul>
<li><a href="{% url 'caveQMs' '1623-161' %}">1623-161 QMs</a> Maybe OUT OF DATE. See <a href="/1623/161/qmdone.htm">the curated list <b>instead</b></a>
@@ -18,79 +87,5 @@
</ul>
<p>For full explanation of the current status of the QM system(s), see <a href="/handbook/troggle/scriptsqms.html">scriptsqms page</a>.
<table id="cavepage">
<tr>
<th id="kat_no"><a class="whitetext" href="{{qm.get_previous_by_id.get_absolute_url}}">Previous QM</a></th>
<th id="name">QM &nbsp;&nbsp;{{qm|safe}}</th>
<th id="status"><a class="whitetext" href="{{qm.get_next_by_id.get_absolute_url}}">Next QM</a></th>
</tr>
</table>
{% endblock %}
{% block related %}
{% endblock %}
{% block content %}
<h3>Cave</h3>
{% if qm.cave %}
<a href="{% url 'caveQMs' qm.cave|safe %}">{{ qm.cave|safe }} QMs</a> <br>
{% else %}
{% if qm.cave %}
<a href="{% url 'caveQMs' qm.cave|safe %}">{{ qm.cave|safe }} QMs</a> <br>
{% endif %}
{% endif %}
<a href="/{{ qm.cave.url }}">{{ qm.cave|safe }} cave description</a>
<h3>QM Number</h3>
{{qm.number}}
<h3>Grade</h3>
{{qm.grade}}
<p>Explanation of Grade letters: <a href="/handbook/survey/qm.html">Handbook - QM grades</a>
{% if qm.block %}
<h3>Survexfile</h3>
{{qm.block.date}} <a href="/survexfile/{{qm.block.survexfile.path}}.svx">{{qm.block}}.svx</a>
{% endif %}
{% if qm.ticked %}
<h3>Ticked</h3>
This QM is TICKED
{% endif %}
{% if qm.resolution_station_name %}
<h3>resolution_station_name</h3>
{{qm.resolution_station_name}}
{% endif %}
<h3>Location</h3>
{% if qm.block %}
Survex block: {{qm.blockname}}
<br>
{% endif %}
Nearest station: '{{qm.nearest_station_name}}' {{nearest_station_description}}
<h3>QM Description</h3>
{{qm.location_description}}
{% if qm.found_by %}
<h3>Creation</h3>
Found by <a href="{{qm.found_by.get_absolute_url}}">{{qm.found_by}}</a> on {{qm.found_by.date}}.
{% endif %}
<h3>Completion</h3>
{% if qm.ticked %}
Ticked off log entry: <a href="{{qm.ticked_off_by.get_absolute_url}}">{{qm.ticked_off_by}}</a><br />
Ticked off date: <a href="/{{qm.get_completion_url}}">{{qm.get_completion_url}}</a> WRONG <br />
Tick off date: [For survex file ticks. not implemented yet, needs model change]</a> <br />
Tick off completion description: {{qm.completion_description}}</a>
{% else %}
No completion description yet- STILL EXTANT.
{% endif %}
<h3>Comment</h3>
{{qm.comment}}
<hr />
{% endblock %}