From 55bbccb4ca465e57e658b1d68d96e2d79305963a Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Sat, 4 Nov 2023 10:40:46 +0200 Subject: [PATCH] add link to exact logbookentry page --- core/views/logbooks.py | 2 +- core/views/uploads.py | 2 ++ templates/logbookform.html | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/views/logbooks.py b/core/views/logbooks.py index cd39ab653..d9ae44240 100644 --- a/core/views/logbooks.py +++ b/core/views/logbooks.py @@ -229,7 +229,7 @@ def logbookentry(request, date, slug): return render( request, "logbookentry.html", - {"logbookentry": this_logbookentry, "trips": trips, "svxothers": svxothers, "wallets": wallets}, + {"logbookentry": this_logbookentry,"trips": trips, "svxothers": svxothers, "wallets": wallets}, ) else: msg = f' Logbook entry slug:"{slug}" not found in database on date:"{date}" ' diff --git a/core/views/uploads.py b/core/views/uploads.py index 5c035d8d8..fb62dd382 100644 --- a/core/views/uploads.py +++ b/core/views/uploads.py @@ -345,6 +345,7 @@ def logbookedit(request, year=None, slug=None): "tu": tu, "entry": entry, "output": output, + "slug": slug, }, ) # GET here @@ -398,6 +399,7 @@ def logbookedit(request, year=None, slug=None): "tu": tu, "entry": text, "textrows": rows, + "slug": slug, }, ) diff --git a/templates/logbookform.html b/templates/logbookform.html index 1f7602b60..2588b093a 100644 --- a/templates/logbookform.html +++ b/templates/logbookform.html @@ -88,7 +88,9 @@


- Full logbook for this year: Logbook {{year}} + {% if date %}

Link to this entry   {% endif %} + Full logbook for this year: Logbook {{year}} +