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) --- .../templates/ishtar/sheet_contextrecord.html | 7 +- .../ishtar/dashboards/dashboard_file.html | 143 +++--- .../templates/ishtar/sheet_file.html | 16 +- .../templates/ishtar/sheet_find.html | 17 +- .../blocks/window_tables/administrativacts.html | 8 +- .../blocks/window_tables/archaeologicalsites.html | 8 +- .../ishtar/blocks/window_tables/parcels.html | 7 +- .../ishtar/dashboards/dashboard_operation.html | 570 ++++++++++++++------- ishtar_common/static/media/style.css | 74 ++- .../ishtar/blocks/window_tables/documents.html | 8 +- .../blocks/window_tables/static_documents.html | 7 +- .../ishtar/dashboards/dashboard_main_detail.html | 26 +- ishtar_common/templatetags/date_formating.py | 4 +- version.py | 2 +- 14 files changed, 613 insertions(+), 284 deletions(-) diff --git a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html index 04532838a..91054a87b 100644 --- a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html +++ b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html @@ -51,7 +51,9 @@ {% if item.right_relations.count %}

{% trans "In relation with"%}

- +
+
+
@@ -72,7 +74,8 @@ {% endfor %} -
{% trans "Relation type" %} {% trans "ID" %}
+
+ {% endif %} 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 %} diff --git a/archaeological_finds/templates/ishtar/sheet_find.html b/archaeological_finds/templates/ishtar/sheet_find.html index f7c3838b8..85647ac61 100644 --- a/archaeological_finds/templates/ishtar/sheet_find.html +++ b/archaeological_finds/templates/ishtar/sheet_find.html @@ -69,8 +69,10 @@

{% trans "Treatments"%}

{% if item.upstream_treatment %} - - +

{% trans "Upstream treatment" %}

+
+
+
{% trans "Upstream treatment" %}
@@ -90,12 +92,16 @@ {% endfor %}
{% trans "Type" %} {% trans "Related finds" %}
+
+

{% trans "CSV" %} ({{ENCODING}})

{% endif %} {% if item.downstream_treatment %} - - +

{% trans "Downstream treatment" %}

+
+
+
{% trans "Downstream treatment" %}
@@ -115,6 +121,9 @@ {% endfor %}
{% trans "Type" %} {% trans "Related finds" %}
+
+
+

{% trans "CSV" %} ({{ENCODING}})

{% endif %} diff --git a/archaeological_operations/templates/ishtar/blocks/window_tables/administrativacts.html b/archaeological_operations/templates/ishtar/blocks/window_tables/administrativacts.html index 426669cca..4c41ed89e 100644 --- a/archaeological_operations/templates/ishtar/blocks/window_tables/administrativacts.html +++ b/archaeological_operations/templates/ishtar/blocks/window_tables/administrativacts.html @@ -1,6 +1,8 @@ {% load i18n %} - - +

{{caption}}

+
+
+
{{caption}}
@@ -18,3 +20,5 @@ {% endfor %}
{% trans "Ref." %} {% trans "Type" %}
{% trans "No administrative act associated" %}
+
+
diff --git a/archaeological_operations/templates/ishtar/blocks/window_tables/archaeologicalsites.html b/archaeological_operations/templates/ishtar/blocks/window_tables/archaeologicalsites.html index d72291c5b..d570b9db2 100644 --- a/archaeological_operations/templates/ishtar/blocks/window_tables/archaeologicalsites.html +++ b/archaeological_operations/templates/ishtar/blocks/window_tables/archaeologicalsites.html @@ -1,6 +1,8 @@ {% load i18n %} - - +

{{caption}}

+
+
+
{{caption}}
@@ -18,3 +20,5 @@ {% endfor %}
{% trans "Ref." %} {% trans "Name" %}
{% trans "No archaeological site associated" %}
+
+
diff --git a/archaeological_operations/templates/ishtar/blocks/window_tables/parcels.html b/archaeological_operations/templates/ishtar/blocks/window_tables/parcels.html index 9885680d7..37be138b1 100644 --- a/archaeological_operations/templates/ishtar/blocks/window_tables/parcels.html +++ b/archaeological_operations/templates/ishtar/blocks/window_tables/parcels.html @@ -1,6 +1,8 @@ {% load i18n %} - - +

{{ parcels_label }}

