blob: ae032a8a4e26d44e39bc5249ca4e4ca1e2bf62d6 (
plain)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
|
{% extends "ishtar/sheet.html" %}
{% load i18n window_header window_field window_tables %}
{% block head_title %}<strong>{% trans "Warehouse" %}</strong> - {{item.name}} ({{item.warehouse_type}}){% endblock %}
{% block toolbar %}
{% window_nav item window_id 'show-warehouse' 'warehouse_modify' '' '' previous next 1 %}
{% endblock %}
{% block content %}
<div class="row">
<div class="offset-lg-4 col-lg-4 offset-md-3 col-md-6 offset-sm-1 col-sm-10 col-12">
<div class="card">
{% include "ishtar/blocks/window_image.html" %}
<div class="card-body">
<p class="card-text">
<p class="window-refs">
<strong>{{ item.name|default:"" }}</strong>
</p>
<p class="window-refs">
{{ item.warehouse_type|default:"" }}
</p>
{% include "ishtar/blocks/sheet_external_id.html" %}
</p>
</div>
</div>
</div>
</div>
<div class='row'>
{% field_flex "Person in charge" item.person_in_charge %}
{% include "ishtar/blocks/sheet_creation_section.html" %}
{% include "ishtar/blocks/sheet_address_section.html" %}
{% field_flex "Divisions" item.location_types|join:", " %}
{% field_flex_full "Comment" item.comment "<pre>" "</pre>" %}
{% include "ishtar/blocks/sheet_json.html" %}
</div>
{% if item.containers.count %}
<h4>{% trans "Containers" %}</h4>
{% dynamic_table_document '' 'containers' 'location_id' item.pk 'TABLE_COLS' output %}
{% endif %}
{% if item.owned_containers.count %}
<h4>{% trans "Attached containers" %}</h4>
{% dynamic_table_document '' 'containers' 'responsible_id' item.pk 'TABLE_COLS' output %}
{% endif %}
<h3>{% trans "Statistics" %}</h3>
<small class="centered"><em>{% trans "These numbers are updated hourly" %}</em></small>
<h4>{% trans "Finds" %}</h4>
<div class='row'>
{% trans "Number of attached finds" as number_of_attached_finds_label %}
{% field_flex_2 number_of_attached_finds_label item.number_of_finds %}
{% trans "Number of hosted finds" as number_of_hosted_finds_label %}
{% field_flex_2 number_of_hosted_finds_label item.number_of_finds_hosted %}
</div>
{% if item.number_of_finds_by_place %}
<h4>{% trans "Finds by location in the warehouse" %}</h4>
{% for items in item.number_of_finds_by_place %}
<table class='table table-striped datatables'
id="{{window_id}}-find-by-loca-{{forloop.counter}}">
<thead>
<tr>{% for location_type in item.location_types %}
<th class="text-center">{{location_type|title}}</th>{% endfor %}
<th class="text-center">{% trans "Total" %}</th>
</tr>
</thead>
<tbody>
{% for item in items %}
<tr>
{% for local in item.0 %}<td>{{local}}</td>{% endfor %}
<td class="text-right">{{item.1}}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endfor %}
{% endif %}
<h4>{% trans "Containers" %}</h4>
<div class='row'>
{% trans "Number of containers" as number_of_containers_label %}
{% field_flex_2 number_of_containers_label item.number_of_containers %}
</div>
{% if item.number_of_containers_by_place %}
<h4>{% trans "Containers by location in the warehouse" %}</h4>
{% for items in item.number_of_containers_by_place %}
<table class='table table-striped datatables'
id="{{window_id}}-container-by-loca-{{forloop.counter}}">
<thead>
<tr>{% for location_type in item.location_types %}
<th class="text-center">{{location_type|title}}</th>{% endfor %}
<th class="text-center">{% trans "Total" %}</th>
</tr>
</thead>
<tbody>
{% for item in items %}
<tr>
{% for local in item.0 %}<td class="text-center">{{local}}</td>{% endfor %}
<td class="text-center">{{item.1}}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endfor %}
{% endif %}
<script type="text/javascript">
$(document).ready( function () {
datatable_options = {
"dom": 'ltip',
};
$.extend(datatable_options, datatables_static_default);
if (datatables_i18n) datatable_options['language'] = datatables_i18n;
$('.datatables').each(
function(){
$("#" + $(this).attr('id')).DataTable(datatable_options);
});
} );
</script>
{% endblock %}
|