summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2016-08-25 22:36:05 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2016-08-25 22:36:05 +0200
commitbd7639f6ee2da2a3417b64e70fdbf1decbf831ed (patch)
tree76f7298299a4283564ed2da07c1a7d1cdc7dbac7
parent99dd4a2fc8d6f44a9a22a69452d15006b264c372 (diff)
downloadIshtar-bd7639f6ee2da2a3417b64e70fdbf1decbf831ed.tar.bz2
Ishtar-bd7639f6ee2da2a3417b64e70fdbf1decbf831ed.zip
UI: better layer layout for simple tables. Rewrite of all dashboard (refs #1616)
-rw-r--r--archaeological_context_records/templates/ishtar/sheet_contextrecord.html7
-rw-r--r--archaeological_files/templates/ishtar/dashboards/dashboard_file.html143
-rw-r--r--archaeological_files/templates/ishtar/sheet_file.html16
-rw-r--r--archaeological_finds/templates/ishtar/sheet_find.html17
-rw-r--r--archaeological_operations/templates/ishtar/blocks/window_tables/administrativacts.html8
-rw-r--r--archaeological_operations/templates/ishtar/blocks/window_tables/archaeologicalsites.html8
-rw-r--r--archaeological_operations/templates/ishtar/blocks/window_tables/parcels.html7
-rw-r--r--archaeological_operations/templates/ishtar/dashboards/dashboard_operation.html570
-rw-r--r--ishtar_common/static/media/style.css74
-rw-r--r--ishtar_common/templates/ishtar/blocks/window_tables/documents.html8
-rw-r--r--ishtar_common/templates/ishtar/blocks/window_tables/static_documents.html7
-rw-r--r--ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html26
-rw-r--r--ishtar_common/templatetags/date_formating.py4
-rw-r--r--version.py2
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 %}
<h3>{% trans "In relation with"%}</h3>
-<table class='simple'>
+<div class='clean-table'>
+<div class='clean-table-wrap'>
+<table>
<tr>
<th>{% trans "Relation type" %}</th>
<th>{% trans "ID" %}</th>
@@ -72,7 +74,8 @@
<td class='link'><a href="#" class='display_details' onclick='load_window("{%url show-contextrecord relation.right_record.pk ''%}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></td>
</tr>
{% endfor %}
-<table class='simple'>
+</table>
+</div></div>
{% 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 @@
<h3>{% trans "Global informations" %}</h3>
<div>
- <p><strong>{% trans "Total:" %}</strong> {{dashboard.total_number}}</p>
+ <p><label>{% trans "Total:" %}</label> <span class='value numeric'>{{dashboard.total_number|intcomma}}</span></p>
{% for type in dashboard.types %}
- <p><strong>{{type.file_type__label}}{% trans ":"%}</strong> {{type.number}}</p>
+ <p><label>{{type.file_type__label}}{% trans ":"%}</label> <span class='value numeric'>{{type.number|intcomma}}</span></p>
{% endfor %}
- <div class='table'>
- <table>
- <caption>{% trans "By year"%}</caption>
- <tr>
- {% for year in dashboard.by_year %}<th>{{year.date.year}}</th>{% endfor %}
- </tr>
- <tr>
- {% for year in dashboard.by_year %}<td>{{year.number}}</td>{% endfor%}
- </tr>
- </table>
+
+ <div class='clean-table'>
+ <h4>{% trans "by year"%}</h4>
+ <div class='clean-table-wrap'>
+ <table>
+ <tr>
+ {% for year in dashboard.by_year %}<th>{% if year.date.year %}{{year.date.year}}{% else %}{% trans "no year" %}{% endif %}</th>{% endfor %}
+ </tr>
+ <tr>
+ {% for year in dashboard.by_year %}<td>{{year.number|intcomma}}</td>{% endfor%}
+ </tr>
+ </table>
+ </div>
</div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "by month"%}</h4>
<table>
- <caption>{% trans "By month"%}</caption>
<tr>
- {% for month in dashboard.by_month %}<th>{{month.date|date:"F Y"|capfirst}}</th>{% endfor %}
+ {% for month in dashboard.by_month %}<th>{{month.date|date:"N Y"|capfirst}}</th>{% endfor %}
</tr>
<tr>
- {% for month in dashboard.by_month %}<td>{{month.number}}</td>{% endfor%}
+ {% for month in dashboard.by_month %}<td>{{month.number|intcomma}}</td>{% endfor%}
</tr>
</table>
</div>
@@ -41,171 +44,191 @@
<h3>{% trans "Research archaeology" %}</h3>
<div>
- <p><strong>{% trans "Total:" %}</strong> {{dashboard.research.total_number}}</p>
- <div class='table'>
+ <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>
- <caption>{% trans "By year"%}</caption>
<tr>
{% for year in dashboard.research.by_year %}<th>{{year.date.year}}</th>{% endfor %}
</tr>
<tr>
- {% for year in dashboard.research.by_year %}<td>{{year.number}}</td>{% endfor%}
+ {% for year in dashboard.research.by_year %}<td>{{year.number|intcomma}}</td>{% endfor%}
</tr>
</table>
</div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "by month"%}</h4>
<table>
- <caption>{% trans "By month"%}</caption>
<tr>
{% for month in dashboard.research.by_month %}<th>{{month.date|date:"F Y"|capfirst}}</th>{% endfor %}
</tr>
<tr>
- {% for month in dashboard.research.by_month %}<td>{{month.number}}</td>{% endfor%}
+ {% for month in dashboard.research.by_month %}<td>{{month.number|intcomma}}</td>{% endfor%}
</tr>
</table>
</div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "by department"%}</h4>
<table>
- <caption>{% trans "By department"%}</caption>
<tr>
{% for dpt in dashboard.research.by_dpt %}<th>{{dpt.department__label}}</th>{% endfor %}
</tr>
<tr>
- {% for dpt in dashboard.research.by_dpt %}<td>{{dpt.number}}</td>{% endfor%}
+ {% for dpt in dashboard.research.by_dpt %}<td>{{dpt.number|intcomma}}</td>{% endfor%}
</tr>
</table>
</div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "main towns"%}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "Main towns"%}</caption>
<tr>
{% for town in dashboard.research.towns %}<th>{{town.town__name}}</th>{% endfor %}
</tr>
<tr>
- {% for town in dashboard.research.towns %}<td>{{town.number}}</td>{% endfor%}
+ {% for town in dashboard.research.towns %}<td>{{town.number|intcomma}}</td>{% endfor%}
</tr>
</table>
+ </div>
</div>
</div>
<h3>{% trans "Rescue archaeology" %}</h3>
<div>
- <p><strong>{% trans "Total:" %}</strong> {{dashboard.rescue.total_number}}</p>
+ <p><label>{% trans "Total:" %}</label> <span class='value numeric'>{{dashboard.rescue.total_number|intcomma}}</span></p>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "by saisine type"%}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "By saisine type"%}</caption>
<tr>
{% for saisine in dashboard.rescue.saisine %}<th>{{saisine.saisine_type__label}}</th>{% endfor %}
</tr>
<tr>
- {% for saisine in dashboard.rescue.saisine %}<td>{{saisine.number}}</td>{% endfor%}
+ {% for saisine in dashboard.rescue.saisine %}<td>{{saisine.number|intcomma}}</td>{% endfor%}
</tr>
</table>
</div>
+ </div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "by administrative act"%}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "By administrative act"%}</caption>
<tr>
{% for act in dashboard.rescue.administrative_act %}<th>{{act.act_type__label}}</th>{% endfor %}
</tr>
<tr>
- {% for act in dashboard.rescue.administrative_act %}<td>{{act.number}}</td>{% endfor%}
+ {% for act in dashboard.rescue.administrative_act %}<td>{{act.number|intcomma}}</td>{% endfor%}
</tr>
</table>
</div>
+ </div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "by year"%}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "By year"%}</caption>
<tr>
{% for year in dashboard.rescue.by_year %}<th>{{year.date.year}}</th>{% endfor %}
</tr>
<tr>
- {% for year in dashboard.rescue.by_year %}<td>{{year.number}}</td>{% endfor%}
+ {% for year in dashboard.rescue.by_year %}<td>{{year.number|intcomma}}</td>{% endfor%}
</tr>
</table>
</div>
+ </div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "by month"%}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "By month"%}</caption>
<tr>
{% for month in dashboard.rescue.by_month %}<th>{{month.date|date:"F Y"|capfirst}}</th>{% endfor %}
</tr>
<tr>
- {% for month in dashboard.rescue.by_month %}<td>{{month.number}}</td>{% endfor%}
+ {% for month in dashboard.rescue.by_month %}<td>{{month.number|intcomma}}</td>{% endfor%}
</tr>
</table>
</div>
+ </div>
- <p><strong>{% trans "Archaeological files linked to at least one operation:" %}</strong> {{dashboard.rescue.with_associated_operation}}</p>
- <p><strong>{% trans "Archaeological files linked to at least one operation (%):" %}</strong> {{dashboard.rescue.with_associated_operation_percent}}</p>
+ <p><label>{% trans "Archaeological files linked to at least one operation:" %}</label> <span class='value numeric'>{{dashboard.rescue.with_associated_operation|intcomma}}</span></p>
+ <p><label>{% trans "Archaeological files linked to at least one operation (%):" %}</label> <span class='value numeric'>{{dashboard.rescue.with_associated_operation_percent|intcomma}}</span></p>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "archaeological files linked to at least one operation (%)"%}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "Archaeological files linked to at least one operation (%)"%}</caption>
<tr>
{% for year in dashboard.rescue.operational_by_year %}<th>{{year.date.year}}</th>{% endfor %}
</tr>
<tr>
- {% for year in dashboard.rescue.operational_by_year %}<td>{{year.number}}</td>{% endfor%}
+ {% for year in dashboard.rescue.operational_by_year %}<td>{{year.number|intcomma}}</td>{% endfor%}
</tr>
</table>
</div>
+ </div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "by department"%}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "By department"%}</caption>
<tr>
{% for dpt in dashboard.rescue.by_dpt %}<th>{{dpt.department__label}}</th>{% endfor %}
</tr>
<tr>
- {% for dpt in dashboard.rescue.by_dpt %}<td>{{dpt.number}}</td>{% endfor%}
+ {% for dpt in dashboard.rescue.by_dpt %}<td>{{dpt.number|intcomma}}</td>{% endfor%}
</tr>
</table>
</div>
+ </div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "surface by department (ha)"%}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "Surface by department (ha)"%}</caption>
<tr>
{% for dpt in dashboard.rescue.surface_by_dpt %}<th>{{dpt.department__label}}</th>{% endfor %}
</tr>
<tr>
- {% for dpt in dashboard.rescue.surface_by_dpt %}<td>{{dpt.number|m2_to_ha}}</td>{% endfor%}
+ {% for dpt in dashboard.rescue.surface_by_dpt %}<td>{{dpt.number|m2_to_ha|intcomma}}</td>{% endfor%}
</tr>
</table>
</div>
+ </div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "main towns by number"%}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "Main towns by number"%}</caption>
<tr>
{% for town in dashboard.rescue.towns %}<th>{{town.town__name}}</th>{% endfor %}
</tr>
<tr>
- {% for town in dashboard.rescue.towns %}<td>{{town.number}}</td>{% endfor%}
+ {% for town in dashboard.rescue.towns %}<td>{{town.number|intcomma}}</td>{% endfor%}
</tr>
</table>
</div>
+ </div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "main towns by surface (ha)"%}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "Main towns by surface (ha)"%}</caption>
<tr>
{% for town in dashboard.rescue.surface_by_town %}<th>{{town.town__name}}</th>{% endfor %}
</tr>
<tr>
- {% for town in dashboard.rescue.surface_by_town %}<td>{{town.number|m2_to_ha}}</td>{% endfor%}
+ {% for town in dashboard.rescue.surface_by_town %}<td>{{town.number|m2_to_ha|intcomma}}</td>{% endfor%}
</tr>
</table>
</div>
+ </div>
</div>
</div>
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 %}
-<table class='simple'>
- <caption>{%trans "Associated operations"%}</caption>
+<h4>{%trans "Associated operations"%}</h4>
+<div class='clean-table'>
+<div class='clean-table-wrap'>
+<table>
<tr>
<th>{% trans "Ref." %}</th>
<th>Code Patriarche</th>
@@ -126,9 +128,13 @@
<tr><td colspan="8" class='no_items'>{% trans "No operation associated to this archaelogical file" %}</td></tr>
{% endfor %}
</table>
+</div>
+</div>
-<table class='simple'>
- <caption>{%trans "Admninistrative acts linked to associated operations"%}</caption>
+<h4>{%trans "Admninistrative acts linked to associated operations"%}</h4>
+<div class='clean-table'>
+<div class='clean-table-wrap'>
+<table>
<tr>
<th>{% trans "Year" %}</th>
<th>{% trans "Ref." %}</th>
@@ -146,4 +152,6 @@
<tr><td colspan="4" class='no_items'>{% trans "No administrative act linked to operations" %}</td></tr>
{% endfor %}
</table>
+</div>
+</div>
{% 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 @@
<h3>{% trans "Treatments"%}</h3>
{% if item.upstream_treatment %}
-<table class='simple' id='{{window_id}}-upstream'>
- <caption>{% trans "Upstream treatment" %}</caption>
+<h4>{% trans "Upstream treatment" %}</h4>
+<div class='clean-table'>
+<div class='clean-table-wrap'>
+<table id='{{window_id}}-upstream'>
<tr>
<th>{% trans "Type" %}</th>
<th>{% trans "Related finds" %}</th>
@@ -90,12 +92,16 @@
</tr>
{% endfor %}
</table>
+</div>
+</div>
<p class='tool'><a class='badge' href="{% url 'get-upstreamtreatment' 'csv' %}?submited=1&amp;find_id={{item.pk}}" target="_blank" title='{% trans "Export as CSV"%}'>{% trans "CSV" %}</a> ({{ENCODING}})</p>
{% endif %}
{% if item.downstream_treatment %}
-<table class='simple' id='{{window_id}}-downstream'>
- <caption>{% trans "Downstream treatment" %}</caption>
+<h4>{% trans "Downstream treatment" %}</h4>
+<div class='clean-table'>
+<div class='clean-table-wrap'>
+<table id='{{window_id}}-downstream'>
<tr>
<th>{% trans "Type" %}</th>
<th>{% trans "Related finds" %}</th>
@@ -115,6 +121,9 @@
</tr>
{% endfor %}
</table>
+</div>
+</div>
+
<p class='tool'><a class='badge' href="{% url 'get-downstreamtreatment' 'csv' %}?submited=1&amp;find_id={{item.pk}}" target="_blank">{% trans "CSV" %}</a> ({{ENCODING}})</p>
{% 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 %}
-<table class='simple'>
- <caption>{{caption}}</caption>
+<h4>{{caption}}</h4>
+<div class='clean-table'>
+<div class='clean-table-wrap'>
+<table>
<tr>
<th>{% trans "Ref." %}</th>
<th>{% trans "Type" %}</th>
@@ -18,3 +20,5 @@
<tr><td colspan="4" class='no_items'>{% trans "No administrative act associated" %}</td></tr>
{% endfor %}
</table>
+</div>
+</div>
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 %}
-<table class='simple'>
- <caption>{{caption}}</caption>
+<h4>{{caption}}</h4>
+<div class='clean-table'>
+<div class='clean-table-wrap'>
+<table>
<tr>
<th>{% trans "Ref." %}</th>
<th>{% trans "Name" %}</th>
@@ -18,3 +20,5 @@
<tr><td colspan="4" class='no_items'>{% trans "No archaeological site associated" %}</td></tr>
{% endfor %}
</table>
+</div>
+</div>
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 %}
-<table class='simple'>
- <caption>{{ parcels_label }}</caption>
+<h4>{{ parcels_label }}</h4>
+<div class='clean-table'>
+<div class='clean-table-wrap'>
+<table>
<tr>
<th>{% trans "Town" %}</th>
<th>{% trans "Year" %}</th>
@@ -20,3 +22,4 @@
<tr><td colspan="4" class='no_items'>{% trans "No parcel" %}</td></tr>
{% endfor %}
</table>
+</div></div>
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 @@
<h3>{% trans "Global informations" %}</h3>
<div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "total" %}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "Total" %}</caption>
<tr>
<th>{% trans "Status" %}</th><th>{% trans "Number" %}</th>
</tr>
{% for lbl, nb in dashboard.total %}
<tr>
- <th class='sub'>{{lbl}}</th><td>{{nb}}</td>
+ <th class='sub'>{{lbl}}</th><td>{{nb|intcomma}}</td>
</tr>
{% endfor %}
- </table></div>
+ </table></div></div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "area by type of operation" %}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "Area by type of operation" %}</caption>
<tr>
<th>{% trans "Status" %}</th><th>{% trans "Area (ha)" %}</th>
</tr>
{% for surface in dashboard.surface_by_type %}
<tr>
- <th class='sub'>{{surface.operation_type__label}}</th><td>{{surface.number|m2_to_ha}}</td>
+ <th class='sub'>{{surface.operation_type__label}}</th><td>{{surface.number|m2_to_ha|intcomma}}</td>
</tr>
{% endfor %}
- </table></div>
+ </table></div></div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "by types" %}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "By types" %}</caption>
<tr>
- <th>{% trans "State" %}</th>{%for typ in dashboard.types %}<th>{{typ.label}}</th>{% endfor %}
+ {% for typ in dashboard.types %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th class='sub'>{% trans "State" %}</th>
+ {% endif %}
+ <th>{{typ.label}}</th>
+ {% endfor %}
</tr>
{% for lbl, types in dashboard.by_type %}
<tr>
- <th class='sub'>{{lbl}}</th>{%for nb in types %}<td>{{nb}}</td>{% endfor %}
+ {%for nb in types %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th class='sub'>{{lbl}}</th>{% endif %}
+ <td>{{nb|intcomma}}</td>{% endfor %}
</tr>
{% endfor %}
- </table></div>
+ </table></div></div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "by year" %}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "By year" %}</caption>
<tr>
- <th>{% trans "State" %}</th>{%for yr in dashboard.years %}<th>{{yr}}</th>{% endfor %}
+ {% for yr in dashboard.years %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th class='sub'>{% trans "State" %}</th>
+ {% endif %}
+ <th>{{yr|default_if_none:''}}</th>{% endfor %}
</tr>
{% for lbl, years in dashboard.by_year %}
<tr>
- <th class='sub'>{{lbl}}</th>{%for nb in years %}<td>{{nb}}</td>{% endfor %}
+ {% for nb in years %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th class='sub'>{{lbl}}</th>{% endif %}
+ <td>{{nb|intcomma}}</td>
+ {% endfor %}
</tr>
{% endfor %}
- </table></div>
+ </table></div></div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "by realisation year" %}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "By realisation year" %}</caption>
<tr>
- <th>{% trans "State" %}</th>{%for yr in dashboard.realisation_years %}<th>{{yr.year}}</th>{% endfor %}
+ {%for yr in dashboard.realisation_years %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th class='sub'>{% trans "State" %}</th>
+ {% endif %}
+ <th>{{yr.year|default_if_none:''}}</th>{% endfor %}
</tr>
{% for lbl, years in dashboard.by_realisation_year %}
<tr>
- <th class='sub'>{{lbl}}</th>{%for nb in years %}<td>{{nb}}</td>{% endfor %}
+ {% for nb in years %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th class='sub'>{{lbl}}</th>{% endif %}
+ <td>{{nb|intcomma}}</td>
+ {% endfor %}
</tr>
{% endfor %}
- </table></div>
+ </table></div></div>
- <div class='table'>
- <table>
- <caption>{% trans "Effective operation by type and year" %}</caption>
+ <div class='clean-table'>
+ <h4>{% trans "effective operation by type and year" %}</h4>
+ <div class='clean-table-wrap'>
+ <table class='mini-table'>
+ {% for lbl, years in dashboard.effective %}
+
+ {% if forloop.counter0|divisibleby:6 %}
<tr>
- <th>{% trans "Type" %}</th>{%for yr in dashboard.years %}<th>{{yr}}</th>{% endfor %}
+ {%for yr in dashboard.years %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th></th>
+ {% endif %}
+ <th>{{yr|default_if_none:''}}</th>{% endfor %}
</tr>
- {% for lbl, years in dashboard.effective %}
+ {% endif %}
<tr>
- <th class='sub'>{{lbl}}</th>{%for nb in years %}<td>{{nb}}</td>{% endfor %}
+ {% for nb in years %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th class='sub'>{{lbl}}</th>{% endif %}
+ <td>{{nb|intcomma}}</td>
+ {% endfor %}
</tr>
{% endfor %}
- </table></div>
+ </table></div></div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "by realisation month" %}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "By realisation month" %}</caption>
<tr>
- <th>{% trans "State" %}</th>{%for mt in dashboard.last_months %}<th>{{mt.date|date:"F Y"|capfirst}}</th>{% endfor %}
+ {%for mt in dashboard.last_months %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th class='sub'>{% trans "State" %}</th>
+ {% endif %}
+ <th>{{mt.date|date:"N Y"|capfirst}}</th>{% endfor %}
</tr>
{% for lbl, months in dashboard.by_realisation_month %}
<tr>
- <th class='sub'>{{lbl}}</th>{%for nb in months %}<td>{{nb}}</td>{% endfor %}
+ {%for nb in months %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th class='sub'>{{lbl}}</th>{% endif %}
+ <td>{{nb|intcomma}}</td>
+ {% endfor %}
</tr>
{% endfor %}
- </table></div>
+ </table></div></div>
</div>
<h3>{% trans "Survey informations" %}</h3>
<div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "total" %}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "Total" %}</caption>
<tr>
<th>{% trans "Status" %}</th><th>{% trans "Number" %}</th>
</tr>
{% for lbl, nb in dashboard.survey.total %}
<tr>
- <th class='sub'>{{lbl}}</th><td>{{nb}}</td>
+ <th class='sub'>{{lbl}}</th><td>{{nb|intcomma}}</td>
</tr>
{% endfor %}
- </table></div>
+ </table></div></div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "by year" %}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "By year" %}</caption>
<tr>
- <th>{% trans "State" %}</th>{%for yr in dashboard.years %}<th>{{yr}}</th>{% endfor %}
+ {%for yr in dashboard.years %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th class='sub'>{% trans "State" %}</th>
+ {% endif %}
+ <th>{{yr|default_if_none:''}}</th>{% endfor %}
</tr>
{% for lbl, years in dashboard.survey.by_year %}
<tr>
- <th class='sub'>{{lbl}}</th>{%for nb in years %}<td>{{nb}}</td>{% endfor %}
+ {% for nb in years %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th class='sub'>{{lbl}}</th>{% endif %}
+ <td>{{nb|intcomma}}</td>
+ {% endfor %}
</tr>
{% endfor %}
- </table></div>
+ </table></div></div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "by realisation year" %}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "By realisation year" %}</caption>
<tr>
- <th>{% trans "State" %}</th>{%for yr in dashboard.realisation_years %}<th>{{yr.year}}</th>{% endfor %}
+ {%for yr in dashboard.realisation_years %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th class='sub'>{% trans "State" %}</th>
+ {% endif %}
+ <th>{{yr.year|default_if_none:''}}</th>{% endfor %}
</tr>
{% for lbl, years in dashboard.survey.by_realisation_year %}
<tr>
- <th class='sub'>{{lbl}}</th>{%for nb in years %}<td>{{nb}}</td>{% endfor %}
+ {% for nb in years %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th class='sub'>{{lbl}}</th>{% endif %}
+ <td>{{nb|intcomma}}</td>
+ {% endfor %}
</tr>
{% endfor %}
- </table></div>
+ </table></div></div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "current year" %}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "Current year" %}</caption>
<tr>
- <th>{% trans "Status" %}</th>{% for lbl in dashboard.filters_label %}<th>{{lbl}}</th>{%endfor%}
+ <th></th>{% for lbl in dashboard.filters_label %}<th>{{lbl}}</th>{%endfor%}
</tr>
<tr>
- <th class='sub'>{% trans "Area"%}</th>{% for nb in dashboard.survey.area %}<td>{{nb}}</td>{%endfor%}
+ <th class='sub'>{% trans "Area"%}</th>{% for nb in dashboard.survey.area %}<td>{{nb|intcomma}}</td>{%endfor%}
</tr>
<tr>
- <th class='sub'>{% trans "Man-day"%}</th>{% for nb in dashboard.survey.manday %}<td>{{nb}}</td>{%endfor%}
+ <th class='sub'>{% trans "Man-day"%}</th>{% for nb in dashboard.survey.manday %}<td>{{nb|intcomma}}</td>{%endfor%}
</tr>
<tr>
- <th class='sub'>{% trans "Man-day/hectare"%}</th>{% for nb in dashboard.survey.mandayhect %}<td>{{nb}}</td>{%endfor%}
+ <th class='sub'>{% trans "Man-day/hectare"%}</th>{% for nb in dashboard.survey.mandayhect %}<td>{{nb|intcomma}}</td>{%endfor%}
</tr>
- </table></div>
-
+ </table></div></div>
<p><strong>{% trans "Man-day/hectare for effective operations (current year):" %}</strong> {{dashboard.survey.mandayhect_effective}}</p>
-
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "organizations (current year)" %}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "Organizations (current year)" %}</caption>
<tr>
<th>&nbsp;</th><th>{% trans "Area" %}</th><th>{% trans "Man-day" %}</th><th>{% trans "Man-day/hectare" %}</th>
</tr>
{% for org in dashboard.survey.org %}
<tr>
- <th class='sub'>{{org.scientist__attached_to__name}}</th><td>{{org.area}}</td><td>{{org.manday}}</td><td>{{org.mandayhect}}</td>
+ <th class='sub'>{{org.scientist__attached_to__name}}</th><td>{{org.area|intcomma}}</td><td>{{org.manday|intcomma}}</td><td>{{org.mandayhect|intcomma}}</td>
</tr>
{% endfor %}
- </table></div>
+ </table></div></div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "current realisation year" %}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "Current realisation year" %}</caption>
<tr>
<th>{% trans "Status" %}</th>{% for lbl in dashboard.filters_label %}<th>{{lbl}}</th>{%endfor%}
</tr>
<tr>
- <th class='sub'>{% trans "Area"%}</th>{% for nb in dashboard.survey.area_realised %}<td>{{nb}}</td>{%endfor%}
+ <th class='sub'>{% trans "Area"%}</th>{% for nb in dashboard.survey.area_realised %}<td>{{nb|intcomma}}</td>{%endfor%}
</tr>
<tr>
- <th class='sub'>{% trans "Man-day"%}</th>{% for nb in dashboard.survey.manday_realised %}<td>{{nb}}</td>{%endfor%}
+ <th class='sub'>{% trans "Man-day"%}</th>{% for nb in dashboard.survey.manday_realised %}<td>{{nb|intcomma}}</td>{%endfor%}
</tr>
<tr>
- <th class='sub'>{% trans "Man-day/hectare"%}</th>{% for nb in dashboard.survey.mandayhect_realised %}<td>{{nb}}</td>{%endfor%}
+ <th class='sub'>{% trans "Man-day/hectare"%}</th>{% for nb in dashboard.survey.mandayhect_realised %}<td>{{nb|intcomma}}</td>{%endfor%}
</tr>
- </table></div>
+ </table></div></div>
<p><strong>{% trans "Man-day/hectare for effective operations (current realisation year):" %}</strong> {{dashboard.survey.mandayhect_real_effective}}</p>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "organizations (current realisation year)" %}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "Organizations (current realisation year)" %}</caption>
<tr>
<th>&nbsp;</th><th>{% trans "Area" %}</th><th>{% trans "Man-day" %}</th><th>{% trans "Man-day/hectare" %}</th>
</tr>
{% for org in dashboard.survey.org_realised %}
<tr>
- <th class='sub'>{{org.in_charge__attached_to__name}}</th><td>{{org.area}}</td><td>{{org.manday}}</td><td>{{org.mandayhect}}</td>
+ <th class='sub'>{{org.scientist__attached_to__name}}</th><td>{{org.area|intcomma}}</td><td>{{org.manday|intcomma}}</td><td>{{org.mandayhect|intcomma}}</td>
</tr>
{% endfor %}
- </table></div>
-
- <div class='table'>
- <table>
- <caption>{% trans "Area by organization by year" %}</caption>
+ </table></div></div>
+ <div class='clean-table'>
+ <h4>{% trans "area by organization by year" %}</h4>
+ <div class='clean-table-wrap'>
+ <table class='mini-table'>
<tr>
- <th>{% trans "Organization" %}</th>{% for yr in dashboard.years%}<th>{{yr}}</th>{% endfor %}
</tr>
{% for org, vals in dashboard.survey.org_by_year %}
- <tr>
- <th class='sub'>{{org}}</th>{% for area, cost in vals %}<td>{{area}}</td>{% endfor %}
+ {% if forloop.counter0|divisibleby:4 %}
+ {% for yr in dashboard.years %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th class='sub'>{% trans "Organization" %}</th>
+ {% endif %}
+ <th>{{yr|default_if_none:''}}</th>
+ {% endfor %}
+ {% endif %}
+
+ <tr>
+ {% for area, cost in vals %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th class='sub'>{{org}}</th>
+ {% endif %}
+ <td>{{area|intcomma}}</td>{% endfor %}
</tr>
{% endfor %}
<tr>
- <th>{% trans "Mean" %}</th>{% for area in dashboard.survey.org_by_year_area_mean %}<td>{{area}}</td>{% endfor %}
+ {% for area in dashboard.survey.org_by_year_area_mean %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th>{% trans "Mean" %}</th>{% endif%}
+ <td>{{area|intcomma}}</td>{% endfor %}
</tr>
- </table></div>
+ </table></div></div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "effective operations areas (ha)" %}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "Effective operations areas (ha)" %}</caption>
<tr>
- <th>&nbsp;</th>{% for yr in dashboard.years%}<th>{{yr}}</th>{% endfor %}
+ {%for yr in dashboard.years %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th></th>
+ {% endif %}
+ <th>{{yr|default_if_none:''}}</th>{% endfor %}
</tr>
<tr>
- <th>{% trans "Sum" %}</th>{% for nb, mean in dashboard.survey.effective %}<td>{{nb|m2_to_ha}}</td>{% endfor %}
+ {% for nb, mean in dashboard.survey.effective %}
+ {% if forloop.counter0|divisibleby:5 %}<th>{% trans "Sum" %}</th>{%endif%}
+ <td>{{nb|m2_to_ha|intcomma}}</td>{% endfor %}
</tr>
<tr>
- <th>{% trans "Average" %}</th>{% for nb, avg in dashboard.survey.effective %}<td>{{avg|m2_to_ha}}</td>{% endfor %}
+ {% for nb, avg in dashboard.survey.effective %}
+ {% if forloop.counter0|divisibleby:5 %}<th>{% trans "Average" %}</th>{%endif%}
+ <td>{{avg|m2_to_ha|intcomma}}</td>{% endfor %}
</tr>
- </table></div>
+ </table></div></div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "man-days/hectare by year" %}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "Man-Days/hectare by Year" %}</caption>
<tr>
- <th>&nbsp;</th>{% for yr in dashboard.years%}<th>{{yr}}</th>{% endfor %}
+ {%for yr in dashboard.years %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th></th>
+ {% endif %}
+ <th>{{yr|default_if_none:''}}</th>{% endfor %}
</tr>
<tr>
- <th>{% trans "Man-Days/hectare" %}</th>{% for nb, mean in dashboard.survey.mandayshect %}<td>{{nb}}</td>{% endfor %}
+ {% for nb, mean in dashboard.survey.mandayshect %}
+ {% if forloop.counter0|divisibleby:5 %}<th>{% trans "Man-Days/hectare" %}</th>{%endif%}
+ <td>{{nb|intcomma}}</td>{% endfor %}
</tr>
<tr>
- <th>{% trans "Average" %}</th>{% for nb, avg in dashboard.survey.mandayshect %}<td>{{avg}}</td>{% endfor %}
+ {% for nb, avg in dashboard.survey.mandayshect %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th>{% trans "Average" %}</th>
+ {%endif%}
+ <td>{{avg|intcomma}}</td>{% endfor %}
</tr>
- </table></div>
+ </table></div></div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "by month" %}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "By month" %}</caption>
<tr>
- <th>{% trans "State" %}</th>{%for mt in dashboard.last_months %}<th>{{mt.date|date:"F Y"|capfirst}}</th>{% endfor %}
+ {% for mt in dashboard.last_months %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th class='sub'>{% trans "State" %}</th>{% endif %}
+ <th>{{mt.date|date:"N Y"|capfirst}}</th>{% endfor %}
</tr>
{% for lbl, months in dashboard.survey.by_month %}
<tr>
- <th class='sub'>{{lbl}}</th>{%for nb in months %}<td>{{nb}}</td>{% endfor %}
+ {%for nb in months %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th class='sub'>{{lbl}}</th>{% endif %}
+ <td>{{nb|intcomma}}</td>
+ {% endfor %}
</tr>
{% endfor %}
- </table></div>
+ </table></div></div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "by department" %}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "By department" %}</caption>
<tr>
- <th>{% trans "Department" %}</th>{%for yr in dashboard.years %}<th>{{yr}}</th>{% endfor %}<th>{% trans "Sum" %}</th>
+ {% for yr in dashboard.years %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th class='sub'>{% trans "Department" %}</th>
+ {% endif %}
+ <th>{{yr|default_if_none:''}}</th>{% endfor %}<th>{% trans "Sum" %}</th>
</tr>
{% for lbl, years in dashboard.survey.by_dpt %}
<tr>
- <th class='sub'>{{lbl}}</th>{%for nb in years %}<td{%if forloop.last%} class='sub'{%endif%}>{{nb}}</td>{% endfor %}
+ {% for nb in years %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th class='sub'>{{lbl}}</th>{% endif %}
+ <td{%if forloop.last%} class='sub'{%endif%}>{{nb|intcomma}}</td>{% endfor %}
</tr>
{% endfor %}
- </table></div>
+ </table></div></div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "effective operation by department" %}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "Effective operation by department" %}</caption>
<tr>
- <th rowspan='2'>{% trans "Department" %}</th>{%for yr in dashboard.years %}<th colspan='2'>{{yr}}</th>{% endfor %}<th colspan='2'>{% trans "Sum" %}</th>
+ {% for yr in dashboard.years %}
+ {% if forloop.counter0|divisibleby:4 %}
+ <th rowspan='2'>{% trans "Department" %}</th>{% endif %}
+ <th class='sub' colspan='2'>{{yr|default_if_none:''}}</th>{% endfor %}<th colspan='2'>{% trans "Sum" %}</th>
</tr>
<tr>
{%for yr in dashboard.years %}<th>{%trans "Nb."%}</th><th>{%trans "Area"%}</th>{% endfor %}<th>{%trans "Nb."%}</th><th>{%trans "Area"%}</th>
</tr>
{% for lbl, years in dashboard.survey.effective_by_dpt %}
<tr>
- <th class='sub'>{{lbl}}</th>{%for nb, area, cost, fnap in years %}<td{%if forloop.last%} class='sub'{%endif%}>{{nb}}</td><td{%if forloop.last%} class='sub'{%endif%}>{{area}}</td>{% endfor %}
+ {%for nb, area, cost, fnap in years %}
+ {% if forloop.counter0|divisibleby:4 %}
+ <th class='sub'>{{lbl}}</th>{% endif %}
+ <td{%if forloop.last%} class='sub'{%endif%}>{{nb|intcomma}}</td><td{%if forloop.last%} class='sub'{%endif%}>{{area|intcomma}}</td>{% endfor %}
</tr>
{% endfor %}
- </table></div>
+ </table></div></div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "main towns by number" %}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "Main towns by number" %}</caption>
<tr>
<th>{% trans "Town" %}</th><th>{% trans "Number" %}</th>
</tr>
{% for lbl, nb in dashboard.survey.towns %}
<tr>
- <th class='sub'>{{lbl}}</th><td>{{nb}}</td>
+ <th class='sub'>{{lbl}}</th><td>{{nb|intcomma}}</td>
</tr>
{% endfor %}
- </table></div>
+ </table></div></div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "main towns by surface" %}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "Main towns by surface" %}</caption>
<tr>
<th>{% trans "Town" %}</th><th>{% trans "Total surface (ha)" %}</th>
</tr>
{% for lbl, nb in dashboard.survey.towns_surface %}
<tr>
- <th class='sub'>{{lbl}}</th><td>{{nb|m2_to_ha}}</td>
+ <th class='sub'>{{lbl}}</th><td>{{nb|m2_to_ha|intcomma}}</td>
</tr>
{% endfor %}
- </table></div>
+ </table></div></div>
</div>
<h3>{% trans "Excavation informations" %}</h3>
<div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "total" %}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "Total" %}</caption>
<tr>
<th>{% trans "Status" %}</th><th>{% trans "Number" %}</th>
</tr>
{% for lbl, nb in dashboard.excavation.total %}
<tr>
- <th class='sub'>{{lbl}}</th><td>{{nb}}</td>
+ <th class='sub'>{{lbl}}</th><td>{{nb|intcomma}}</td>
</tr>
{% endfor %}
- </table></div>
+ </table></div></div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "by year" %}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "By year" %}</caption>
<tr>
- <th>{% trans "State" %}</th>{%for yr in dashboard.years %}<th>{{yr}}</th>{% endfor %}
+ {%for yr in dashboard.years %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th>{% trans "State" %}</th>{% endif %}
+ <th>{{yr|default_if_none:''}}</th>{% endfor %}
</tr>
{% for lbl, years in dashboard.excavation.by_year %}
<tr>
- <th class='sub'>{{lbl}}</th>{%for nb in years %}<td>{{nb}}</td>{% endfor %}
+ {% for nb in years %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th class='sub'>{{lbl}}</th>{% endif %}
+ <td>{{nb|intcomma}}</td>{% endfor %}
</tr>
{% endfor %}
- </table></div>
+ </table></div></div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "by realisation year" %}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "By realisation year" %}</caption>
<tr>
- <th>{% trans "State" %}</th>{%for yr in dashboard.realisation_years %}<th>{{yr.year}}</th>{% endfor %}
+ {% for yr in dashboard.realisation_years %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th>{% trans "State" %}</th>{% endif %}
+ <th>{{yr.year}}</th>{% endfor %}
</tr>
{% for lbl, years in dashboard.excavation.by_realisation_year %}
<tr>
- <th class='sub'>{{lbl}}</th>{%for nb in years %}<td>{{nb}}</td>{% endfor %}
+ {% for nb in years %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th class='sub'>{{lbl}}</th>{% endif %}
+ <td>{{nb}}</td>{% endfor %}
</tr>
{% endfor %}
- </table></div>
+ </table></div></div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "current realisation year" %}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "Current realisation year" %}</caption>
<tr>
<th>{% trans "Status" %}</th>{% for lbl in dashboard.filters_label %}<th>{{lbl}}</th>{%endfor%}
</tr>
<tr>
- <th class='sub'>{% trans "Area"%}</th>{% for nb in dashboard.excavation.area_realised %}<td>{{nb}}</td>{%endfor%}
+ <th class='sub'>{% trans "Area"%}</th>{% for nb in dashboard.excavation.area_realised %}<td>{{nb|default_if_none:'-'|intcomma}}</td>{%endfor%}
</tr>
<tr>
- <th class='sub'>{% trans "Man-day"%}</th>{% for nb in dashboard.excavation.manday_realised %}<td>{{nb}}</td>{%endfor%}
+ <th class='sub'>{% trans "Man-day"%}</th>{% for nb in dashboard.excavation.manday_realised %}<td>{{nb|default_if_none:'-'|intcomma}}</td>{%endfor%}
</tr>
<tr>
- <th class='sub'>{% trans "Man-day/hectare"%}</th>{% for nb in dashboard.excavation.mandayhect_realised %}<td>{{nb}}</td>{%endfor%}
+ <th class='sub'>{% trans "Man-day/hectare"%}</th>{% for nb in dashboard.excavation.mandayhect_realised %}<td>{{nb|default_if_none:'-'|intcomma}}</td>{%endfor%}
</tr>
- </table></div>
+ </table></div></div>
<p><strong>{% trans "Man-day/hectare for effective operations (current realisation year):" %}</strong> {{dashboard.excavation.mandayhect_real_effective}}</p>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "organizations (current realisation year)" %}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "Organizations (current realisation year)" %}</caption>
<tr>
<th>&nbsp;</th><th>{% trans "Area" %}</th><th>{% trans "Man-day" %}</th><th>{% trans "Man-day/hectare" %}</th>
</tr>
{% for org in dashboard.excavation.org_realised %}
<tr>
- <th class='sub'>{{org.in_charge__attached_to__name}}</th><td>{{org.area}}</td><td>{{org.manday}}</td><td>{{org.mandayhect}}</td>
+ <th class='sub'>{{org.scientist__attached_to__name}}</th><td>{{org.area|default_if_none:'-'|intcomma}}</td><td>{{org.manday|default_if_none:'-'|intcomma}}</td><td>{{org.mandayhect|default_if_none:'-'|intcomma}}</td>
</tr>
{% endfor %}
- </table></div>
+ </table></div></div>
- <div class='table'>
- <table>
- <caption>{% trans "Area by organization by year" %}</caption>
+ <div class='clean-table'>
+ <h4>{% trans "area by organization by year" %}</h4>
+ <div class='clean-table-wrap'>
+ <table class='mini-table'>
+ {% for org, vals in dashboard.excavation.org_by_year %}
+ {% if forloop.counter0|divisibleby:5 %}
<tr>
- <th>{% trans "Organization" %}</th>{% for yr in dashboard.years%}<th>{{yr}}</th>{% endfor %}
+ {% for yr in dashboard.years%}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th>{% trans "Organization" %}</th>{% endif %}
+ <th>{{yr|default_if_none:'-'}}</th>{% endfor %}
</tr>
- {% for org, vals in dashboard.excavation.org_by_year %}
+ {% endif %}
<tr>
- <th class='sub'>{{org}}</th>{% for area, cost in vals %}<td>{{area}}</td>{% endfor %}
+ {% for area, cost in vals %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th class='sub'>{{org}}</th>{% endif %}
+ <td>{{area|default_if_none:'-'|intcomma}}</td>{% endfor %}
</tr>
{% endfor %}
<tr>
- <th>{% trans "Sum" %}</th>{% for area in dashboard.excavation.org_by_year_area_sum %}<td>{{area}}</td>{% endfor %}
+ {% for area in dashboard.excavation.org_by_year_area_sum %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th>{% trans "Sum" %}</th>{% endif %}
+ <td>{{area|intcomma}}</td>{% endfor %}
</tr>
<tr>
- <th>{% trans "Mean" %}</th>{% for area in dashboard.excavation.org_by_year_area_mean %}<td>{{area}}</td>{% endfor %}
+ {% for area in dashboard.excavation.org_by_year_area_mean %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th>{% trans "Mean" %}</th>{% endif %}
+ <td>{{area|intcomma}}</td>{% endfor %}
</tr>
- </table></div>
+ </table></div></div>
- <div class='table'>
- <table>
- <caption>{% trans "Area by organization by realisation year" %}</caption>
+ <div class='clean-table'>
+ <h4>{% trans "area by organization by realisation year" %}</h4>
+ <div class='clean-table-wrap'>
+ <table class='mini-table'>
+ {% for org, vals in dashboard.excavation.org_by_year %}
+
+ {% if forloop.counter0|divisibleby:5 %}
<tr>
- <th>{% trans "Organization" %}</th>{% for yr in dashboard.years%}<th>{{yr}}</th>{% endfor %}
+ {% for yr in dashboard.years%}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th>{% trans "Organization" %}</th>{% endif %}
+ <th>{{yr|default_if_none:'-'}}</th>{% endfor %}
</tr>
- {% for org, vals in dashboard.excavation.org_by_year %}
+ {% endif %}
+
<tr>
- <th class='sub'>{{org}}</th>{% for area, cost in vals %}<td>{{area}}</td>{% endfor %}
+ {% for area, cost in vals %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th class='sub'>{{org}}</th>{% endif %}
+ <td>{{area|default_if_none:'-'|intcomma}}</td>{% endfor %}
</tr>
{% endfor %}
<tr>
- <th>{% trans "Sum" %}</th>{% for area in dashboard.excavation.org_by_year_area_sum %}<td>{{area}}</td>{% endfor %}
+ {% for area in dashboard.excavation.org_by_year_area_sum %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th>{% trans "Sum" %}</th>{% endif %}
+ <td>{{area|default_if_none:'-'|intcomma}}</td>{% endfor %}
</tr>
<tr>
- <th>{% trans "Mean" %}</th>{% for area in dashboard.excavation.org_by_year_area_mean %}<td>{{area}}</td>{% endfor %}
+ {% for area in dashboard.excavation.org_by_year_area_mean %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th>{% trans "Mean" %}</th>{% endif %}
+ <td>{{area|default_if_none:'-'|intcomma}}</td>{% endfor %}
</tr>
- </table></div>
+ </table></div></div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "by month" %}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "By month" %}</caption>
<tr>
- <th>{% trans "State" %}</th>{%for mt in dashboard.last_months %}<th>{{mt.date|date:"F Y"|capfirst}}</th>{% endfor %}
+ {% for mt in dashboard.last_months %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th class='sub'>{% trans "State" %}</th>{% endif %}
+ <th>{{mt.date|date:"N Y"|capfirst}}</th>{% endfor %}
</tr>
{% for lbl, months in dashboard.excavation.by_month %}
<tr>
- <th class='sub'>{{lbl}}</th>{%for nb in months %}<td>{{nb}}</td>{% endfor %}
+ {% for nb in months %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th class='sub'>{{lbl}}</th>{% endif %}
+ <td>{{nb|default_if_none:'-'|intcomma}}</td>{% endfor %}
</tr>
{% endfor %}
- </table></div>
+ </table></div></div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "by department" %}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "By department" %}</caption>
<tr>
- <th>{% trans "Department" %}</th>{%for yr in dashboard.years %}<th>{{yr}}</th>{% endfor %}<th>{% trans "Sum" %}</th>
+ {% for yr in dashboard.years %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th class='sub'>{% trans "Department" %}</th>{% endif %}
+ <th>{{yr|default_if_none:'-'}}</th>{% endfor %}
+ <th>{% trans "Sum" %}</th>
</tr>
{% for lbl, years in dashboard.excavation.by_dpt %}
<tr>
- <th class='sub'>{{lbl}}</th>{%for nb in years %}<td{%if forloop.last%} class='sub'{%endif%}>{{nb}}</td>{% endfor %}
+ {% for nb in years %}
+ {% if forloop.counter0|divisibleby:5 %}
+ <th class='sub'>{{lbl}}</th>{% endif %}
+ <td{%if forloop.last%} class='sub'{%endif%}>{{nb|default_if_none:'-'|intcomma}}</td>{% endfor %}
</tr>
{% endfor %}
- </table></div>
+ </table></div></div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "effective operation by department" %}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "Effective operation by department" %}</caption>
<tr>
- <th rowspan='2'>{% trans "Department" %}</th>{%for yr in dashboard.years %}<th colspan='3'>{{yr}}</th>{% endfor %}<th colspan='3'>{% trans "Sum" %}</th>
+ {% for yr in dashboard.years %}
+ {% if forloop.counter0|divisibleby:3 %}
+ <th rowspan='2' class="sub">{% trans "Department" %}</th>{% endif %}
+ <th colspan='3'>{{yr|default_if_none:'-'}}</th>{% endfor %}<th colspan='3'>{% trans "Sum" %}</th>
</tr>
<tr>
- {%for yr in dashboard.years %}<th>{%trans "Nb."%}</th><th>{%trans "Cost"%}</th><th>{%trans "FNAP cost"%}</th>{% endfor %}<th>{%trans "Nb."%}</th><th>{%trans "Cost"%}</th><th>{%trans "FNAP cost"%}</th>
+ {% for yr in dashboard.years %}<th>{%trans "Nb."%}</th><th>{%trans "Cost"%}</th><th>{%trans "FNAP cost"%}</th>{% endfor %}<th>{%trans "Nb."%}</th><th>{%trans "Cost"%}</th><th>{%trans "FNAP cost"%}</th>
</tr>
{% for lbl, years in dashboard.excavation.effective_by_dpt %}
<tr>
- <th class='sub'>{{lbl}}</th>{%for nb, area, cost, fnap in years %}<td{%if forloop.last%} class='sub'{%endif%}>{{nb}}</td><td{%if forloop.last%} class='sub'{%endif%}>{{cost}}</td><td{%if forloop.last%} class='sub'{%endif%}>{{fnap}}</td>{% endfor %}
+ {% for nb, area, cost, fnap in years %}
+ {% if forloop.counter0|divisibleby:3 %}
+ <th class='sub'>{{lbl}}</th>{% endif %}
+ <td{%if forloop.last%} class='sub'{%endif%}>{{nb|intcomma}}</td><td{%if forloop.last%} class='sub'{%endif%}>{{cost|intcomma}}</td><td{%if forloop.last%} class='sub'{%endif%}>{{fnap|intcomma}}</td>{% endfor %}
</tr>
{% endfor %}
- </table></div>
+ </table></div></div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "main towns by number" %}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "Main towns by number" %}</caption>
<tr>
<th>{% trans "Town" %}</th><th>{% trans "Number" %}</th>
</tr>
{% for lbl, nb in dashboard.excavation.towns %}
<tr>
- <th class='sub'>{{lbl}}</th><td>{{nb}}</td>
+ <th class='sub'>{{lbl}}</th><td>{{nb|intcomma}}</td>
</tr>
{% endfor %}
- </table></div>
+ </table></div></div>
- <div class='table'>
+ <div class='clean-table'>
+ <h4>{% trans "main towns by cost" %}</h4>
+ <div class='clean-table-wrap'>
<table>
- <caption>{% trans "Main towns by cost" %}</caption>
<tr>
<th>{% trans "Town" %}</th><th>{% trans "Cost (euros)" %}</th>
</tr>
{% for lbl, nb in dashboard.excavation.towns_cost %}
<tr>
- <th class='sub'>{{lbl}}</th><td>{{nb}}</td>
+ <th class='sub'>{{lbl}}</th><td>{{nb|intcomma}}</td>
</tr>
{% endfor %}
- </table></div>
+ </table></div></div>
</div>
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 %}
-<table class='simple'>
- <caption>{{caption}}</caption>
+<h4>{{h4}}</h4>
+<div class='clean-table'>
+<div class='clean-table-wrap'>
+<table>
<tr>
<th>{% trans "Title" %}</th>
<th>{% trans "Type" %}</th>
@@ -18,4 +20,4 @@
</tr>
{% endfor %}
</table>
-
+</div></div>
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 %}
-
-<table class='simple'>
+<h4>{{caption}}</h4>
+<div class='clean-table'>
+<div class='clean-table-wrap'>
+<table>
<caption>{{caption}}</caption>
<tr>{% for col in col_names %}
<th>{% trans col %}</th>{% endfor %}
@@ -9,3 +11,4 @@
<td>{{value}}</td>{%endfor%}
</tr>{% endfor %}
</table>
+</div></div>
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 %}
<div class='dashboard' id="{{unique_id}}-tab">
<div>
@@ -13,7 +13,7 @@
</form>
</div>
{% endif %}
- <p><strong>{% trans "Total:" %}</strong> {{dashboard.total_number}}</p>
+ <p><strong>{% trans "Total:" %}</strong> {{dashboard.total_number|intcomma}}</p>
<div class='table'>
<div id="chart_{{unique_id}}" style="height:400px; width:700px;"></div>
<p class='info-box'><i class="fa fa-info-circle" aria-hidden="true"></i> {% trans 'Draw rectangle on the graph to zoom. Double-click to reinitialize.' %}</p>
@@ -25,8 +25,9 @@
</div>
</div>
</div>
- <div class='table'>
- <table class='resume'>
+ <div class='clean-table'>
+ <div class='clean-table-wrap'>
+ <table>
{% for idx, lbl, values in dashboard.values %}
<tr class='idx {% if forloop.counter0|divisibleby:"2" %}even{%else%}odd{%endif%}'>
<th>{{lbl}}</th>
@@ -35,6 +36,7 @@
{% endfor%}
</table>
</div>
+ </div>
{% if dashboard.periods %}
<h4>{% trans "By years" %}</h4>
<ul>
@@ -55,25 +57,29 @@
<li><strong>{% trans "Mode:" %}</strong> {{dashboard.operation_mode}}</li>
</ul>
{% endif %}
+ <div class='clean-table'>
<h4>{% trans "Created last" %}</h4>
- <div class='table'>
- <table class='resume'>
+ <table>
<tr><th>{{lbl}}</th><th>{% trans "Created" %}</th><th></th></tr>
{% for item in dashboard.lasts %}<tr>
<td class='ref'>{{item}}</td>
<td>{{item.history_date}}</td>
- <td>{% if item.get_show_url %}<a href="#" onclick='load_window("{{item.get_show_url}}")'>{%trans "Show"%}</a>{%endif%}</td>
+ <td>{% if item.get_show_url %}<a href="#" onclick='load_window("{{item.get_show_url}}")'>
+ <i class="fa fa-info-circle" aria-hidden="true"></i>
+ </a>{%endif%}</td>
</tr>{% endfor %}
</table>
</div>
+ <div class='clean-table'>
<h4>{% trans "Recent changes" %}</h4>
- <div class='table'>
- <table class='resume'>
+ <table>
<tr><th>{{lbl}}</th><th>{% trans "Modified" %}</th><th></th></tr>
{% for item in dashboard.recents %}<tr>
<td class='ref'>{{item}}</td>
<td>{{item.history_date}}</td>
- <td>{% if item.get_show_url %}<a href="#" onclick='load_window("{{item.get_show_url}}")'>{%trans "Show"%}</a>{%endif%}</td>
+ <td>{% if item.get_show_url %}<a href="#" onclick='load_window("{{item.get_show_url}}")'>
+ <i class="fa fa-info-circle" aria-hidden="true"></i>
+ </a>{%endif%}</td>
</tr>{% endfor %}
</table>
</div>
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():