summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-01-29 15:32:36 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2018-01-29 15:32:36 +0100
commitd4d0906965030c1f9b01d274de772c4f52d12644 (patch)
tree6b18ca48c86a4449c3c51755d313034c2557a22b
parent0700910c30f32e27df915f43e78fa4f349ad5b88 (diff)
downloadIshtar-d4d0906965030c1f9b01d274de772c4f52d12644.tar.bz2
Ishtar-d4d0906965030c1f9b01d274de772c4f52d12644.zip
Dashboard: fix display for operation and files
-rw-r--r--archaeological_files/templates/ishtar/dashboards/dashboard_file.html44
-rw-r--r--archaeological_operations/templates/ishtar/dashboards/dashboard_operation.html68
-rw-r--r--ishtar_common/static/media/styles.css15
3 files changed, 75 insertions, 52 deletions
diff --git a/archaeological_files/templates/ishtar/dashboards/dashboard_file.html b/archaeological_files/templates/ishtar/dashboards/dashboard_file.html
index a1462698c..127c9f2f8 100644
--- a/archaeological_files/templates/ishtar/dashboards/dashboard_file.html
+++ b/archaeological_files/templates/ishtar/dashboards/dashboard_file.html
@@ -9,15 +9,23 @@
<h3>{% trans "Global informations" %}</h3>
<div>
- <p><label>{% trans "Total:" %}</label> <span class='value numeric'>{{dashboard.total_number|intcomma}}</span></p>
- {% for type in dashboard.types %}
- <p><label>{{type.file_type__label}}{% trans ":"%}</label> <span class='value numeric'>{{type.number|intcomma}}</span></p>
+ <table class="table table-striped">
+ <tr>
+ <th>{% trans "Total" %}</th>
+ <td>{{dashboard.total_number|intcomma}}</td>
+ </tr>
+ {% for type in dashboard.types %}
+ <tr>
+ <th>{{type.file_type__label}}</th>
+ <td>{{type.number|intcomma}}</td>
+ </tr>
{% endfor %}
+ </table>
<div class='clean-table'>
<h4>{% trans "by year"%}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
{% for year in dashboard.by_year %}<th>{% if year.date.year %}{{year.date.year}}{% else %}{% trans "no year" %}{% endif %}</th>{% endfor %}
</tr>
@@ -30,7 +38,7 @@
<div class='clean-table'>
<h4>{% trans "by month"%}</h4>
- <table>
+ <table class="table table-striped">
<tr>
{% for month in dashboard.by_month %}<th>{{month.date|date:"N Y"|capfirst}}</th>{% endfor %}
</tr>
@@ -47,7 +55,7 @@
<p><label>{% trans "Total:" %}</label><span class='value numeric'>{{dashboard.research.total_number|intcomma}}</span></p>
<div class='clean-table'>
<h4>{% trans "by year"%}</h4>
- <table>
+ <table class="table table-striped">
<tr>
{% for year in dashboard.research.by_year %}<th>{{year.date.year}}</th>{% endfor %}
</tr>
@@ -59,7 +67,7 @@
<div class='clean-table'>
<h4>{% trans "by month"%}</h4>
- <table>
+ <table class="table table-striped">
<tr>
{% for month in dashboard.research.by_month %}<th>{{month.date|date:"F Y"|capfirst}}</th>{% endfor %}
</tr>
@@ -71,7 +79,7 @@
<div class='clean-table'>
<h4>{% trans "by department"%}</h4>
- <table>
+ <table class="table table-striped">
<tr>
{% for dpt in dashboard.research.by_dpt %}<th>{{dpt.department__label}}</th>{% endfor %}
</tr>
@@ -84,7 +92,7 @@
<div class='clean-table'>
<h4>{% trans "main towns"%}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
{% for town in dashboard.research.towns %}<th>{{town.town__name}}</th>{% endfor %}
</tr>
@@ -104,7 +112,7 @@
<div class='clean-table'>
<h4>{% trans "by saisine type"%}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
{% for saisine in dashboard.rescue.saisine %}<th>{{saisine.saisine_type__label}}</th>{% endfor %}
</tr>
@@ -118,7 +126,7 @@
<div class='clean-table'>
<h4>{% trans "by administrative act"%}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
{% for act in dashboard.rescue.administrative_act %}<th>{{act.act_type__label}}</th>{% endfor %}
</tr>
@@ -132,7 +140,7 @@
<div class='clean-table'>
<h4>{% trans "by year"%}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
{% for year in dashboard.rescue.by_year %}<th>{{year.date.year}}</th>{% endfor %}
</tr>
@@ -146,7 +154,7 @@
<div class='clean-table'>
<h4>{% trans "by month"%}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
{% for month in dashboard.rescue.by_month %}<th>{{month.date|date:"F Y"|capfirst}}</th>{% endfor %}
</tr>
@@ -163,7 +171,7 @@
<div class='clean-table'>
<h4>{% trans "archaeological files linked to at least one operation (%)"%}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
{% for year in dashboard.rescue.operational_by_year %}<th>{{year.date.year}}</th>{% endfor %}
</tr>
@@ -177,7 +185,7 @@
<div class='clean-table'>
<h4>{% trans "by department"%}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
{% for dpt in dashboard.rescue.by_dpt %}<th>{{dpt.department__label}}</th>{% endfor %}
</tr>
@@ -191,7 +199,7 @@
<div class='clean-table'>
<h4>{% trans "surface by department (ha)"%}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
{% for dpt in dashboard.rescue.surface_by_dpt %}<th>{{dpt.department__label}}</th>{% endfor %}
</tr>
@@ -205,7 +213,7 @@
<div class='clean-table'>
<h4>{% trans "main towns by number"%}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
{% for town in dashboard.rescue.towns %}<th>{{town.town__name}}</th>{% endfor %}
</tr>
@@ -219,7 +227,7 @@
<div class='clean-table'>
<h4>{% trans "main towns by surface (ha)"%}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
{% for town in dashboard.rescue.surface_by_town %}<th>{{town.town__name}}</th>{% endfor %}
</tr>
diff --git a/archaeological_operations/templates/ishtar/dashboards/dashboard_operation.html b/archaeological_operations/templates/ishtar/dashboards/dashboard_operation.html
index 5b435032e..19302cd05 100644
--- a/archaeological_operations/templates/ishtar/dashboards/dashboard_operation.html
+++ b/archaeological_operations/templates/ishtar/dashboards/dashboard_operation.html
@@ -13,7 +13,7 @@
<div class='clean-table'>
<h4>{% trans "total" %}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
<th>{% trans "Status" %}</th><th>{% trans "Number" %}</th>
</tr>
@@ -27,7 +27,7 @@
<div class='clean-table'>
<h4>{% trans "area by type of operation" %}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
<th>{% trans "Status" %}</th><th>{% trans "Area (ha)" %}</th>
</tr>
@@ -41,7 +41,7 @@
<div class='clean-table'>
<h4>{% trans "by types" %}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
{% for typ in dashboard.types %}
{% if forloop.counter0|divisibleby:5 %}
@@ -63,7 +63,7 @@
<div class='clean-table'>
<h4>{% trans "by year" %}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
{% for yr in dashboard.years %}
{% if forloop.counter0|divisibleby:5 %}
@@ -85,7 +85,7 @@
<div class='clean-table'>
<h4>{% trans "by realisation year" %}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
{%for yr in dashboard.realisation_years %}
{% if forloop.counter0|divisibleby:5 %}
@@ -107,7 +107,7 @@
<div class='clean-table'>
<h4>{% trans "effective operation by type and year" %}</h4>
<div class='clean-table-wrap'>
- <table class='mini-table'>
+ <table class='mini-table table table-striped'>
{% for lbl, years in dashboard.effective %}
{% if forloop.counter0|divisibleby:6 %}
@@ -132,7 +132,7 @@
<div class='clean-table'>
<h4>{% trans "by realisation month" %}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
{%for mt in dashboard.last_months %}
{% if forloop.counter0|divisibleby:5 %}
@@ -159,7 +159,7 @@
<div class='clean-table'>
<h4>{% trans "total" %}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
<th>{% trans "Status" %}</th><th>{% trans "Number" %}</th>
</tr>
@@ -173,7 +173,7 @@
<div class='clean-table'>
<h4>{% trans "by year" %}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
{%for yr in dashboard.years %}
{% if forloop.counter0|divisibleby:5 %}
@@ -195,7 +195,7 @@
<div class='clean-table'>
<h4>{% trans "by realisation year" %}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
{%for yr in dashboard.realisation_years %}
{% if forloop.counter0|divisibleby:5 %}
@@ -217,7 +217,7 @@
<div class='clean-table'>
<h4>{% trans "current year" %}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
<th></th>{% for lbl in dashboard.filters_label %}<th>{{lbl}}</th>{%endfor%}
</tr>
@@ -235,7 +235,7 @@
<div class='clean-table'>
<h4>{% trans "organizations (current year)" %}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
<th>&nbsp;</th><th>{% trans "Area" %}</th><th>{% trans "Man-day" %}</th><th>{% trans "Man-day/hectare" %}</th>
</tr>
@@ -249,7 +249,7 @@
<div class='clean-table'>
<h4>{% trans "current realisation year" %}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
<th>{% trans "Status" %}</th>{% for lbl in dashboard.filters_label %}<th>{{lbl}}</th>{%endfor%}
</tr>
@@ -269,7 +269,7 @@
<div class='clean-table'>
<h4>{% trans "organizations (current realisation year)" %}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
<th>&nbsp;</th><th>{% trans "Area" %}</th><th>{% trans "Man-day" %}</th><th>{% trans "Man-day/hectare" %}</th>
</tr>
@@ -282,7 +282,7 @@
<div class='clean-table'>
<h4>{% trans "area by organization by year" %}</h4>
<div class='clean-table-wrap'>
- <table class='mini-table'>
+ <table class='mini-table table table-striped'>
<tr>
</tr>
{% for org, vals in dashboard.survey.org_by_year %}
@@ -314,7 +314,7 @@
<div class='clean-table'>
<h4>{% trans "effective operations areas (ha)" %}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
{%for yr in dashboard.years %}
{% if forloop.counter0|divisibleby:5 %}
@@ -337,7 +337,7 @@
<div class='clean-table'>
<h4>{% trans "man-days/hectare by year" %}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
{%for yr in dashboard.years %}
{% if forloop.counter0|divisibleby:5 %}
@@ -362,7 +362,7 @@
<div class='clean-table'>
<h4>{% trans "by month" %}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
{% for mt in dashboard.last_months %}
{% if forloop.counter0|divisibleby:5 %}
@@ -383,7 +383,7 @@
<div class='clean-table'>
<h4>{% trans "by department" %}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
{% for yr in dashboard.years %}
{% if forloop.counter0|divisibleby:5 %}
@@ -404,7 +404,7 @@
<div class='clean-table'>
<h4>{% trans "effective operation by department" %}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
{% for yr in dashboard.years %}
{% if forloop.counter0|divisibleby:4 %}
@@ -427,7 +427,7 @@
<div class='clean-table'>
<h4>{% trans "main towns by number" %}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
<th>{% trans "Town" %}</th><th>{% trans "Number" %}</th>
</tr>
@@ -441,7 +441,7 @@
<div class='clean-table'>
<h4>{% trans "main towns by surface" %}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
<th>{% trans "Town" %}</th><th>{% trans "Total surface (ha)" %}</th>
</tr>
@@ -458,7 +458,7 @@
<div class='clean-table'>
<h4>{% trans "total" %}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
<th>{% trans "Status" %}</th><th>{% trans "Number" %}</th>
</tr>
@@ -472,7 +472,7 @@
<div class='clean-table'>
<h4>{% trans "by year" %}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
{%for yr in dashboard.years %}
{% if forloop.counter0|divisibleby:5 %}
@@ -492,7 +492,7 @@
<div class='clean-table'>
<h4>{% trans "by realisation year" %}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
{% for yr in dashboard.realisation_years %}
{% if forloop.counter0|divisibleby:5 %}
@@ -512,7 +512,7 @@
<div class='clean-table'>
<h4>{% trans "current realisation year" %}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
<th>{% trans "Status" %}</th>{% for lbl in dashboard.filters_label %}<th>{{lbl}}</th>{%endfor%}
</tr>
@@ -532,7 +532,7 @@
<div class='clean-table'>
<h4>{% trans "organizations (current realisation year)" %}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
<th>&nbsp;</th><th>{% trans "Area" %}</th><th>{% trans "Man-day" %}</th><th>{% trans "Man-day/hectare" %}</th>
</tr>
@@ -546,7 +546,7 @@
<div class='clean-table'>
<h4>{% trans "area by organization by year" %}</h4>
<div class='clean-table-wrap'>
- <table class='mini-table'>
+ <table class='mini-table table table-striped'>
{% for org, vals in dashboard.excavation.org_by_year %}
{% if forloop.counter0|divisibleby:5 %}
<tr>
@@ -580,7 +580,7 @@
<div class='clean-table'>
<h4>{% trans "area by organization by realisation year" %}</h4>
<div class='clean-table-wrap'>
- <table class='mini-table'>
+ <table class='mini-table table table-striped'>
{% for org, vals in dashboard.excavation.org_by_year %}
{% if forloop.counter0|divisibleby:5 %}
@@ -616,7 +616,7 @@
<div class='clean-table'>
<h4>{% trans "by month" %}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
{% for mt in dashboard.last_months %}
{% if forloop.counter0|divisibleby:5 %}
@@ -636,7 +636,7 @@
<div class='clean-table'>
<h4>{% trans "by department" %}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
{% for yr in dashboard.years %}
{% if forloop.counter0|divisibleby:5 %}
@@ -657,7 +657,7 @@
<div class='clean-table'>
<h4>{% trans "effective operation by department" %}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
{% for yr in dashboard.years %}
{% if forloop.counter0|divisibleby:3 %}
@@ -682,7 +682,7 @@
<div class='clean-table'>
<h4>{% trans "main towns by number" %}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
<th>{% trans "Town" %}</th><th>{% trans "Number" %}</th>
</tr>
@@ -696,7 +696,7 @@
<div class='clean-table'>
<h4>{% trans "main towns by cost" %}</h4>
<div class='clean-table-wrap'>
- <table>
+ <table class="table table-striped">
<tr>
<th>{% trans "Town" %}</th><th>{% trans "Cost (euros)" %}</th>
</tr>
diff --git a/ishtar_common/static/media/styles.css b/ishtar_common/static/media/styles.css
index 46a1b556a..6ff286c41 100644
--- a/ishtar_common/static/media/styles.css
+++ b/ishtar_common/static/media/styles.css
@@ -131,11 +131,22 @@ div#foot{
font-size: 0.9em;
}
+.clean-table h4,
.sheet h4, .sheet h3{
text-align: center;
text-shadow: 2px 2px 2px rgba(150, 150, 150, 0.70);
}
+.clean-table h4{
+ margin-top: 1em;
+}
+
+.mini-table{
+ height: 500px;
+ overflow: auto;
+ display: block;
+}
+
.sheet h4{
text-shadow: 2px 2px 2px rgba(150, 150, 150, 0.45);
}
@@ -203,6 +214,10 @@ table.dataTable thead th, table.dataTable thead td {
display: none;
}
+.clean-table-wrap{
+ overflow-x: auto;
+}
+
/* à adapter */
#message,
#message div{