+
+
+
{{ parcels_label }}
@@ -20,3 +22,4 @@ {% endfor %}
{% trans "Town" %} {% trans "Year" %}
{% trans "No parcel" %}
+
diff --git a/archaeological_operations/templates/ishtar/dashboards/dashboard_operation.html b/archaeological_operations/templates/ishtar/dashboards/dashboard_operation.html index b3b75c4ae..a661d304d 100644 --- a/archaeological_operations/templates/ishtar/dashboards/dashboard_operation.html +++ b/archaeological_operations/templates/ishtar/dashboards/dashboard_operation.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% load i18n range units %} +{% load i18n range units humanize %} {% block extra_head %} {{form.media}} {% endblock %} @@ -10,496 +10,700 @@

{% trans "Global informations" %}

-
+
+

{% trans "total" %}

+
- {% for lbl, nb in dashboard.total %} - + {% endfor %} -
{% trans "Total" %}
{% trans "Status" %}{% trans "Number" %}
{{lbl}}{{nb}}{{lbl}}{{nb|intcomma}}
+
-
+
+

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

+
- {% for surface in dashboard.surface_by_type %} - + {% endfor %} -
{% trans "Area by type of operation" %}
{% trans "Status" %}{% trans "Area (ha)" %}
{{surface.operation_type__label}}{{surface.number|m2_to_ha}}{{surface.operation_type__label}}{{surface.number|m2_to_ha|intcomma}}
+
-
+
+

{% trans "by types" %}

+
- - {%for typ in dashboard.types %}{% endfor %} + {% for typ in dashboard.types %} + {% if forloop.counter0|divisibleby:5 %} + + {% endif %} + + {% endfor %} {% for lbl, types in dashboard.by_type %} - {%for nb in types %}{% endfor %} + {%for nb in types %} + {% if forloop.counter0|divisibleby:5 %} + {% endif %} + {% endfor %} {% endfor %} -
{% trans "By types" %}
{% trans "State" %}{{typ.label}}{% trans "State" %}{{typ.label}}
{{lbl}}{{nb}}{{lbl}}{{nb|intcomma}}
+
-
+
+

{% trans "by year" %}

+
- - {%for yr in dashboard.years %}{% endfor %} + {% for yr in dashboard.years %} + {% if forloop.counter0|divisibleby:5 %} + + {% endif %} + {% endfor %} {% for lbl, years in dashboard.by_year %} - {%for nb in years %}{% endfor %} + {% for nb in years %} + {% if forloop.counter0|divisibleby:5 %} + {% endif %} + + {% endfor %} {% endfor %} -
{% trans "By year" %}
{% trans "State" %}{{yr}}{% trans "State" %}{{yr|default_if_none:''}}
{{lbl}}{{nb}}{{lbl}}{{nb|intcomma}}
+
-
+
+

{% trans "by realisation year" %}

+
- - {%for yr in dashboard.realisation_years %}{% endfor %} + {%for yr in dashboard.realisation_years %} + {% if forloop.counter0|divisibleby:5 %} + + {% endif %} + {% endfor %} {% for lbl, years in dashboard.by_realisation_year %} - {%for nb in years %}{% endfor %} + {% for nb in years %} + {% if forloop.counter0|divisibleby:5 %} + {% endif %} + + {% endfor %} {% endfor %} -
{% trans "By realisation year" %}
{% trans "State" %}{{yr.year}}{% trans "State" %}{{yr.year|default_if_none:''}}
{{lbl}}{{nb}}{{lbl}}{{nb|intcomma}}
+
-
- - +
+

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

+
+
{% trans "Effective operation by type and year" %}
+ {% for lbl, years in dashboard.effective %} + + {% if forloop.counter0|divisibleby:6 %} - {%for yr in dashboard.years %}{% endfor %} + {%for yr in dashboard.years %} + {% if forloop.counter0|divisibleby:5 %} + + {% endif %} + {% endfor %} - {% for lbl, years in dashboard.effective %} + {% endif %} - {%for nb in years %}{% endfor %} + {% for nb in years %} + {% if forloop.counter0|divisibleby:5 %} + {% endif %} + + {% endfor %} {% endfor %} -
{% trans "Type" %}{{yr}}{{yr|default_if_none:''}}
{{lbl}}{{nb}}{{lbl}}{{nb|intcomma}}
+
-
+
+

{% trans "by realisation month" %}

+
- - {%for mt in dashboard.last_months %}{% endfor %} + {%for mt in dashboard.last_months %} + {% if forloop.counter0|divisibleby:5 %} + + {% endif %} + {% endfor %} {% for lbl, months in dashboard.by_realisation_month %} - {%for nb in months %}{% endfor %} + {%for nb in months %} + {% if forloop.counter0|divisibleby:5 %} + {% endif %} + + {% endfor %} {% endfor %} -
{% trans "By realisation month" %}
{% trans "State" %}{{mt.date|date:"F Y"|capfirst}}{% trans "State" %}{{mt.date|date:"N Y"|capfirst}}
{{lbl}}{{nb}}{{lbl}}{{nb|intcomma}}
+

