From bd7639f6ee2da2a3417b64e70fdbf1decbf831ed Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 25 Aug 2016 22:36:05 +0200 Subject: UI: better layer layout for simple tables. Rewrite of all dashboard (refs #1616) --- .../ishtar/dashboards/dashboard_file.html | 143 ++++++++++++--------- .../templates/ishtar/sheet_file.html | 16 ++- 2 files changed, 95 insertions(+), 64 deletions(-) (limited to 'archaeological_files') diff --git a/archaeological_files/templates/ishtar/dashboards/dashboard_file.html b/archaeological_files/templates/ishtar/dashboards/dashboard_file.html index de8be7d30..163f89bb8 100644 --- a/archaeological_files/templates/ishtar/dashboards/dashboard_file.html +++ b/archaeological_files/templates/ishtar/dashboards/dashboard_file.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% load i18n range units %} +{% load i18n range units humanize %} {% block extra_head %} {{form.media}} {% endblock %} @@ -9,30 +9,33 @@

{% trans "Global informations" %}

-

{% trans "Total:" %} {{dashboard.total_number}}

+

{{dashboard.total_number|intcomma}}

{% for type in dashboard.types %} -

{{type.file_type__label}}{% trans ":"%} {{type.number}}

+

{{type.number|intcomma}}

{% endfor %} -
- - - - {% for year in dashboard.by_year %}{% endfor %} - - - {% for year in dashboard.by_year %}{% endfor%} - -
{% trans "By year"%}
{{year.date.year}}
{{year.number}}
+ +
+

{% trans "by year"%}

+
+ + + {% for year in dashboard.by_year %}{% endfor %} + + + {% for year in dashboard.by_year %}{% endfor%} + +
{% if year.date.year %}{{year.date.year}}{% else %}{% trans "no year" %}{% endif %}
{{year.number|intcomma}}
+
-
+
+

{% trans "by month"%}

- - {% for month in dashboard.by_month %}{% endfor %} + {% for month in dashboard.by_month %}{% endfor %} - {% for month in dashboard.by_month %}{% endfor%} + {% for month in dashboard.by_month %}{% endfor%}
{% trans "By month"%}
{{month.date|date:"F Y"|capfirst}}{{month.date|date:"N Y"|capfirst}}
{{month.number}}{{month.number|intcomma}}
@@ -41,171 +44,191 @@

{% trans "Research archaeology" %}

-

{% trans "Total:" %} {{dashboard.research.total_number}}

-
+

{{dashboard.research.total_number|intcomma}}

+
+

{% trans "by year"%}

- {% for year in dashboard.research.by_year %}{% endfor %} - {% for year in dashboard.research.by_year %}{% endfor%} + {% for year in dashboard.research.by_year %}{% endfor%}
{% trans "By year"%}
{{year.date.year}}
{{year.number}}{{year.number|intcomma}}
-
+
+

{% trans "by month"%}

- {% for month in dashboard.research.by_month %}{% endfor %} - {% for month in dashboard.research.by_month %}{% endfor%} + {% for month in dashboard.research.by_month %}{% endfor%}
{% trans "By month"%}
{{month.date|date:"F Y"|capfirst}}
{{month.number}}{{month.number|intcomma}}
-
+
+

{% trans "by department"%}

- {% for dpt in dashboard.research.by_dpt %}{% endfor %} - {% for dpt in dashboard.research.by_dpt %}{% endfor%} + {% for dpt in dashboard.research.by_dpt %}{% endfor%}
{% trans "By department"%}
{{dpt.department__label}}
{{dpt.number}}{{dpt.number|intcomma}}
-
+
+

{% trans "main towns"%}

+
- {% for town in dashboard.research.towns %}{% endfor %} - {% for town in dashboard.research.towns %}{% endfor%} + {% for town in dashboard.research.towns %}{% endfor%}
{% trans "Main towns"%}
{{town.town__name}}
{{town.number}}{{town.number|intcomma}}
+

{% trans "Rescue archaeology" %}

-

{% trans "Total:" %} {{dashboard.rescue.total_number}}

+

{{dashboard.rescue.total_number|intcomma}}

-
+
+

{% trans "by saisine type"%}

+
- {% for saisine in dashboard.rescue.saisine %}{% endfor %} - {% for saisine in dashboard.rescue.saisine %}{% endfor%} + {% for saisine in dashboard.rescue.saisine %}{% endfor%}
{% trans "By saisine type"%}
{{saisine.saisine_type__label}}
{{saisine.number}}{{saisine.number|intcomma}}
+
-
+
+

{% trans "by administrative act"%}

+
- {% for act in dashboard.rescue.administrative_act %}{% endfor %} - {% for act in dashboard.rescue.administrative_act %}{% endfor%} + {% for act in dashboard.rescue.administrative_act %}{% endfor%}
{% trans "By administrative act"%}
{{act.act_type__label}}
{{act.number}}{{act.number|intcomma}}
+
-
+
+

{% trans "by year"%}

+
- {% for year in dashboard.rescue.by_year %}{% endfor %} - {% for year in dashboard.rescue.by_year %}{% endfor%} + {% for year in dashboard.rescue.by_year %}{% endfor%}
{% trans "By year"%}
{{year.date.year}}
{{year.number}}{{year.number|intcomma}}
+
-
+
+

{% trans "by month"%}

+
- {% for month in dashboard.rescue.by_month %}{% endfor %} - {% for month in dashboard.rescue.by_month %}{% endfor%} + {% for month in dashboard.rescue.by_month %}{% endfor%}
{% trans "By month"%}
{{month.date|date:"F Y"|capfirst}}
{{month.number}}{{month.number|intcomma}}
+
-

{% trans "Archaeological files linked to at least one operation:" %} {{dashboard.rescue.with_associated_operation}}

-

{% trans "Archaeological files linked to at least one operation (%):" %} {{dashboard.rescue.with_associated_operation_percent}}

+

{{dashboard.rescue.with_associated_operation|intcomma}}

+

{{dashboard.rescue.with_associated_operation_percent|intcomma}}

-
+
+

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

+
- {% for year in dashboard.rescue.operational_by_year %}{% endfor %} - {% for year in dashboard.rescue.operational_by_year %}{% endfor%} + {% for year in dashboard.rescue.operational_by_year %}{% endfor%}
{% trans "Archaeological files linked to at least one operation (%)"%}
{{year.date.year}}
{{year.number}}{{year.number|intcomma}}
+
-
+
+

{% trans "by department"%}

+
- {% for dpt in dashboard.rescue.by_dpt %}{% endfor %} - {% for dpt in dashboard.rescue.by_dpt %}{% endfor%} + {% for dpt in dashboard.rescue.by_dpt %}{% endfor%}
{% trans "By department"%}
{{dpt.department__label}}
{{dpt.number}}{{dpt.number|intcomma}}
+
-
+
+

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

+
- {% for dpt in dashboard.rescue.surface_by_dpt %}{% endfor %} - {% for dpt in dashboard.rescue.surface_by_dpt %}{% endfor%} + {% for dpt in dashboard.rescue.surface_by_dpt %}{% endfor%}
{% trans "Surface by department (ha)"%}
{{dpt.department__label}}
{{dpt.number|m2_to_ha}}{{dpt.number|m2_to_ha|intcomma}}
+
-
+
+

{% trans "main towns by number"%}

+
- {% for town in dashboard.rescue.towns %}{% endfor %} - {% for town in dashboard.rescue.towns %}{% endfor%} + {% for town in dashboard.rescue.towns %}{% endfor%}
{% trans "Main towns by number"%}
{{town.town__name}}
{{town.number}}{{town.number|intcomma}}
+
-
+
+

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

+
- {% for town in dashboard.rescue.surface_by_town %}{% endfor %} - {% for town in dashboard.rescue.surface_by_town %}{% endfor%} + {% for town in dashboard.rescue.surface_by_town %}{% endfor%}
{% trans "Main towns by surface (ha)"%}
{{town.town__name}}
{{town.number|m2_to_ha}}{{town.number|m2_to_ha|intcomma}}
+
diff --git a/archaeological_files/templates/ishtar/sheet_file.html b/archaeological_files/templates/ishtar/sheet_file.html index 9ff6e8356..782a7656d 100644 --- a/archaeological_files/templates/ishtar/sheet_file.html +++ b/archaeological_files/templates/ishtar/sheet_file.html @@ -101,8 +101,10 @@ {% trans "Administrative acts" as administrativeacts_label %} {% table_administrativact administrativeacts_label item.administrative_act.all %} - - +

{%trans "Associated operations"%}

+
+
+
{%trans "Associated operations"%}
@@ -126,9 +128,13 @@ {% endfor %}
{% trans "Ref." %} Code Patriarche
{% trans "No operation associated to this archaelogical file" %}
+
+
- - +

{%trans "Admninistrative acts linked to associated operations"%}

+
+
+
{%trans "Admninistrative acts linked to associated operations"%}
@@ -146,4 +152,6 @@ {% endfor %}
{% trans "Year" %} {% trans "Ref." %}
{% trans "No administrative act linked to operations" %}
+
+
{% endblock %} -- cgit v1.2.3