From 2cafa32c7ec2c15379c3bab4071e7f235d461f32 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Tue, 18 Oct 2022 23:28:38 +0300 Subject: [PATCH] links to other years wallets --- core/views/scans.py | 3 ++- templates/manywallets.html | 10 ++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/core/views/scans.py b/core/views/scans.py index af26c47..9fd58d6 100644 --- a/core/views/scans.py +++ b/core/views/scans.py @@ -269,5 +269,6 @@ def allscans(request): ''' manywallets = Wallet.objects.all() # NB all of them # manywallets = Wallet.objects.all().prefetch_related('singlescan') fails as the link is defined on 'singlescan' not on 'wallet' - return render(request, 'manywallets.html', { 'manywallets':manywallets, 'settings': settings }) + expeditions = Expedition.objects.all() + return render(request, 'manywallets.html', { 'manywallets':manywallets, 'settings': settings, 'expeditions': expeditions }) diff --git a/templates/manywallets.html b/templates/manywallets.html index 6f08def..bfb2575 100644 --- a/templates/manywallets.html +++ b/templates/manywallets.html @@ -13,10 +13,16 @@ traced to produce Tunnel or Therion drawings and eventually the final complete c otherwise they come from *ref statements in survex files as of the most recent data import.

See also wallets

+
  • per year, +{% for otherexpedition in expeditions %} + {% if otherexpedition == expedition %} + | {{otherexpedition.year}} + {% else %} + | {{otherexpedition.year}} + {% endif %} +{% endfor %}