mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-15 18:57:13 +00:00
Put troggle reports menu on troggle handbook pages
This commit is contained in:
@@ -228,7 +228,7 @@ def expowebpage(request, expowebpath, path):
|
||||
else:
|
||||
editable = os.access(expowebpath / path, os.W_OK) # are file permissions writeable?
|
||||
# print(f"EDITABLE ? {editable}\n{head}")
|
||||
has_menu = False
|
||||
has_menu = False # this is the old-style AERW-era hand-coded menu on each individual page
|
||||
menumatch = re.match(r'(.*)<ul id="links">', body, re.DOTALL + re.IGNORECASE)
|
||||
if menumatch:
|
||||
has_menu = False
|
||||
@@ -248,8 +248,8 @@ def expowebpage(request, expowebpath, path):
|
||||
else:
|
||||
year = None
|
||||
|
||||
# Determine if this page is part of the handbook
|
||||
handbook = path.startswith("handbook")
|
||||
# Determine if this page is part of the troggle handbook
|
||||
troggle = path.startswith("handbook/troggle")
|
||||
|
||||
return render(
|
||||
request,
|
||||
@@ -262,8 +262,8 @@ def expowebpage(request, expowebpath, path):
|
||||
"homepage": (path == "index.htm"),
|
||||
"has_menu": has_menu,
|
||||
"year": year,
|
||||
"handbook": handbook,
|
||||
"parent_caves": parent_caves,
|
||||
"troggle": troggle,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
@@ -25,46 +25,20 @@
|
||||
<a href="/">Home</a> |
|
||||
<a id="cuccLink" href="http://camcaving.uk/">CUCC</a> |
|
||||
<a id="expoWebsiteLink" href="http://expo.survex.com">expo.survex</a> |
|
||||
<a id="handbook" href="/handbook/computing/onlinesystems.html">Handbook</a> |
|
||||
{% if user.username %}User:{{ user.username }}
|
||||
{% if user.person %}(<a href="{{ user.person.get_absolute_url }}">{{ user.person }}</a>){% endif %}
|
||||
| <a href='/accounts/logout/'>Log out</a> {% else %} <a href='/accounts/register/'>Register</a> | <a href='/accounts/login/'>Log in</a> {% endif %}
|
||||
<a id="handbook" href="/handbook/index.htm">Handbook</a> |
|
||||
{% if user.person %}User:(<a href="{{ user.person.get_absolute_url }}">{{ user.person }}</a>)
|
||||
| <a href='/accounts/logout/'>Log out</a>
|
||||
{% elif user.username %}User:{{ user.username }}
|
||||
| <a href='/accounts/logout/'>Log out</a>
|
||||
{% else %}
|
||||
| <a href='/accounts/login/'>Log in</a>
|
||||
{% endif %}
|
||||
| <a href='/accounts/register/'>Register</a>
|
||||
{% endblock%}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% if settings.DEVSERVER %}
|
||||
<div class="toolbarlinkslocal">
|
||||
{% else %}
|
||||
<div class="toolbarlinks">
|
||||
{% endif %}
|
||||
<a href="/logbookedit/">Logbook Entry</a> |
|
||||
<!--<a href="/1626/359/359.html">359 (HC)</a> |-->
|
||||
<a id="cavesLink" href="/caves">Caves</a> |
|
||||
<a id="qmsLink" href="{% url "caveQMs" "1623-290" %}">QMs</a> |
|
||||
<a href="/survexfile/">Survex</a> |
|
||||
<a href="{% url "survexcaveslist" %}">All Survex</a> |
|
||||
<a href="{% url "allscans" %}">Scans</a> |
|
||||
<a href="{% url "walletedit" %}">Upload Scans</a> |
|
||||
<a href="{% url "dwgallfiles" %}">Drawings</a> |
|
||||
<a href="{% url "dwgupload" %}">Upload Drawings</a> |
|
||||
<a href="{% url "photoupload" %}">Upload Photos</a> |
|
||||
<a href="{% url "gpxupload" %}">Upload GPX</a> |
|
||||
|
||||
<br>
|
||||
|
||||
<a href="{% url "dataissues" %}">Data Issues</a> |
|
||||
<a href="/handbook/computing/todo-data.html">tasks to do </a> |
|
||||
<a id="entsLink" href="{% url "entranceindex" %}">ents</a> |
|
||||
<a id="folklink" href="/folk">expoers</a> |
|
||||
<a id="caversLink" href="{% url "notablepersons" %}">survey lengths</a> |
|
||||
<a href="{% url "stats" %}">statistics</a> |
|
||||
<a href="/survexfilewild/{{current_year}}">Wild Survex({{current_year}})</a> |
|
||||
<a href="/wallets/year/{{current_year}}">Wallets({{current_year}})</a> |
|
||||
<a href="{% url "expedition" current_year %}">Expo({{current_year}})</a> |
|
||||
<a href="{% url "controlpanel" %}">Control panel</a> |
|
||||
|
||||
</div>
|
||||
|
||||
<div id="nav">
|
||||
{% block nav %}
|
||||
@@ -81,6 +55,7 @@
|
||||
{% block related %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% include 'troggletoolbar.html' %}
|
||||
{% block content %}
|
||||
REPLACE : The content
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<!-- expobase.html - this text visible because this template has been included -->
|
||||
{% autoescape off %}
|
||||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<script>document.interestCohort = null;</script> <!-- Turn off Google FLoC -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
@@ -9,6 +10,9 @@
|
||||
{% block extrahead %}{% endblock %}
|
||||
</head>
|
||||
<body {% block bodyattrs %}{% endblock %}>
|
||||
{% if troggle %}
|
||||
{% include 'troggletoolbar.html' %}
|
||||
{% endif %}
|
||||
{% block body %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -2,8 +2,24 @@
|
||||
{% extends "expobase.html" %}
|
||||
{% block title %}{{ title }}{% endblock %}
|
||||
{% block bodyattrs %}{% if homepage %} id="homepage"{% endif %}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% if troggle %}
|
||||
<style>
|
||||
h2#tophead {
|
||||
margin-top: 5px;
|
||||
margin-bottom: 20px;
|
||||
margin-right: -22px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
h1 {
|
||||
margin-top: 30px;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
{% endif %}
|
||||
{{ body|safe }}
|
||||
|
||||
{% if homepage %}
|
||||
{% if editable %}
|
||||
<a href="{% url "editexpopage" path %}">Edit</a>
|
||||
@@ -12,7 +28,9 @@
|
||||
{% if not has_menu %}
|
||||
{% include "menu.html" %}
|
||||
{% else %}
|
||||
{% if editable %}<li><a href="{% url "editexpopage" path %}" class="editlink"><strong>Edit this Page</strong></a></li>{% endif %}
|
||||
{% if editable %}
|
||||
<li><a href="{% url "editexpopage" path %}" class="editlink"><strong>Edit this Page</strong></a></li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -47,8 +47,7 @@
|
||||
<ul><li><a href="/years/{{current_year}}">{{ year }}</a></li></ul>
|
||||
{% endif %}
|
||||
<!--<li><a href="/guidebook/areas.htm">Areas</a></li>-->
|
||||
<li><a href="/expedition/{{current_year}}">Troggle</a></li>
|
||||
<li><a href="/handbook/troggle/training/trogbegin.html"><span style="color:red">Self-training</span></a></li>
|
||||
<li><a href="/handbook/troggle/training/trogbegin.html">Troggle</a></li>
|
||||
|
||||
<li><form name=P method=get action="/search" target="_top">
|
||||
<input id="omega-autofocus" type=search name=P size=8 autofocus>
|
||||
|
||||
33
templates/troggletoolbar.html
Normal file
33
templates/troggletoolbar.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<link rel="stylesheet" type="text/css" href="{{ settings.MEDIA_URL }}css/trog3.css" title="troggle-style"/>
|
||||
{% if settings.DEVSERVER %}
|
||||
<div class="toolbarlinkslocal">
|
||||
{% else %}
|
||||
<div class="toolbarlinks">
|
||||
{% endif %}
|
||||
<a href="/logbookedit/">Logbook Entry</a> |
|
||||
<!--<a href="/1626/359/359.html">359 (HC)</a> |-->
|
||||
<a id="cavesLink" href="/caves">Caves</a> |
|
||||
<a id="qmsLink" href="{% url "caveQMs" "1623-290" %}">QMs</a> |
|
||||
<a href="/survexfile/">Survex</a> |
|
||||
<a href="{% url "survexcaveslist" %}">All Survex</a> |
|
||||
<a href="{% url "allscans" %}">Scans</a> |
|
||||
<a href="{% url "walletedit" %}">Upload Scans</a> |
|
||||
<a href="{% url "dwgallfiles" %}">Drawings</a> |
|
||||
<a href="{% url "dwgupload" %}">Upload Drawings</a> |
|
||||
<a href="{% url "photoupload" %}">Upload Photos</a> |
|
||||
<a href="{% url "gpxupload" %}">Upload GPX</a> |
|
||||
|
||||
<br>
|
||||
|
||||
<a href="{% url "dataissues" %}">Data Issues</a> |
|
||||
<a href="/handbook/computing/todo-data.html">tasks to do </a> |
|
||||
<a id="entsLink" href="{% url "entranceindex" %}">ents</a> |
|
||||
<a id="folklink" href="/folk">expoers</a> |
|
||||
<a id="caversLink" href="{% url "notablepersons" %}">survey lengths</a> |
|
||||
<a href="{% url "stats" %}">statistics</a> |
|
||||
<a href="/survexfilewild/{{current_year}}">Wild Survex({{current_year}})</a> |
|
||||
<a href="/wallets/year/{{current_year}}">Wallets({{current_year}})</a> |
|
||||
<a href="/expedition/{{current_year}}">Expo({{current_year}})</a> |
|
||||
<a href="{% url "controlpanel" %}">Control panel</a> |
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user