{% trans "Survey informations" %}

-
+
+

{% trans "total" %}

+
- {% for lbl, nb in dashboard.survey.total %} - + {% endfor %} -
{% trans "Total" %}
{% trans "Status" %}{% trans "Number" %}
{{lbl}}{{nb}}{{lbl}}{{nb|intcomma}}
+
-
+
+

{% trans "by year" %}

+
- - {%for yr in dashboard.years %}{% endfor %} + {%for yr in dashboard.years %} + {% if forloop.counter0|divisibleby:5 %} + + {% endif %} + {% endfor %} {% for lbl, years in dashboard.survey.by_year %} - {%for nb in years %}{% endfor %} + {% for nb in years %} + {% if forloop.counter0|divisibleby:5 %} + {% endif %} + + {% endfor %} {% endfor %} -
{% trans "By year" %}
{% trans "State" %}{{yr}}{% trans "State" %}{{yr|default_if_none:''}}
{{lbl}}{{nb}}{{lbl}}{{nb|intcomma}}
+
-
+
+

{% trans "by realisation year" %}

+
- - {%for yr in dashboard.realisation_years %}{% endfor %} + {%for yr in dashboard.realisation_years %} + {% if forloop.counter0|divisibleby:5 %} + + {% endif %} + {% endfor %} {% for lbl, years in dashboard.survey.by_realisation_year %} - {%for nb in years %}{% endfor %} + {% for nb in years %} + {% if forloop.counter0|divisibleby:5 %} + {% endif %} + + {% endfor %} {% endfor %} -
{% trans "By realisation year" %}
{% trans "State" %}{{yr.year}}{% trans "State" %}{{yr.year|default_if_none:''}}
{{lbl}}{{nb}}{{lbl}}{{nb|intcomma}}
+
-
+
+

{% trans "current year" %}

+
- - {% for lbl in dashboard.filters_label %}{%endfor%} + {% for lbl in dashboard.filters_label %}{%endfor%} - {% for nb in dashboard.survey.area %}{%endfor%} + {% for nb in dashboard.survey.area %}{%endfor%} - {% for nb in dashboard.survey.manday %}{%endfor%} + {% for nb in dashboard.survey.manday %}{%endfor%} - {% for nb in dashboard.survey.mandayhect %}{%endfor%} + {% for nb in dashboard.survey.mandayhect %}{%endfor%} -
{% trans "Current year" %}
{% trans "Status" %}{{lbl}}{{lbl}}
{% trans "Area"%}{{nb}}{% trans "Area"%}{{nb|intcomma}}
{% trans "Man-day"%}{{nb}}{% trans "Man-day"%}{{nb|intcomma}}
{% trans "Man-day/hectare"%}{{nb}}{% trans "Man-day/hectare"%}{{nb|intcomma}}
- +

{% trans "Man-day/hectare for effective operations (current year):" %} {{dashboard.survey.mandayhect_effective}}

- -
+
+

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

+
- {% for org in dashboard.survey.org %} - + {% endfor %} -
{% trans "Organizations (current year)" %}
 {% trans "Area" %}{% trans "Man-day" %}{% trans "Man-day/hectare" %}
{{org.scientist__attached_to__name}}{{org.area}}{{org.manday}}{{org.mandayhect}}{{org.scientist__attached_to__name}}{{org.area|intcomma}}{{org.manday|intcomma}}{{org.mandayhect|intcomma}}
+
-
+
+

{% trans "current realisation year" %}

+
- {% for lbl in dashboard.filters_label %}{%endfor%} - {% for nb in dashboard.survey.area_realised %}{%endfor%} + {% for nb in dashboard.survey.area_realised %}{%endfor%} - {% for nb in dashboard.survey.manday_realised %}{%endfor%} + {% for nb in dashboard.survey.manday_realised %}{%endfor%} - {% for nb in dashboard.survey.mandayhect_realised %}{%endfor%} + {% for nb in dashboard.survey.mandayhect_realised %}{%endfor%} -
{% trans "Current realisation year" %}
{% trans "Status" %}{{lbl}}
{% trans "Area"%}{{nb}}{% trans "Area"%}{{nb|intcomma}}
{% trans "Man-day"%}{{nb}}{% trans "Man-day"%}{{nb|intcomma}}
{% trans "Man-day/hectare"%}{{nb}}{% trans "Man-day/hectare"%}{{nb|intcomma}}
+

{% trans "Man-day/hectare for effective operations (current realisation year):" %} {{dashboard.survey.mandayhect_real_effective}}

