From 97c69aab0038bbd067017a9a43ad67e477abc2e3 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 15 Oct 2014 01:14:31 +0200 Subject: Dashboard: implement a form to choose criteria for the graph display --- ishtar_common/templates/base.html | 2 +- .../ishtar/dashboards/dashboard_main.html | 6 +- .../ishtar/dashboards/dashboard_main_detail.html | 110 ++++++++++++++------- .../dashboards/dashboard_main_detail_users.html | 8 +- 4 files changed, 86 insertions(+), 40 deletions(-) (limited to 'ishtar_common/templates') diff --git a/ishtar_common/templates/base.html b/ishtar_common/templates/base.html index bfacee069..1ebebd815 100644 --- a/ishtar_common/templates/base.html +++ b/ishtar_common/templates/base.html @@ -2,7 +2,7 @@ {% load url from future%} - + diff --git a/ishtar_common/templates/ishtar/dashboards/dashboard_main.html b/ishtar_common/templates/ishtar/dashboards/dashboard_main.html index 06b671343..8822875b5 100644 --- a/ishtar_common/templates/ishtar/dashboards/dashboard_main.html +++ b/ishtar_common/templates/ishtar/dashboards/dashboard_main.html @@ -8,6 +8,7 @@ + {% endblock %} {% block content %} @@ -18,8 +19,9 @@ $(function() { $( "#dash-tabs" ).tabs(); });
+
  • {{label}}
  • {% endfor %} +
  • {% trans "Users" %}
  • +
    {% endblock %} diff --git a/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html b/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html index 6a99c4fdd..610457ae3 100644 --- a/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html +++ b/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html @@ -1,38 +1,21 @@ {% load i18n %} -
    - -

    {{lbl}}

    +{% load url from future %} +

    {% trans "Numbers" %}

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

    -
    +
    + {% if form %} +
    +
    + {% csrf_token %} + {{form}} +
    + +
    +
    + {% endif %} {% comment %} {% for idx, lbl, values in dashboard.values %} @@ -43,7 +26,7 @@ var plot_{{item_name}} = $.jqplot('chart_{{item_name}}', {% endfor%}
    {% endcomment %}
    - {% if dashboard.years %} + {% if dashboard.periods %}

    {% trans "By years" %}

    • {% trans "Average:" %} {{dashboard.average}}
    • @@ -65,7 +48,7 @@ var plot_{{item_name}} = $.jqplot('chart_{{item_name}}', {% endif %}

      {% trans "Created last" %}

      - +
      {% for item in dashboard.lasts %} @@ -76,7 +59,7 @@ var plot_{{item_name}} = $.jqplot('chart_{{item_name}}',

      {% trans "Recent changes" %}

      -
      {{lbl}}{% trans "Created" %}
      {{item}}
      +
      {% for item in dashboard.recents %} @@ -86,3 +69,64 @@ var plot_{{item_name}} = $.jqplot('chart_{{item_name}}',
      {{lbl}}{% trans "Modified" %}
      {{item}}
    + diff --git a/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail_users.html b/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail_users.html index 6602d5193..6ffd8c3c9 100644 --- a/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail_users.html +++ b/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail_users.html @@ -1,5 +1,5 @@ {% load i18n %} -

    {% trans "Users" %}

    +
    -
    +
    - +
    {% for user_type in ishtar_users.types %} -- cgit v1.2.3
    {% trans "User type" %}{% trans "Number" %}