From 897ee6089b6e44e38b69388241487f69545205a6 Mon Sep 17 00:00:00 2001 From: David Morris Date: Mon, 19 Aug 2024 17:38:52 +0100 Subject: [PATCH] Adding web side ack page --- cmp/static/cmp/css/base.css | 6 ++++++ cmp/urls.py | 2 +- cmp/views.py | 4 ++++ templates/cmp/acknowledgements.html | 8 ++++---- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/cmp/static/cmp/css/base.css b/cmp/static/cmp/css/base.css index 085c1db..05264ad 100644 --- a/cmp/static/cmp/css/base.css +++ b/cmp/static/cmp/css/base.css @@ -89,6 +89,12 @@ margin-top: 2%; } +.name-column { + width: 15%; /* Adjust this value as needed */ +} +.tasks-column { + width: 85%; /* Adjust this value as needed */ +} .search-input { margin-top: 20px; /* Adjust as needed */ diff --git a/cmp/urls.py b/cmp/urls.py index 9f6ce8c..34f3010 100644 --- a/cmp/urls.py +++ b/cmp/urls.py @@ -21,8 +21,8 @@ path('countries/', views.countries, name='countries'), path('cemeteries/', views.cemeteries, name='cemeteries'), path('pow-camps/', views.powcamps, name='powcamps'), - path('ranks/', views.ranks, name='ranks'), + path('acknowledgements/', views.acknowledgements, name='acknowledgements'), # Mangagement URLs # create an index page for mgmt urls to link to /mgmt/countries diff --git a/cmp/views.py b/cmp/views.py index 10d4b23..dca919d 100644 --- a/cmp/views.py +++ b/cmp/views.py @@ -68,6 +68,10 @@ def ranks(request): ranks = Rank.objects.all() return render(request, 'cmp/ranks.html', {'ranks': ranks}) +def acknowledgements(request): + acknowledgements = Acknowledgement.objects.all() + return render(request, 'cmp/acknowledgements.html', {'acknowledgements': acknowledgements}) + #def index(request): # return render(request, "cmp/index.html") diff --git a/templates/cmp/acknowledgements.html b/templates/cmp/acknowledgements.html index 5f25299..66fcecf 100644 --- a/templates/cmp/acknowledgements.html +++ b/templates/cmp/acknowledgements.html @@ -10,14 +10,14 @@

Acknowledgements

-

Name

-

Tasks

+

Name

+

Tasks

- {% for person in acknowledgements |dictsort:"surname" %} + {% for person in acknowledgements|dictsort:"surname" %} - {{ person.surname }} + {{ person.name }} {{ person.surname }} {{ person.notes }}