blob: d443a7721b02cce4f1f17bbad71f74220743b911 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
{% load i18n %}
<style>
</style>
<div>
<div id="stats-form-{{name}}">
<div class="form-row">
<div class="col-6 col-lg-3 offset-lg-3">
<label for="stats_modality_1-{{name}}">{% trans "Modality 1" %}</label>
<select class="form-control" id="stats_modality_1-{{name}}" name="stats_modality_1">
{% for modality, modality_lbl in current_model.STATISTIC_MODALITIES_OPTIONS.items %}
<option value="{{modality}}"{% if forloop.first %} selected='selected'{% endif %}>{{modality_lbl}}</option>
{% endfor %}
</select>
</div>
<div class="col-6 col-lg-3">
<label for="stats_modality_2-{{name}}">{% trans "Modality 2" %}</label>
<select class="form-control" id="stats_modality_2-{{name}}" name="stats_modality_2">
<option value="" selected='selected'>--</option>
{% for modality, modality_lbl in current_model.STATISTIC_MODALITIES_OPTIONS.items %}
<option value="{{modality}}">{{modality_lbl}}</option>
{% endfor %}
</select>
</div>
</div>
<div class="form-row">
<div class="col-6 col-lg-3 offset-lg-3">
<label for="stats_renderer-{{name}}">{% trans "Type" %}</label>
<select class="form-control" id="stats_renderer-{{name}}" name="stats_renderer">
<option value="bar" selected='selected'>{% trans "Bar" %}</option>
<option value="line">{% trans "Line" %}</option>
<option value="pie">{% trans "Pie" %}</option>
<option value="table">{% trans "Table" %}</option>
</select>
</div>
<div class="col-6 col-lg-3">
<label for="stats_sum-{{name}}">{% trans "Sum" %}</label>
<select class="form-control" id="stats_sum-{{name}}" name="stats_sum">
{% for sum_var, sum_var_lbl in current_model.STATISTIC_SUM_VARIABLE.items %}
<option value="{{sum_var}}"{% if forloop.first %}
selected='selected'{% endif %}>{{sum_var_lbl.0}}</option>
{% endfor %}
</select>
</div>
</div>
</div>
<hr/>
{% with stats_name=name %}{% with extra="default" %}
{% include "blocks/DataTables-stats-detail.html" %}
{% endwith %}{% endwith %}
{% if external_sources %}{% for source_id, source_label, source_url in external_sources %}
{% with stats_name=name %}{% with extra=source_id %}
{% include "blocks/DataTables-stats-detail.html" %}
{% endwith %}{% endwith %}
{% endfor %}{% endif %}
</div>
|