summaryrefslogtreecommitdiff
path: root/archaeological_warehouse/templates
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2020-09-30 19:05:12 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2021-02-28 12:15:20 +0100
commitb0b9cb123f9dfcc2584e80eef5fdfb77af24cacd (patch)
tree85df1e328015c57cc064e8ccdae78cf0e1a4e72d /archaeological_warehouse/templates
parentcf38e81844d6828825c0cf5810cc9186b58174f9 (diff)
downloadIshtar-b0b9cb123f9dfcc2584e80eef5fdfb77af24cacd.tar.bz2
Ishtar-b0b9cb123f9dfcc2584e80eef5fdfb77af24cacd.zip
Stats: generation on demand
Diffstat (limited to 'archaeological_warehouse/templates')
-rw-r--r--archaeological_warehouse/templates/ishtar/sheet_container.html22
-rw-r--r--archaeological_warehouse/templates/ishtar/sheet_warehouse.html19
2 files changed, 36 insertions, 5 deletions
diff --git a/archaeological_warehouse/templates/ishtar/sheet_container.html b/archaeological_warehouse/templates/ishtar/sheet_container.html
index 336684bc8..7ca39645d 100644
--- a/archaeological_warehouse/templates/ishtar/sheet_container.html
+++ b/archaeological_warehouse/templates/ishtar/sheet_container.html
@@ -154,7 +154,23 @@
role="tabpanel" aria-labelledby="{{window_id}}-stats-tab">
<h3>{% trans "Statistics" %}</h3>
- <small class="centered"><em>{% trans "These numbers are updated hourly" %}</em></small>
+ <div class="row mt-2 mb-2">
+ <div class="col">
+ <div class="btn-group btn-group-sm" role="group"
+ aria-label="{% trans 'Export' %}">
+ <a class="btn btn-success"
+ onclick="long_wait();return true;"
+ href="{% url 'generate-stats-container' item.pk %}">
+
+ {% trans "Regenerate statistics" %}
+ </a>
+ </div>
+ {% with item.last_stats_update as last_stats_update%}
+ {% if last_stats_update %}<small class="ml-2">
+ <em>{% trans "Last update:" %} {{last_stats_update}}</em>
+ </small>{% endif %}{% endwith %}
+ </div>
+ </div>
{% if not item.number_containers and not item.number_divisions %}
<div class="alert alert-info">
@@ -188,10 +204,8 @@
{% endif %}
{% endfor %}
- <h4>{% trans "Containers" %}</h4>
-
{% if item.number_of_containers_by_place %}
- <h4>{% trans "Containers by location in the warehouse" %}</h4>
+ <h4>{% trans "Containers by location" %}</h4>
{% for items in item.number_of_containers_by_place %}
{% if items %}
<table class='table table-striped datatables'
diff --git a/archaeological_warehouse/templates/ishtar/sheet_warehouse.html b/archaeological_warehouse/templates/ishtar/sheet_warehouse.html
index e6717f230..b4786de5b 100644
--- a/archaeological_warehouse/templates/ishtar/sheet_warehouse.html
+++ b/archaeological_warehouse/templates/ishtar/sheet_warehouse.html
@@ -136,7 +136,24 @@
<div class="tab-pane fade" id="{{window_id}}-stats"
role="tabpanel" aria-labelledby="{{window_id}}-stats-tab">
<h3>{% trans "Statistics" %}</h3>
- <small class="centered"><em>{% trans "These numbers are updated hourly" %}</em></small>
+
+ <div class="row mt-2 mb-2">
+ <div class="col">
+ <div class="btn-group btn-group-sm" role="group"
+ aria-label="{% trans 'Export' %}">
+ <a class="btn btn-success"
+ onclick="long_wait();return true;"
+ href="{% url 'generate-stats-warehouse' item.pk %}">
+
+ {% trans "Regenerate statistics" %}
+ </a>
+ </div>
+ {% with item.last_stats_update as last_stats_update%}
+ {% if last_stats_update %}<small class="ml-2">
+ <em>{% trans "Last update:" %} {{last_stats_update}}</em>
+ </small>{% endif %}{% endwith %}
+ </div>
+ </div>
{% if not item.number_containers and not item.number_divisions %}
<div class="alert alert-info">