diff options
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 |
commit | bd7639f6ee2da2a3417b64e70fdbf1decbf831ed (patch) | |
tree | 76f7298299a4283564ed2da07c1a7d1cdc7dbac7 /archaeological_operations/templates | |
parent | 99dd4a2fc8d6f44a9a22a69452d15006b264c372 (diff) | |
download | Ishtar-bd7639f6ee2da2a3417b64e70fdbf1decbf831ed.tar.bz2 Ishtar-bd7639f6ee2da2a3417b64e70fdbf1decbf831ed.zip |
UI: better layer layout for simple tables. Rewrite of all dashboard (refs #1616)
Diffstat (limited to 'archaeological_operations/templates')
4 files changed, 404 insertions, 189 deletions
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> </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> </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> </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> </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> </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> |