graph.html 1006 B

1234567891011121314151617181920212223242526272829303132
  1. {% extends "admin/stats/form.html" %}
  2. {% load i18n %}
  3. {% import "_forms.html" as form_theme with context %}
  4. {% from "admin/macros.html" import page_title %}
  5. {% from "admin/stats/plot.html" import draw_plot_tooltips, draw_plot with context %}
  6. {% block title %}{{ page_title(title=title, parent=_('Stats')) }}{% endblock %}
  7. {% block action %}
  8. <h2>{{ title }} <small>{% trans count=graph.total, total=graph.total|intcomma -%}One item found
  9. {%- pluralize -%}
  10. {{ total }} items found
  11. {%- endtrans %}</small></h2>
  12. <div class="graph">
  13. <canvas id="graph-canvas" height="250px"></canvas>
  14. {{ draw_plot_tooltips('graph-canvas', graph) }}
  15. <div class="timeline">
  16. <div class="pull-left">{{ graph.start|date }}</div>
  17. <div class="pull-right">{{ graph.end|date }}</div>
  18. </div>
  19. </div>
  20. <hr>
  21. {{ super() }}
  22. {% endblock %}
  23. {% block javascripts %}
  24. <script type="text/javascript">
  25. {{ draw_plot('draw_graph', 'graph-canvas', graph.max, graph.stat) }}
  26. </script>
  27. {% endblock %}