-
+
+

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

+
- {% for org in dashboard.survey.org_realised %} - + {% endfor %} -
{% trans "Organizations (current realisation year)" %}
 {% trans "Area" %}{% trans "Man-day" %}{% trans "Man-day/hectare" %}
{{org.in_charge__attached_to__name}}{{org.area}}{{org.manday}}{{org.mandayhect}}{{org.scientist__attached_to__name}}{{org.area|intcomma}}{{org.manday|intcomma}}{{org.mandayhect|intcomma}}
- -
- - +
{% trans "Area by organization by year" %}
+
+

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

+
+ - {% for yr in dashboard.years%}{% endfor %} {% for org, vals in dashboard.survey.org_by_year %} - - {% for area, cost in vals %}{% endfor %} + {% if forloop.counter0|divisibleby:4 %} + {% for yr in dashboard.years %} + {% if forloop.counter0|divisibleby:5 %} + + {% endif %} + + {% endfor %} + {% endif %} + + + {% for area, cost in vals %} + {% if forloop.counter0|divisibleby:5 %} + + {% endif %} + {% endfor %} {% endfor %} - {% for area in dashboard.survey.org_by_year_area_mean %}{% endfor %} + {% for area in dashboard.survey.org_by_year_area_mean %} + {% if forloop.counter0|divisibleby:5 %} + {% endif%} + {% endfor %} -
{% trans "Organization" %}{{yr}}
{{org}}{{area}}{% trans "Organization" %}{{yr|default_if_none:''}}
{{org}}{{area|intcomma}}
{% trans "Mean" %}{{area}}{% trans "Mean" %}{{area|intcomma}}
+
-
+
+

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

+
- - {% for yr in dashboard.years%}{% endfor %} + {%for yr in dashboard.years %} + {% if forloop.counter0|divisibleby:5 %} + + {% endif %} + {% endfor %} - {% for nb, mean in dashboard.survey.effective %}{% endfor %} + {% for nb, mean in dashboard.survey.effective %} + {% if forloop.counter0|divisibleby:5 %}{%endif%} + {% endfor %} - {% for nb, avg in dashboard.survey.effective %}{% endfor %} + {% for nb, avg in dashboard.survey.effective %} + {% if forloop.counter0|divisibleby:5 %}{%endif%} + {% endfor %} -
{% trans "Effective operations areas (ha)" %}
 {{yr}}{{yr|default_if_none:''}}
{% trans "Sum" %}{{nb|m2_to_ha}}{% trans "Sum" %}{{nb|m2_to_ha|intcomma}}
{% trans "Average" %}{{avg|m2_to_ha}}{% trans "Average" %}{{avg|m2_to_ha|intcomma}}
+
-
+
+

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

+
- - {% for yr in dashboard.years%}{% endfor %} + {%for yr in dashboard.years %} + {% if forloop.counter0|divisibleby:5 %} + + {% endif %} + {% endfor %} - {% for nb, mean in dashboard.survey.mandayshect %}{% endfor %} + {% for nb, mean in dashboard.survey.mandayshect %} + {% if forloop.counter0|divisibleby:5 %}{%endif%} + {% endfor %} - {% for nb, avg in dashboard.survey.mandayshect %}{% endfor %} + {% for nb, avg in dashboard.survey.mandayshect %} + {% if forloop.counter0|divisibleby:5 %} + + {%endif%} + {% endfor %} -
{% trans "Man-Days/hectare by Year" %}
 {{yr}}{{yr|default_if_none:''}}
{% trans "Man-Days/hectare" %}{{nb}}{% trans "Man-Days/hectare" %}{{nb|intcomma}}
{% trans "Average" %}{{avg}}{% trans "Average" %}{{avg|intcomma}}
+
-
+
+

{% trans "by month" %}

+
- - {%for mt in dashboard.last_months %}{% endfor %} + {% for mt in dashboard.last_months %} + {% if forloop.counter0|divisibleby:5 %} + {% endif %} + {% endfor %} {% for lbl, months in dashboard.survey.by_month %} - {%for nb in months %}{% endfor %} + {%for nb in months %} + {% if forloop.counter0|divisibleby:5 %} + {% endif %} + + {% endfor %} {% endfor %} -
{% trans "By month" %}
{% trans "State" %}{{mt.date|date:"F Y"|capfirst}}{% trans "State" %}{{mt.date|date:"N Y"|capfirst}}
{{lbl}}{{nb}}{{lbl}}{{nb|intcomma}}
+
-
+
+

{% trans "by department" %}

