From de4c4369cf5f0d31372d0f798c7042ddcdffbe08 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 29 Jan 2018 15:32:36 +0100 Subject: Dashboard: fix display for operation and files --- .../ishtar/dashboards/dashboard_file.html | 44 ++++++++------ .../ishtar/dashboards/dashboard_operation.html | 68 +++++++++++----------- ishtar_common/static/media/styles.css | 15 +++++ 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 @@

{% trans "Global informations" %}

-

{{dashboard.total_number|intcomma}}

- {% for type in dashboard.types %} -

{{type.number|intcomma}}

+ + + + + + {% for type in dashboard.types %} + + + + {% endfor %} +
{% trans "Total" %}{{dashboard.total_number|intcomma}}
{{type.file_type__label}}{{type.number|intcomma}}

{% trans "by year"%}

- +
{% for year in dashboard.by_year %}{% endfor %} @@ -30,7 +38,7 @@

{% trans "by month"%}

-
{% if year.date.year %}{{year.date.year}}{% else %}{% trans "no year" %}{% endif %}
+
{% for month in dashboard.by_month %}{% endfor %} @@ -47,7 +55,7 @@

{{dashboard.research.total_number|intcomma}}

{% trans "by year"%}

-
{{month.date|date:"N Y"|capfirst}}
+
{% for year in dashboard.research.by_year %}{% endfor %} @@ -59,7 +67,7 @@

{% trans "by month"%}

-
{{year.date.year}}
+
{% for month in dashboard.research.by_month %}{% endfor %} @@ -71,7 +79,7 @@

{% trans "by department"%}

-
{{month.date|date:"F Y"|capfirst}}
+
{% for dpt in dashboard.research.by_dpt %}{% endfor %} @@ -84,7 +92,7 @@

{% trans "main towns"%}

-
{{dpt.department__label}}
+
{% for town in dashboard.research.towns %}{% endfor %} @@ -104,7 +112,7 @@

{% trans "by saisine type"%}

-
{{town.town__name}}
+
{% for saisine in dashboard.rescue.saisine %}{% endfor %} @@ -118,7 +126,7 @@

{% trans "by administrative act"%}

-
{{saisine.saisine_type__label}}
+
{% for act in dashboard.rescue.administrative_act %}{% endfor %} @@ -132,7 +140,7 @@

{% trans "by year"%}

-
{{act.act_type__label}}
+
{% for year in dashboard.rescue.by_year %}{% endfor %} @@ -146,7 +154,7 @@

{% trans "by month"%}

-
{{year.date.year}}
+
{% for month in dashboard.rescue.by_month %}{% endfor %} @@ -163,7 +171,7 @@

{% trans "archaeological files linked to at least one operation (%)"%}

-
{{month.date|date:"F Y"|capfirst}}
+
{% for year in dashboard.rescue.operational_by_year %}{% endfor %} @@ -177,7 +185,7 @@

{% trans "by department"%}

-
{{year.date.year}}
+
{% for dpt in dashboard.rescue.by_dpt %}{% endfor %} @@ -191,7 +199,7 @@

{% trans "surface by department (ha)"%}

-
{{dpt.department__label}}
+
{% for dpt in dashboard.rescue.surface_by_dpt %}{% endfor %} @@ -205,7 +213,7 @@

{% trans "main towns by number"%}

-
{{dpt.department__label}}
+
{% for town in dashboard.rescue.towns %}{% endfor %} @@ -219,7 +227,7 @@

{% trans "main towns by surface (ha)"%}

-
{{town.town__name}}
+
{% for town in dashboard.rescue.surface_by_town %}{% endfor %} 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 @@

{% trans "total" %}

-
{{town.town__name}}
+
@@ -27,7 +27,7 @@

{% trans "area by type of operation" %}

-
{% trans "Status" %}{% trans "Number" %}
+
@@ -41,7 +41,7 @@

{% trans "by types" %}

-
{% trans "Status" %}{% trans "Area (ha)" %}
+
{% for typ in dashboard.types %} {% if forloop.counter0|divisibleby:5 %} @@ -63,7 +63,7 @@

{% trans "by year" %}

-
+
{% for yr in dashboard.years %} {% if forloop.counter0|divisibleby:5 %} @@ -85,7 +85,7 @@

{% trans "by realisation year" %}

-
+
{%for yr in dashboard.realisation_years %} {% if forloop.counter0|divisibleby:5 %} @@ -107,7 +107,7 @@

{% trans "effective operation by type and year" %}

-
+
{% for lbl, years in dashboard.effective %} {% if forloop.counter0|divisibleby:6 %} @@ -132,7 +132,7 @@

{% trans "by realisation month" %}

