2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-28 10:02:10 +00:00

fix year menu, fix name display, fix no of entries

This commit is contained in:
Philip Sargent 2024-07-24 21:55:46 +02:00
parent 245486666c
commit 9166b6ed74
3 changed files with 5 additions and 3 deletions

View File

@ -313,6 +313,7 @@ def logbookentry(request, date, slug):
# start = time.time() # start = time.time()
trips = LogbookEntry.objects.filter(date=date) # all the trips not just this one trips = LogbookEntry.objects.filter(date=date) # all the trips not just this one
this_logbookentry = trips.filter(date=date, slug=slug) this_logbookentry = trips.filter(date=date, slug=slug)
year = slug[:4]
if this_logbookentry: if this_logbookentry:
if len(this_logbookentry) > 1: if len(this_logbookentry) > 1:
@ -329,7 +330,8 @@ def logbookentry(request, date, slug):
return render( return render(
request, request,
"logbookentry.html", "logbookentry.html",
{"logbookentry": this_logbookentry,"trips": trips, "svxothers": svxothers, "wallets": wallets}, {"logbookentry": this_logbookentry,"trips": trips,
"svxothers": svxothers, "wallets": wallets, "year": year},
) )
else: else:
msg = f' Logbook entry slug:"{slug}" not found in database on date:"{date}" ' msg = f' Logbook entry slug:"{slug}" not found in database on date:"{date}" '

View File

@ -60,7 +60,7 @@ LOGBOOKS_DIR = "years" # subfolder of settings.EXPOWEB
ENTRIES = { ENTRIES = {
"2024": 41, "2024": 41,
"2023": 91, "2023": 112,
"2022": 94, "2022": 94,
"2019": 55, "2019": 55,
"2018": 95, "2018": 95,

View File

@ -43,7 +43,7 @@ th, td {
{% else %} {% else %}
<td> <td>
{% endif %} {% endif %}
<a href="{{ personlogentry.personexpedition.get_absolute_url }}">{{personlogentry.nickname_used}} ({{personlogentry.personexpedition.person}})</a> <a href="{{ personlogentry.personexpedition.get_absolute_url }}" title="{{personlogentry.personexpedition.person}}">{{personlogentry.nickname_used}} </a>
</td> </td>
<td> <td>