+
- - {%for yr in dashboard.years %}{% endfor %} + {% for yr in dashboard.years %} + {% if forloop.counter0|divisibleby:5 %} + + {% endif %} + {% endfor %} {% for lbl, years in dashboard.survey.by_dpt %} - {%for nb in years %}{{nb}}{% endfor %} + {% for nb in years %} + {% if forloop.counter0|divisibleby:5 %} + {% endif %} + {{nb|intcomma}}{% endfor %} {% endfor %} -
{% trans "By department" %}
{% trans "Department" %}{{yr}}{% trans "Sum" %}{% trans "Department" %}{{yr|default_if_none:''}}{% trans "Sum" %}
{{lbl}}{{lbl}}
+
-
+
+

{% trans "effective operation by department" %}

+
- - {%for yr in dashboard.years %}{% endfor %} + {% for yr in dashboard.years %} + {% if forloop.counter0|divisibleby:4 %} + {% endif %} + {% endfor %} {%for yr in dashboard.years %}{% endfor %} {% for lbl, years in dashboard.survey.effective_by_dpt %} - {%for nb, area, cost, fnap in years %}{{nb}}{{area}}{% endfor %} + {%for nb, area, cost, fnap in years %} + {% if forloop.counter0|divisibleby:4 %} + {% endif %} + {{nb|intcomma}}{{area|intcomma}}{% endfor %} {% endfor %} -
{% trans "Effective operation by department" %}
{% trans "Department" %}{{yr}}{% trans "Sum" %}{% trans "Department" %}{{yr|default_if_none:''}}{% trans "Sum" %}
{%trans "Nb."%}{%trans "Area"%}{%trans "Nb."%}{%trans "Area"%}
{{lbl}}{{lbl}}
+
-
+
+

{% trans "main towns by number" %}

+
- {% for lbl, nb in dashboard.survey.towns %} - + {% endfor %} -
{% trans "Main towns by number" %}
{% trans "Town" %}{% trans "Number" %}
{{lbl}}{{nb}}{{lbl}}{{nb|intcomma}}
+
-
+
+

{% trans "main towns by surface" %}

+
- {% for lbl, nb in dashboard.survey.towns_surface %} - + {% endfor %} -
{% trans "Main towns by surface" %}
{% trans "Town" %}{% trans "Total surface (ha)" %}
{{lbl}}{{nb|m2_to_ha}}{{lbl}}{{nb|m2_to_ha|intcomma}}
+

{% trans "Excavation informations" %}

-
+
+

{% trans "total" %}

+
- {% for lbl, nb in dashboard.excavation.total %} - + {% endfor %} -
{% trans "Total" %}
{% trans "Status" %}{% trans "Number" %}
{{lbl}}{{nb}}{{lbl}}{{nb|intcomma}}
+
-
+
+

{% trans "by year" %}

+
- - {%for yr in dashboard.years %}{% endfor %} + {%for yr in dashboard.years %} + {% if forloop.counter0|divisibleby:5 %} + {% endif %} + {% endfor %} {% for lbl, years in dashboard.excavation.by_year %} - {%for nb in years %}{% endfor %} + {% for nb in years %} + {% if forloop.counter0|divisibleby:5 %} + {% endif %} + {% endfor %} {% endfor %} -
{% trans "By year" %}
{% trans "State" %}{{yr}}{% trans "State" %}{{yr|default_if_none:''}}
{{lbl}}{{nb}}{{lbl}}{{nb|intcomma}}
+
-
+
+

{% trans "by realisation year" %}

+
- - {%for yr in dashboard.realisation_years %}{% endfor %} + {% for yr in dashboard.realisation_years %} + {% if forloop.counter0|divisibleby:5 %} + {% endif %} + {% endfor %} {% for lbl, years in dashboard.excavation.by_realisation_year %} - {%for nb in years %}{% endfor %} + {% for nb in years %} + {% if forloop.counter0|divisibleby:5 %} + {% endif %} + {% endfor %} {% endfor %} -
{% trans "By realisation year" %}
{% trans "State" %}{{yr.year}}{% trans "State" %}{{yr.year}}
{{lbl}}{{nb}}{{lbl}}{{nb}}
+
-
+
+

{% trans "current realisation year" %}

