diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2012-10-18 17:49:57 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2012-10-18 17:51:30 +0200 |
commit | ade7bd4b74d9ae42c54648cc7390d8c067b5c5e3 (patch) | |
tree | 4136673563f802d6de992512e3c4adde86ef2a4e /ishtar_common/templates/dashboard_main.html | |
parent | 9a3d3dcbca9395c00e55d6ee4909ba9b9a4752f8 (diff) | |
download | Ishtar-ade7bd4b74d9ae42c54648cc7390d8c067b5c5e3.tar.bz2 Ishtar-ade7bd4b74d9ae42c54648cc7390d8c067b5c5e3.zip |
Djangoization - Major refactoring (step 1)
Diffstat (limited to 'ishtar_common/templates/dashboard_main.html')
-rw-r--r-- | ishtar_common/templates/dashboard_main.html | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/ishtar_common/templates/dashboard_main.html b/ishtar_common/templates/dashboard_main.html new file mode 100644 index 000000000..e710dbe16 --- /dev/null +++ b/ishtar_common/templates/dashboard_main.html @@ -0,0 +1,82 @@ +{% extends "base.html" %} +{% load i18n %} +{% load range %} +{% block extra_head %} +{{form.media}} +{% endblock %} +{% block content %} +<div class='dashboard'> +{% for lbl, dashboard in items %} + <div> + <h3>{{lbl}}</h3> + <h4>{% trans "Numbers" %}</h4> + <p><strong>{% trans "Total:" %}</strong> {{dashboard.total_number}}</p> + <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%} + </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 %} + </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 %} + </table> + </div> + </div> +{% endfor%} + <div> + <h3>{% trans "Users" %}</h3> + <div class='table'> + <table> + <tr><th>{% trans "User type" %}</th><th>{% trans "Number" %}</th></tr> + {% for user_type in ishtar_users.types %} + <tr> + <td class='string'>{{user_type.person__person_type__label}}</td> + <td>{{user_type.number}}</td> + </tr> + {% endfor%} + </table> + </div> +</div> +{% endblock %} |