changes order in tables, fixes statistiques views navbar titles

This commit is contained in:
artus
2018-10-21 11:54:02 +02:00
parent 3f153408e0
commit 416d7d47f7
9 changed files with 31 additions and 95 deletions

View File

@@ -12,7 +12,7 @@
{% block title %}Statistiques >{% endblock %}
{% block breadcrumbs %}
<li><a href="{% url "statistiques:index" %}">Statistiques</a></li>
<h6 class="navbar-text text-white my-2">Statistiques</h6>
{% endblock %}
{% block sidebar %}

View File

@@ -1,27 +0,0 @@
{% extends "statistiques/base.html" %}
{% load static %}
{% block title %}{{ block.super }} Maraudes{% endblock %}
{% block sidebar %}
{{ block.super }}
<div class="panel panel-primary">
<div class="panel-body text-right">
{% include "statistiques/filter_form.html" %}
</div>
</div>
{% endblock %}
{% block breadcrumbs %}
{{ block.super }}
<li>Fréquentation</li>
{% endblock %}
{% block page_content %}
{{ rencontres_par_heure.as_html }}
{{ rencontres_par_mois.as_html }}
<hr />
{{ rencontres_par_sujet.as_html }}
{% endblock %}

View File

@@ -3,7 +3,6 @@
{% block title %}{{ block.super }} Maraudes{% endblock %}
{% block sidebar %}
{{ block.super }}
{% include "statistiques/filter_form.html" %}
@@ -11,7 +10,7 @@
{% block breadcrumbs %}
{{ block.super }}
<li>Données générales</li>
<p class="navbar-text my-2 ml-2">Données générales</p>
{% endblock %}
{% block page_content %}

View File

@@ -4,8 +4,7 @@
{% block breadcrumbs %}
{{block.super}}
<li>{{page_title}}</li>
{% if active %}<li>{{active}}</li>{% endif %}
<p class="navbar-text my-2 ml-2">{{page_title}}</p>
{% endblock %}
{% block sidebar %}

View File

@@ -1,39 +0,0 @@
{% extends "statistiques/base.html" %}
{% block title %}{{block.super}} Typologie{% endblock %}
{% block breadcrumbs %}{{block.super}}<li>Typologie</li>{% endblock %}
{% block sidebar %}
{{ block.super }}
{% include "statistiques/filter_form.html" %}
<p class="text-muted px-3">Échantillon : {{ queryset.count }} sujets</p>
{% endblock %}
{% block page_content %}
<script type="text/javascript">
function hideAll() {
{% for _, graph in graphs %}{% with graph.get_html_id as id %}
$("#tab-{{id}}").attr("class", "");
$("#wrapper-{{id}}").hide();
{% endwith %}{% endfor %}
}
function showGraph(id) {
hideAll();
$("#tab-" + id).attr("class", "active");
$("#wrapper-" + id).show();
}
</script>
<ul class="nav nav-tabs">
{% for title, graph in graphs %}
<li class="nav-item" id="tab-{{graph.get_html_id}}">
<a class="nav-link" href="#" onclick="showGraph('{{graph.get_html_id}}');">{{ title }}</a>
</li>{% endfor %}
</ul>
{% for title, graph in graphs %}
{{ graph.as_html }}
{% endfor %}
{% endblock %}