+
- {% for lbl in dashboard.filters_label %}{%endfor%} - {% for nb in dashboard.excavation.area_realised %}{%endfor%} + {% for nb in dashboard.excavation.area_realised %}{%endfor%} - {% for nb in dashboard.excavation.manday_realised %}{%endfor%} + {% for nb in dashboard.excavation.manday_realised %}{%endfor%} - {% for nb in dashboard.excavation.mandayhect_realised %}{%endfor%} + {% for nb in dashboard.excavation.mandayhect_realised %}{%endfor%} -
{% trans "Current realisation year" %}
{% trans "Status" %}{{lbl}}
{% trans "Area"%}{{nb}}{% trans "Area"%}{{nb|default_if_none:'-'|intcomma}}
{% trans "Man-day"%}{{nb}}{% trans "Man-day"%}{{nb|default_if_none:'-'|intcomma}}
{% trans "Man-day/hectare"%}{{nb}}{% trans "Man-day/hectare"%}{{nb|default_if_none:'-'|intcomma}}
+

{% trans "Man-day/hectare for effective operations (current realisation year):" %} {{dashboard.excavation.mandayhect_real_effective}}

-
+
+

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

+
- {% for org in dashboard.excavation.org_realised %} - + {% endfor %} -
{% trans "Organizations (current realisation year)" %}
 {% trans "Area" %}{% trans "Man-day" %}{% trans "Man-day/hectare" %}
{{org.in_charge__attached_to__name}}{{org.area}}{{org.manday}}{{org.mandayhect}}{{org.scientist__attached_to__name}}{{org.area|default_if_none:'-'|intcomma}}{{org.manday|default_if_none:'-'|intcomma}}{{org.mandayhect|default_if_none:'-'|intcomma}}
+
-
- - +
+

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

+
+
{% trans "Area by organization by year" %}
+ {% for org, vals in dashboard.excavation.org_by_year %} + {% if forloop.counter0|divisibleby:5 %} - {% for yr in dashboard.years%}{% endfor %} + {% for yr in dashboard.years%} + {% if forloop.counter0|divisibleby:5 %} + {% endif %} + {% endfor %} - {% for org, vals in dashboard.excavation.org_by_year %} + {% endif %} - {% for area, cost in vals %}{% endfor %} + {% for area, cost in vals %} + {% if forloop.counter0|divisibleby:5 %} + {% endif %} + {% endfor %} {% endfor %} - {% for area in dashboard.excavation.org_by_year_area_sum %}{% endfor %} + {% for area in dashboard.excavation.org_by_year_area_sum %} + {% if forloop.counter0|divisibleby:5 %} + {% endif %} + {% endfor %} - {% for area in dashboard.excavation.org_by_year_area_mean %}{% endfor %} + {% for area in dashboard.excavation.org_by_year_area_mean %} + {% if forloop.counter0|divisibleby:5 %} + {% endif %} + {% endfor %} -
{% trans "Organization" %}{{yr}}{% trans "Organization" %}{{yr|default_if_none:'-'}}
{{org}}{{area}}{{org}}{{area|default_if_none:'-'|intcomma}}
{% trans "Sum" %}{{area}}{% trans "Sum" %}{{area|intcomma}}
{% trans "Mean" %}{{area}}{% trans "Mean" %}{{area|intcomma}}
+
-
- - +
+

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

+
+
{% trans "Area by organization by realisation year" %}
+ {% for org, vals in dashboard.excavation.org_by_year %} + + {% if forloop.counter0|divisibleby:5 %} - {% for yr in dashboard.years%}{% endfor %} + {% for yr in dashboard.years%} + {% if forloop.counter0|divisibleby:5 %} + {% endif %} + {% endfor %} - {% for org, vals in dashboard.excavation.org_by_year %} + {% endif %} + - {% for area, cost in vals %}{% endfor %} + {% for area, cost in vals %} + {% if forloop.counter0|divisibleby:5 %} + {% endif %} + {% endfor %} {% endfor %} - {% for area in dashboard.excavation.org_by_year_area_sum %}{% endfor %} + {% for area in dashboard.excavation.org_by_year_area_sum %} + {% if forloop.counter0|divisibleby:5 %} + {% endif %} + {% endfor %} - {% for area in dashboard.excavation.org_by_year_area_mean %}{% endfor %} + {% for area in dashboard.excavation.org_by_year_area_mean %} + {% if forloop.counter0|divisibleby:5 %} + {% endif %} + {% endfor %} -
{% trans "Organization" %}{{yr}}{% trans "Organization" %}{{yr|default_if_none:'-'}}
{{org}}{{area}}{{org}}{{area|default_if_none:'-'|intcomma}}
{% trans "Sum" %}{{area}}{% trans "Sum" %}{{area|default_if_none:'-'|intcomma}}
{% trans "Mean" %}{{area}}{% trans "Mean" %}{{area|default_if_none:'-'|intcomma}}
+ -
+
+

{% trans "by month" %}

