Alle hyllekart vises nå på én og samme side.
Denne visningen erstatter den tidligere listen over hyllekart. Visning av enkelthyller er fortsatt tilgjengelig, men lenkes ikke til.
This commit is contained in:
parent
6782053f3c
commit
00ae89ce63
@ -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():
|
||||
|
@ -4,12 +4,25 @@
|
||||
Hyllekart
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<h2>Hyller</h2>
|
||||
<ul>
|
||||
{% for shelf_name in shelves %}
|
||||
<li><a href="/kart/{{ shelf_name }}">{{ shelf_name }}</a></li>
|
||||
{% for shelf in shelf_lists %}
|
||||
<table border="1">
|
||||
{% for row in shelf.1 %}
|
||||
<tr>
|
||||
{% for column in row %}
|
||||
<td>
|
||||
<table>
|
||||
{% for category in column %}
|
||||
<tr><td><a href="/kategori/{{ category.id }}">{{ category }}</a></td></tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</table>
|
||||
<li><a href="/kart/{{ shelf_name }}">{{ shelf_name }}</a></li>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
|
Reference in New Issue
Block a user