From 00ae89ce63912cd63114b1a7f1ad5c893e9363db Mon Sep 17 00:00:00 2001 From: oyvinlek Date: Sun, 6 Mar 2011 20:50:07 +0000 Subject: [PATCH] =?UTF-8?q?Alle=20hyllekart=20vises=20n=C3=A5=20p=C3=A5=20?= =?UTF-8?q?=C3=A9n=20og=20samme=20side.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Denne visningen erstatter den tidligere listen over hyllekart. Visning av enkelthyller er fortsatt tilgjengelig, men lenkes ikke til. --- python/web/library/views.py | 4 +++- python/web/templates/map/index.html | 23 ++++++++++++++++++----- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/python/web/library/views.py b/python/web/library/views.py index fd2b131..a1eee0f 100644 --- a/python/web/library/views.py +++ b/python/web/library/views.py @@ -58,7 +58,9 @@ def PersonIndex(request): return render_to_response('person/index.html', {'persons': Person.objects.all().order_by('last_name')}) def MapIndex(request): - return render_to_response('map/index.html', {'shelves': Placement.get_all_shelves()}) + shelves = Placement.get_all_shelves() + shelf_lists = [(shelf, Placement.shelf_as_list_row_then_col(shelf)) for shelf in shelves] + return render_to_response('map/index.html', {'shelf_lists': shelf_lists}) def MapView(request,shelf_identifier): if shelf_identifier not in Placement.get_all_shelves(): diff --git a/python/web/templates/map/index.html b/python/web/templates/map/index.html index c5700c8..3670d7a 100644 --- a/python/web/templates/map/index.html +++ b/python/web/templates/map/index.html @@ -4,12 +4,25 @@ Hyllekart {% endblock %} + {% block content %} -

Hyller

-