2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-16 22:57:14 +00:00

Put troggle reports menu on troggle handbook pages

This commit is contained in:
2025-01-28 15:38:37 +00:00
parent bac65b5897
commit 11cf61b0a3
6 changed files with 72 additions and 43 deletions

View File

@@ -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,
},
)