summaryrefslogtreecommitdiff
path: root/archaeological_warehouse/templates/ishtar/sheet_warehouse.html
blob: 61553b839dac7331d0b6a56691816a5e82d9f423 (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
{% 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' item.pk 'TABLE_COLS' output %}
{% endif %}

{% if item.owned_containers.count %}
<h4>{% trans "Attached containers" %}</h4>
{% dynamic_table_document '' 'containers' 'responsible' 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'>
    {% for item in items %}
    <tr>
        <th>{{item.0}}</th>
        <td class="text-right">{{item.1}}</td>
    </tr>
    {% endfor %}
</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'>
    {% for item in items %}
    <tr>
        <th>{{item.0}}</th>
        <td class="text-right">{{item.1}}</td>
    </tr>
    {% endfor %}
</table>
{% endfor %}
{% endif %}

{% endblock %}