-
+
{%for mt in dashboard.last_months %} {% if forloop.counter0|divisibleby:5 %} @@ -159,7 +159,7 @@

{% trans "total" %}

-
+
@@ -173,7 +173,7 @@

{% trans "by year" %}

-
{% trans "Status" %}{% trans "Number" %}
+
{%for yr in dashboard.years %} {% if forloop.counter0|divisibleby:5 %} @@ -195,7 +195,7 @@

{% trans "by realisation year" %}

-
+
{%for yr in dashboard.realisation_years %} {% if forloop.counter0|divisibleby:5 %} @@ -217,7 +217,7 @@

{% trans "current year" %}

-
+
{% for lbl in dashboard.filters_label %}{%endfor%} @@ -235,7 +235,7 @@

{% trans "organizations (current year)" %}

-
{{lbl}}
+
@@ -249,7 +249,7 @@

{% trans "current realisation year" %}

-
 {% trans "Area" %}{% trans "Man-day" %}{% trans "Man-day/hectare" %}
+
{% for lbl in dashboard.filters_label %}{%endfor%} @@ -269,7 +269,7 @@

{% trans "organizations (current realisation year)" %}

-
{% trans "Status" %}{{lbl}}
+
@@ -282,7 +282,7 @@

{% trans "area by organization by year" %}

-
 {% trans "Area" %}{% trans "Man-day" %}{% trans "Man-day/hectare" %}
+
{% for org, vals in dashboard.survey.org_by_year %} @@ -314,7 +314,7 @@

{% trans "effective operations areas (ha)" %}

-
+
{%for yr in dashboard.years %} {% if forloop.counter0|divisibleby:5 %} @@ -337,7 +337,7 @@

{% trans "man-days/hectare by year" %}

-
+
{%for yr in dashboard.years %} {% if forloop.counter0|divisibleby:5 %} @@ -362,7 +362,7 @@

{% trans "by month" %}

-
+
{% for mt in dashboard.last_months %} {% if forloop.counter0|divisibleby:5 %} @@ -383,7 +383,7 @@

{% trans "by department" %}

-
+
{% for yr in dashboard.years %} {% if forloop.counter0|divisibleby:5 %} @@ -404,7 +404,7 @@

{% trans "effective operation by department" %}

-
+
{% for yr in dashboard.years %} {% if forloop.counter0|divisibleby:4 %} @@ -427,7 +427,7 @@

{% trans "main towns by number" %}

-
+
@@ -441,7 +441,7 @@

{% trans "main towns by surface" %}

-
{% trans "Town" %}{% trans "Number" %}
+
@@ -458,7 +458,7 @@

{% trans "total" %}

-
{% trans "Town" %}{% trans "Total surface (ha)" %}
+
@@ -472,7 +472,7 @@

{% trans "by year" %}

-
{% trans "Status" %}{% trans "Number" %}
+
{%for yr in dashboard.years %} {% if forloop.counter0|divisibleby:5 %} @@ -492,7 +492,7 @@

{% trans "by realisation year" %}

-
+
{% for yr in dashboard.realisation_years %} {% if forloop.counter0|divisibleby:5 %} @@ -512,7 +512,7 @@

{% trans "current realisation year" %}

-
+
{% for lbl in dashboard.filters_label %}{%endfor%} @@ -532,7 +532,7 @@

{% trans "organizations (current realisation year)" %}

-
{% trans "Status" %}{{lbl}}
+
@@ -546,7 +546,7 @@

{% trans "area by organization by year" %}

-
 {% trans "Area" %}{% trans "Man-day" %}{% trans "Man-day/hectare" %}
+
{% for org, vals in dashboard.excavation.org_by_year %} {% if forloop.counter0|divisibleby:5 %} @@ -580,7 +580,7 @@

{% trans "area by organization by realisation year" %}

-
+
{% for org, vals in dashboard.excavation.org_by_year %} {% if forloop.counter0|divisibleby:5 %} @@ -616,7 +616,7 @@

{% trans "by month" %}

-
+
{% for mt in dashboard.last_months %} {% if forloop.counter0|divisibleby:5 %} @@ -636,7 +636,7 @@

{% trans "by department" %}

-
+
{% for yr in dashboard.years %} {% if forloop.counter0|divisibleby:5 %} @@ -657,7 +657,7 @@

{% trans "effective operation by department" %}

-
+
{% for yr in dashboard.years %} {% if forloop.counter0|divisibleby:3 %} @@ -682,7 +682,7 @@

{% trans "main towns by number" %}

-
+
@@ -696,7 +696,7 @@

{% trans "main towns by cost" %}

-
{% trans "Town" %}{% trans "Number" %}
+
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{ -- cgit v1.2.3
{% trans "Town" %}{% trans "Cost (euros)" %}