-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathsnippet_depotlist_header.html
More file actions
50 lines (50 loc) · 2.39 KB
/
snippet_depotlist_header.html
File metadata and controls
50 lines (50 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{% load juntagrico.depot_extras %}
{% load i18n %}
{% load juntagrico.config %}
<table cellpadding="2" cellspacing="0" repeat="5">
<tr>
<th colspan="3" class="horz-left">{% comment "#TODO: get number of columns from data. workaround: there will be at least 3 columns" %}{% endcomment %}
<h2 class="depot">{{ depot.get_weekday_display }} - {{ depot.name }}</h2>
<h3 class="depotaddr">{{ depot.location.address }} ({% trans "Kontakt" %}: {{ depot.contact.first_name }} {{ depot.contact.last_name }})</h3>
<span class="pickup-details">{% trans "Abholung" %}: {{ depot.pickup_display }}</span>
</th>
</tr>
<tr>
<th class="namecol"></th>
{% for product in products %}
<th colspan="{{ product.sizes_for_depot_list|count }}" class="top-border {% if forloop.first %}left-border{% endif %}">{{ product.name }}
{% if product.description|safe %}<br /><span class="proddescr">{{ product.description }}</span>{% endif %}
</th>
{% endfor %}
<th colspan="2" class="top-border right-border"></th>
</tr>
<tr class="bottom-border">
<td></td>
{% for product in products %}
{% for size in product.sizes_for_depot_list %}
<td class="small bottom-border {% if forloop.first %}left-border{% endif %}">{{ size.name }}</td>
{% empty %}
<td class="small bottom-border left-border"></td>
{% endfor %}
{% endfor %}
<td colspan="2" class="small bottom-border right-border"></td>
</tr>
<tr class="horz-center">
<td class="horz-left">{% trans "TOTAL" %}:</td>
{% for product in products %}
{% for size in product.sizes_for_depot_list %}
<td>{{ subscriptions|by_depot:depot|parts_by_size:size|active_on:date|count }}</td>
{% empty %}
<td></td>
{% endfor %}
{% endfor %}
<td colspan="2" ></td>
</tr>
<tr class="bottom-border horz-center">
<th class="namecol vert-bottom horz-left">{% trans "Name" %}</th>
{% for product in products %}
<th colspan="{{ product.sizes_for_depot_list|count }}"></th>
{% endfor %}
<th class="fontsmall vert-bottom">{% trans "abgeholt" %}</th>
<th class="fontsmall vert-bottom">{% vocabulary "package" %} {% trans "retour" %}</th>
</tr>