From 79b6f50c48ed7bf8bb56f9d2439f64aeab2861ee Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 14 Oct 2014 18:31:32 +0200 Subject: Re-arrange dashboard in tabs --- .../ishtar/dashboards/dashboard_main.html | 133 ++------------------- .../ishtar/dashboards/dashboard_main_detail.html | 88 ++++++++++++++ .../dashboards/dashboard_main_detail_users.html | 36 ++++++ 3 files changed, 134 insertions(+), 123 deletions(-) create mode 100644 ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html create mode 100644 ishtar_common/templates/ishtar/dashboards/dashboard_main_detail_users.html (limited to 'ishtar_common/templates') diff --git a/ishtar_common/templates/ishtar/dashboards/dashboard_main.html b/ishtar_common/templates/ishtar/dashboards/dashboard_main.html index 3242da9a3..06b671343 100644 --- a/ishtar_common/templates/ishtar/dashboards/dashboard_main.html +++ b/ishtar_common/templates/ishtar/dashboards/dashboard_main.html @@ -1,6 +1,6 @@ {% extends "base.html" %} {% load i18n %} -{% load range %} +{% load url from future %} {% block extra_head %} {{form.media}} @@ -11,128 +11,15 @@ {% endblock %} {% block content %} -
-{% for lbl, dashboard in items %} - -

{{lbl}}

-
-

{% trans "Numbers" %}

-

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

-
-
- {% comment %} - - {% for idx, lbl, values in dashboard.values %} - - - {% for value in values %}{% endfor%} - - {% endfor%} -
{{lbl}}{{value}}
{% endcomment %} -
- {% if dashboard.years %} -

{% trans "By years" %}

-
    -
  • {% trans "Average:" %} {{dashboard.average}}
  • -
  • {% trans "Variance:" %} {{dashboard.variance}}
  • -
  • {% trans "Standard deviation:" %} {{dashboard.standard_deviation}}
  • -
  • {% trans "Median:" %} {{dashboard.median}}
  • -
  • {% trans "Mode:" %} {{dashboard.mode}}
  • -
- {% endif %} - {% if dashboard.operation_average %} -

{% trans "By operations" %}

-
    -
  • {% trans "Average:" %} {{dashboard.operation_average}}
  • -
  • {% trans "Variance:" %} {{dashboard.operation_variance}}
  • -
  • {% trans "Standard deviation:" %} {{dashboard.operation_standard_deviation}}
  • -
  • {% trans "Median:" %} {{dashboard.operation_median}}
  • -
  • {% trans "Mode:" %} {{dashboard.operation_mode}}
  • -
- {% endif %} -

{% trans "Created last" %}

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

{% trans "Recent changes" %}

-
- - - {% for item in dashboard.recents %} - - - - {% endfor %} -
{{lbl}}{% trans "Modified" %}
{{item}}{{item.history_date}}{% if item.get_show_url %}{%trans "Show"%}{%endif%}
-
-
-{% endfor%} - -

{% trans "Users" %}

-
- -
-
- - - {% for user_type in ishtar_users.types %} - - - - - {% endfor%} -
{% trans "User type" %}{% trans "Number" %}
{{user_type.person__person_types__label}}{#TODO: Display all#}{{user_type.number}}
-
+
+
+
    + {% for label, app in app_list %} +
  • {{label}}
  • + {% endfor %}
+
{% endblock %} diff --git a/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html b/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html new file mode 100644 index 000000000..6a99c4fdd --- /dev/null +++ b/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html @@ -0,0 +1,88 @@ +{% load i18n %} +
+ +

{{lbl}}

+
+

{% trans "Numbers" %}

+

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

+
+
+ {% comment %} + + {% for idx, lbl, values in dashboard.values %} + + + {% for value in values %}{% endfor%} + + {% endfor%} +
{{lbl}}{{value}}
{% endcomment %} +
+ {% if dashboard.years %} +

{% trans "By years" %}

+
    +
  • {% trans "Average:" %} {{dashboard.average}}
  • +
  • {% trans "Variance:" %} {{dashboard.variance}}
  • +
  • {% trans "Standard deviation:" %} {{dashboard.standard_deviation}}
  • +
  • {% trans "Median:" %} {{dashboard.median}}
  • +
  • {% trans "Mode:" %} {{dashboard.mode}}
  • +
+ {% endif %} + {% if dashboard.operation_average %} +

{% trans "By operations" %}

+
    +
  • {% trans "Average:" %} {{dashboard.operation_average}}
  • +
  • {% trans "Variance:" %} {{dashboard.operation_variance}}
  • +
  • {% trans "Standard deviation:" %} {{dashboard.operation_standard_deviation}}
  • +
  • {% trans "Median:" %} {{dashboard.operation_median}}
  • +
  • {% trans "Mode:" %} {{dashboard.operation_mode}}
  • +
+ {% endif %} +

{% trans "Created last" %}

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

{% trans "Recent changes" %}

+
+ + + {% for item in dashboard.recents %} + + + + {% endfor %} +
{{lbl}}{% trans "Modified" %}
{{item}}{{item.history_date}}{% if item.get_show_url %}{%trans "Show"%}{%endif%}
+
+
diff --git a/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail_users.html b/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail_users.html new file mode 100644 index 000000000..6602d5193 --- /dev/null +++ b/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail_users.html @@ -0,0 +1,36 @@ +{% load i18n %} +

{% trans "Users" %}

+
+ +
+
+ + + {% for user_type in ishtar_users.types %} + + + + + {% endfor%} +
{% trans "User type" %}{% trans "Number" %}
{{user_type.person__person_types__label}}{#TODO: Display all#}{{user_type.number}}
+
+
+ -- cgit v1.2.3