summaryrefslogtreecommitdiff
path: root/ishtar/templates/dashboard_file.html
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar/templates/dashboard_file.html')
-rw-r--r--ishtar/templates/dashboard_file.html231
1 files changed, 182 insertions, 49 deletions
diff --git a/ishtar/templates/dashboard_file.html b/ishtar/templates/dashboard_file.html
index e710dbe16..cebd147f4 100644
--- a/ishtar/templates/dashboard_file.html
+++ b/ishtar/templates/dashboard_file.html
@@ -6,77 +6,210 @@
{% endblock %}
{% block content %}
<div class='dashboard'>
-{% for lbl, dashboard in items %}
+ <h2>{% trans "Archaeological files" %}</h2>
<div>
- <h3>{{lbl}}</h3>
- <h4>{% trans "Numbers" %}</h4>
+ <h3>{% trans "Global informations" %}</h3>
+
<p><strong>{% trans "Total:" %}</strong> {{dashboard.total_number}}</p>
+ {% for type in dashboard.types %}
+ <p><strong>{{type.file_type__label}}{% trans ":"%}</strong> {{type.number}}</p>
+ {% endfor %}
<div class='table'>
<table>
- {% for idx, lbl, values in dashboard.values %}
- <tr class='idx {% if forloop.counter0|divisibleby:"2" %}even{%else%}odd{%endif%}'>
- <th>{{lbl}}</th>
- {% for value in values %}<td>{{value}}</td>{% endfor%}
+ <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>
+
+ <div class='table'>
+ <table>
+ <caption>{% trans "By month"%}</caption>
+ <tr>
+ {% for month in dashboard.by_month %}<th>{{month.date|date:"F Y"|capfirst}}</th>{% endfor %}
+ </tr>
+ <tr>
+ {% for month in dashboard.by_month %}<td>{{month.number}}</td>{% endfor%}
+ </tr>
+ </table>
+ </div>
+
+ </div>
+ <div>
+
+ <h3>{% trans "Research archaeology" %}</h3>
+
+ <p><strong>{% trans "Total:" %}</strong> {{dashboard.research.total_number}}</p>
+ <div class='table'>
+ <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%}
+ </tr>
+ </table>
+ </div>
+
+ <div class='table'>
+ <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%}
</tr>
- {% endfor%}
</table>
</div>
- {% if dashboard.years %}
- <h4>{% trans "By years" %}</h4>
- <ul>
- <li><strong>{% trans "Average:" %}</strong> {{dashboard.average}}</li>
- <li><strong>{% trans "Variance:" %}</strong> {{dashboard.variance}}</li>
- <li><strong>{% trans "Standard deviation:" %}</strong> {{dashboard.standard_deviation}}</li>
- <li><strong>{% trans "Median:" %}</strong> {{dashboard.median}}</li>
- <li><strong>{% trans "Mode:" %}</strong> {{dashboard.mode}}</li>
- </ul>
- {% endif %}
- {% if dashboard.operation_average %}
- <h4>{% trans "By operations" %}</h4>
- <ul>
- <li><strong>{% trans "Average:" %}</strong> {{dashboard.operation_average}}</li>
- <li><strong>{% trans "Variance:" %}</strong> {{dashboard.operation_variance}}</li>
- <li><strong>{% trans "Standard deviation:" %}</strong> {{dashboard.operation_standard_deviation}}</li>
- <li><strong>{% trans "Median:" %}</strong> {{dashboard.operation_median}}</li>
- <li><strong>{% trans "Mode:" %}</strong> {{dashboard.operation_mode}}</li>
- </ul>
- {% endif %}
- <h4>{% trans "Created last" %}</h4>
+
<div class='table'>
<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>
- </tr>{% endfor %}
+ <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%}
+ </tr>
</table>
</div>
- <h4>{% trans "Recent changes" %}</h4>
+
<div class='table'>
<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>
- </tr>{% endfor %}
+ <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%}
+ </tr>
</table>
</div>
+
</div>
-{% endfor%}
<div>
- <h3>{% trans "Users" %}</h3>
+
+ <h3>{% trans "Rescue archaeology" %}</h3>
+
+ <p><strong>{% trans "Total:" %}</strong> {{dashboard.rescue.total_number}}</p>
+
+ <div class='table'>
+ <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%}
+ </tr>
+ </table>
+ </div>
+
+ <div class='table'>
+ <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%}
+ </tr>
+ </table>
+ </div>
+
+ <div class='table'>
+ <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%}
+ </tr>
+ </table>
+ </div>
+
+ <div class='table'>
+ <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%}
+ </tr>
+ </table>
+ </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>
+
+ <div class='table'>
+ <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%}
+ </tr>
+ </table>
+ </div>
+
+ <div class='table'>
+ <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%}
+ </tr>
+ </table>
+ </div>
+
+ <div class='table'>
+ <table>
+ <caption>{% trans "Surface by department (m²)"%}</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}}</td>{% endfor%}
+ </tr>
+ </table>
+ </div>
+
<div class='table'>
<table>
- <tr><th>{% trans "User type" %}</th><th>{% trans "Number" %}</th></tr>
- {% for user_type in ishtar_users.types %}
+ <caption>{% trans "Main towns by number"%}</caption>
+ <tr>
+ {% for town in dashboard.rescue.towns %}<th>{{town.town__name}}</th>{% endfor %}
+ </tr>
<tr>
- <td class='string'>{{user_type.person__person_type__label}}</td>
- <td>{{user_type.number}}</td>
+ {% for town in dashboard.rescue.towns %}<td>{{town.number}}</td>{% endfor%}
</tr>
- {% endfor%}
</table>
</div>
+
+ <div class='table'>
+ <table>
+ <caption>{% trans "Main towns by surface (m²)"%}</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}}</td>{% endfor%}
+ </tr>
+ </table>
+ </div>
+
+ </div>
</div>
{% endblock %}