+
- - {%for mt in dashboard.last_months %}{% endfor %} + {% for mt in dashboard.last_months %} + {% if forloop.counter0|divisibleby:5 %} + {% endif %} + {% endfor %} {% for lbl, months in dashboard.excavation.by_month %} - {%for nb in months %}{% endfor %} + {% for nb in months %} + {% if forloop.counter0|divisibleby:5 %} + {% endif %} + {% endfor %} {% endfor %} -
{% trans "By month" %}
{% trans "State" %}{{mt.date|date:"F Y"|capfirst}}{% trans "State" %}{{mt.date|date:"N Y"|capfirst}}
{{lbl}}{{nb}}{{lbl}}{{nb|default_if_none:'-'|intcomma}}
+
-
+
+

{% trans "by department" %}

+
- - {%for yr in dashboard.years %}{% endfor %} + {% for yr in dashboard.years %} + {% if forloop.counter0|divisibleby:5 %} + {% endif %} + {% endfor %} + {% for lbl, years in dashboard.excavation.by_dpt %} - {%for nb in years %}{{nb}}{% endfor %} + {% for nb in years %} + {% if forloop.counter0|divisibleby:5 %} + {% endif %} + {{nb|default_if_none:'-'|intcomma}}{% endfor %} {% endfor %} -
{% trans "By department" %}
{% trans "Department" %}{{yr}}{% trans "Sum" %}{% trans "Department" %}{{yr|default_if_none:'-'}}{% trans "Sum" %}
{{lbl}}{{lbl}}
+
-
+
+

{% trans "effective operation by department" %}

+
- - {%for yr in dashboard.years %}{% endfor %} + {% for yr in dashboard.years %} + {% if forloop.counter0|divisibleby:3 %} + {% endif %} + {% endfor %} - {%for yr in dashboard.years %}{% endfor %} + {% for yr in dashboard.years %}{% endfor %} {% for lbl, years in dashboard.excavation.effective_by_dpt %} - {%for nb, area, cost, fnap in years %}{{nb}}{{cost}}{{fnap}}{% endfor %} + {% for nb, area, cost, fnap in years %} + {% if forloop.counter0|divisibleby:3 %} + {% endif %} + {{nb|intcomma}}{{cost|intcomma}}{{fnap|intcomma}}{% endfor %} {% endfor %} -
{% trans "Effective operation by department" %}
{% trans "Department" %}{{yr}}{% trans "Sum" %}{% trans "Department" %}{{yr|default_if_none:'-'}}{% trans "Sum" %}
{%trans "Nb."%}{%trans "Cost"%}{%trans "FNAP cost"%}{%trans "Nb."%}{%trans "Cost"%}{%trans "FNAP cost"%}{%trans "Nb."%}{%trans "Cost"%}{%trans "FNAP cost"%}{%trans "Nb."%}{%trans "Cost"%}{%trans "FNAP cost"%}
{{lbl}}{{lbl}}
+
-
+
+

{% trans "main towns by number" %}

+
- {% for lbl, nb in dashboard.excavation.towns %} - + {% endfor %} -
{% trans "Main towns by number" %}
{% trans "Town" %}{% trans "Number" %}
{{lbl}}{{nb}}{{lbl}}{{nb|intcomma}}
+
-
+
+

{% trans "main towns by cost" %}

