mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-25 08:41:51 +00:00
Added link to parent cave in menu
This commit is contained in:
parent
54f47c58db
commit
7db7c67065
@ -175,9 +175,16 @@ def expowebpage(request, expowebpath, path):
|
||||
if menumatch:
|
||||
has_menu = True
|
||||
|
||||
m = re.search(r"(162\d\/[^\/]+)[\/\.]", path, re.DOTALL + re.IGNORECASE)
|
||||
if m:
|
||||
path_start, = m.groups()
|
||||
parent_caves = Cave.objects.filter(url__startswith = path_start)
|
||||
else:
|
||||
parent_caves = None
|
||||
|
||||
handbook = path.startswith("handbook")
|
||||
return render(request, 'expopage.html', {'editable': editable, 'path': path, 'title': title,
|
||||
'body': body, 'homepage': (path == "index.htm"), 'has_menu': has_menu, 'handbook': handbook})
|
||||
'body': body, 'homepage': (path == "index.htm"), 'has_menu': has_menu, 'handbook': handbook, 'parent_caves': parent_caves})
|
||||
|
||||
def mediapage(request, subpath=None, doc_root=None):
|
||||
'''This is for special prefix paths /photos/ /site_media/, /static/ etc.
|
||||
|
@ -36,7 +36,15 @@
|
||||
<table class="searchable">
|
||||
{% for cave in caves1623 %}
|
||||
|
||||
<tr><td> <a href="{{ cave.url }}">{% if cave.kataster_number %}{{ cave.kataster_number }} {{cave.official_name|safe}}</a> {% if cave.unofficial_number %}({{cave.unofficial_number }}){% endif %}{% else %}{{cave.unofficial_number }} {{cave.official_name|safe}}</a> {% endif %}</td></tr>
|
||||
<tr><td> <a href="{{ cave.url }}">
|
||||
{% if cave.kataster_number %}
|
||||
{{ cave.kataster_number }} {{cave.official_name|safe}}</a>
|
||||
{% if cave.unofficial_number %}
|
||||
({{cave.unofficial_number }})
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{cave.unofficial_number }} {{cave.official_name|safe}}</a>
|
||||
{% endif %}</td></tr>
|
||||
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
@ -13,7 +13,25 @@
|
||||
</ul>
|
||||
{% endif%}</li>
|
||||
<li><a href="/handbook/computing/onlinesystems.html">Online systems</a></li>
|
||||
<li><a href="/caves">Caves</a></li>
|
||||
<li><a href="/caves">Caves</a>
|
||||
{% if parent_caves %}
|
||||
<ul>
|
||||
{% for parent_cave in parent_caves %}
|
||||
<li><a href="/{{ parent_cave.url }}">
|
||||
{% if parent_cave.kataster_number %}
|
||||
{{ parent_cave.kataster_number }} {{parent_cave.official_name|safe}}</a>
|
||||
{% if parent_cave.unofficial_number %}
|
||||
({{parent_cave.unofficial_number }})
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{parent_cave.unofficial_number }} {{parent_cave.official_name|safe}}</a>
|
||||
{% endif %}</li>
|
||||
{% ifequal parent_cave.kataster_number "161" %}
|
||||
<li><a href="/1623/161/names.htm">KH Glossary</a></li>
|
||||
{% endifequal %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif%}</li>
|
||||
<li><a href="/infodx.htm">Site index</a></li>
|
||||
<li><a href="/pubs.htm">Reports</a></li>
|
||||
<li><a href="/guidebook/areas.htm">Areas</a></li>
|
||||
|
Loading…
Reference in New Issue
Block a user