+
- {% for lbl, nb in dashboard.excavation.towns_cost %} - + {% endfor %} -
{% trans "Main towns by cost" %}
{% trans "Town" %}{% trans "Cost (euros)" %}
{{lbl}}{{nb}}{{lbl}}{{nb|intcomma}}
+
diff --git a/ishtar_common/static/media/style.css b/ishtar_common/static/media/style.css index 69f86784b..8973876c6 100644 --- a/ishtar_common/static/media/style.css +++ b/ishtar_common/static/media/style.css @@ -843,7 +843,7 @@ a.photo{ .dashboard > div{ background: #FFF; text-align:left; - padding-bottom:10px; + padding:10px; border:1px solid #CCC; border-top-left-radius: 0; border-top-right-radius: 0; @@ -854,16 +854,12 @@ a.photo{ width:762px; background-color:#922; color:#FFF; - padding:0; + padding:10px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; } -.dashboard h4{ - font-weight:normal; - color:#D14; -} -.dashboard h4, .dashboard p{ +.dashboard p{ margin:0; padding:0 10px; } @@ -1037,17 +1033,24 @@ table td.item-list span{ border-top-right-radius: 8px; } +.dashboard label, #window label{ display:inline-table; font-weight:bold; width:245px; } +.dashboard span.value, #window span.value{ display:inline-table; width:465px; } +.dashboard span.value.numeric{ + text-align: right; + width:80px; +} + #window ul.form-flex span.value { display: inline-table; width: 230px; @@ -1255,3 +1258,60 @@ table.table-form td { table.table-form td input{ border-color:#922; } + +.clean-table { + margin: 10px 0 10px 0; + width: 100%; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); +} + +.clean-table h4{ + color: #922; + font-size: 1.2em; + padding:0.3em; + margin:0; + text-align: center; +} + +.clean-table-wrap{ + overflow: auto; +} + +.clean-table table{ + border-collapse: collapse; + margin-left: auto; + margin-right: auto; +} + +.clean-table tr { + padding: 8px 0; + background: #f6f6f6; +} + +.clean-table tr:nth-of-type(odd) { + background: #e9e9e9; +} + +.clean-table tr th { + font-weight: 900; + color: #ffffff; + background: #DA2D2D; + text-align: center; + padding: 0.2em 0.4em; +} + +.clean-table tr th.sub { + background: #E65C5C; +} + +.clean-table td{ + text-align: right; + padding: 6px 12px; +} + +.mini-table{ + height: 400px; + overflow: auto; + display: block; +} + diff --git a/ishtar_common/templates/ishtar/blocks/window_tables/documents.html b/ishtar_common/templates/ishtar/blocks/window_tables/documents.html index f1592cc42..8c584425a 100644 --- a/ishtar_common/templates/ishtar/blocks/window_tables/documents.html +++ b/ishtar_common/templates/ishtar/blocks/window_tables/documents.html @@ -1,6 +1,8 @@ {% load i18n %} - - +

{{h4}}

+
+
+
{{caption}}
@@ -18,4 +20,4 @@ {% endfor %}
{% trans "Title" %} {% trans "Type" %}
- + diff --git a/ishtar_common/templates/ishtar/blocks/window_tables/static_documents.html b/ishtar_common/templates/ishtar/blocks/window_tables/static_documents.html index d6686b553..e378bdf49 100644 --- a/ishtar_common/templates/ishtar/blocks/window_tables/static_documents.html +++ b/ishtar_common/templates/ishtar/blocks/window_tables/static_documents.html @@ -1,6 +1,8 @@ {% load i18n %} - - +

{{caption}}

+
+
+
{% for col in col_names %} {% endfor %} @@ -9,3 +11,4 @@ {%endfor%} {% endfor %}
{{caption}}
{% trans col %}{{value}}
+ diff --git a/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html b/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html index 7247a5cda..fd92578a2 100644 --- a/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html +++ b/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html @@ -1,4 +1,4 @@ -{% load i18n date_formating %} +{% load i18n date_formating humanize %} {% load url from future %}
@@ -13,7 +13,7 @@
{% endif %} -

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

+

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

{% trans 'Draw rectangle on the graph to zoom. Double-click to reinitialize.' %}

@@ -25,8 +25,9 @@
-
- +
+
+
{% for idx, lbl, values in dashboard.values %} @@ -35,6 +36,7 @@ {% endfor%}
{{lbl}}
+ {% if dashboard.periods %}

{% trans "By years" %}

{% endif %} +

{% trans "Created last" %}

-
- +
{% for item in dashboard.lasts %} - + {% endfor %}
{{lbl}}{% trans "Created" %}
{{item}} {{item.history_date}}{% if item.get_show_url %}{%trans "Show"%}{%endif%}{% if item.get_show_url %} + + {%endif%}
+

{% trans "Recent changes" %}

-
- +
{% for item in dashboard.recents %} - + {% endfor %}
{{lbl}}{% trans "Modified" %}
{{item}} {{item.history_date}}{% if item.get_show_url %}{%trans "Show"%}{%endif%}{% if item.get_show_url %} + + {%endif%}
diff --git a/ishtar_common/templatetags/date_formating.py b/ishtar_common/templatetags/date_formating.py index eb81cf52c..9d4cf74cc 100644 --- a/ishtar_common/templatetags/date_formating.py +++ b/ishtar_common/templatetags/date_formating.py @@ -8,12 +8,12 @@ from django.utils.translation import ugettext as _ register = Library() + @register.filter def date_formating(value): try: d = datetime.strptime(unicode(value), '%Y-%m-%d') - return _(d.strftime("%B")).capitalize() + u" %d" % d.year + return _(d.strftime("%b")).capitalize() + u" %d" % d.year except ValueError: # could be passed to non date value: on error return value return value - diff --git a/version.py b/version.py index cf2359d30..ed3f645d2 100644 --- a/version.py +++ b/version.py @@ -1,4 +1,4 @@ -VERSION = (0, 97, 2) +VERSION = (0, 97, 2, 1) def get_version(): -- cgit v1.2.3