Revize bb2d43b5
Přidáno uživatelem Martin Sebela před více než 3 roky(ů)
website/templates/heatmap.html.twig | ||
---|---|---|
8 | 8 |
<link rel="stylesheet" href="{{ asset('css/bootstrap-datepicker3.css') }}"> |
9 | 9 |
{% endblock %} |
10 | 10 |
|
11 |
|
|
12 | 11 |
{% block body %} |
13 | 12 |
|
14 | 13 |
<header class="map"> |
... | ... | |
22 | 21 |
</button> |
23 | 22 |
|
24 | 23 |
<div class="collapse navbar-collapse ml-auto" id="navigation"> |
25 |
|
|
26 | 24 |
{{ form_start(form, {'action': path('heatmap'), 'method': 'GET'}) }} |
27 | 25 |
<ul class="navbar-nav"> |
28 | 26 |
<li class="nav-item"> |
29 | 27 |
{{ form_label(form.date, 'Vyberte datum', { |
30 | 28 |
label_attr: {class: 'font-weight-bold'} |
31 | 29 |
}) }} |
32 |
{{ |
|
33 |
form_widget(form.date, |
|
30 |
{{ form_widget(form.date, |
|
34 | 31 |
{ |
35 | 32 |
'type' : 'text', |
36 | 33 |
'id' : 'date', |
... | ... | |
46 | 43 |
</li> |
47 | 44 |
<li class="nav-item"> |
48 | 45 |
<label class="font-weight-bold">Vyberte čas</label> |
49 |
<div class="dropdown">
|
|
50 |
<button class="btn dropdown-toggle" type="button_1" id="dropdownMenuButton-time" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
46 |
<div class="dropdown"> |
|
47 |
<button type="button" class="btn dropdown-toggle" id="dropdownMenuButtonTime" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
51 | 48 |
{{ current_time }} |
52 | 49 |
</button> |
53 |
<div id="dataset-dropdown-time" class="dropdown-menu" aria-labelledby="dropdownMenuButton-time">
|
|
54 |
{% for oneTime in form.time.children %} |
|
50 |
<div id="dataset-dropdown-time" class="dropdown-menu" aria-labelledby="dropdownMenuButtonTime">
|
|
51 |
{% for oneTime in form.time.children %}
|
|
55 | 52 |
<label class="dropdown-item custom-dropdown-item"> |
56 |
{{ form_widget(oneTime, { |
|
57 |
attr: {class: 'd-none'} |
|
58 |
}) }} |
|
59 |
{{ form_label(oneTime, null) }} |
|
60 |
</label> |
|
61 |
{% endfor %} |
|
53 |
{{ form_widget(oneTime, {attr: {class: 'd-none'}}) }} |
|
54 |
{{ form_label(oneTime, null) }} |
|
55 |
</label> |
|
56 |
{% endfor %} |
|
57 |
</div> |
|
62 | 58 |
</div> |
63 | 59 |
</li> |
64 | 60 |
<li class="nav-item"> |
65 | 61 |
<div class="dropdown"> |
66 |
<button class="btn dropdown-toggle font-weight-bold" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
62 |
<button type="button" class="btn dropdown-toggle font-weight-bold" id="dropdownMenuButtonDataset" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
67 | 63 |
Vyberte datovou sadu |
68 |
</button> |
|
69 |
<div id="dataset-dropdown" class="dropdown-menu" aria-labelledby="dropdownMenuButton"> |
|
70 |
{% for oneType in form.type.children %} |
|
71 |
<label class="dropdown-item custom-dropdown-item"> |
|
72 |
<div class="custom-control custom-checkbox custom-checkbox-{{oneType.vars.value}}"> |
|
73 |
{{ form_widget(oneType, { |
|
74 |
attr: { |
|
75 |
'class': "custom-control-input custom-control-input-#{oneType.vars.value}", |
|
76 |
'data-dataset-display-name': "#{oneType.vars.label}" |
|
77 |
} |
|
78 |
}) }} |
|
79 |
{{ form_label(oneType, null, { |
|
80 |
'label_attr': {'class': 'custom-control-label'} |
|
81 |
}) }} |
|
82 |
</div> |
|
83 |
</label> |
|
84 |
{% endfor %} |
|
64 |
</button> |
|
65 |
<div id="dataset-dropdown" class="dropdown-menu" aria-labelledby="dropdownMenuButtonDataset"> |
|
66 |
{% for oneDataset in form.type.children %} |
|
67 |
<div class="dropdown-item custom-dropdown-item"> |
|
68 |
<div class="custom-control custom-checkbox custom-checkbox-{{oneDataset.vars.value}}"> |
|
69 |
{{ form_widget(oneDataset, { |
|
70 |
attr: { |
|
71 |
'class': "custom-control-input custom-control-input-#{oneDataset.vars.value}", |
|
72 |
'data-dataset-display-name': "#{oneDataset.vars.label}" |
|
73 |
} |
|
74 |
}) }} |
|
75 |
{{ form_label(oneDataset, null, { |
|
76 |
'label_attr': {'class': 'custom-control-label'} |
|
77 |
}) }} |
|
78 |
</div> |
|
79 |
</div> |
|
80 |
{% endfor %} |
|
81 |
</div> |
|
85 | 82 |
</div> |
86 |
</div> |
|
87 | 83 |
</li> |
88 |
|
|
89 | 84 |
<li class="nav-item"> |
90 |
{{ |
|
91 |
form_widget(form.submit, |
|
85 |
{{ form_widget(form.submit, |
|
92 | 86 |
{ |
93 | 87 |
'name' : '', |
94 | 88 |
'label' : '', |
... | ... | |
100 | 94 |
}) |
101 | 95 |
}} |
102 | 96 |
</li> |
103 |
</ul> |
|
104 |
|
|
97 |
</ul> |
|
105 | 98 |
{{ form_end(form) }} |
106 |
|
|
107 | 99 |
</div> |
108 | 100 |
</nav> |
109 | 101 |
</header> |
... | ... | |
115 | 107 |
<div class="circle"></div> |
116 | 108 |
</a> |
117 | 109 |
<div class="locations collapse" id="mapLocations"> |
118 |
<ul> |
|
119 |
<li onclick="setMapView(49.7248, 13.3521, 17)">Kampus ZČU</li> |
|
120 |
<li onclick="setMapView(49.7367263, 13.3709177, 18)">FPE – Pedagogická fakulta</li> |
|
121 |
<li onclick="setMapView(49.7474950, 13.3748308, 18)">FPR – Právnická fakulta</li> |
|
122 |
<li onclick="setMapView(49.7450169, 13.3702668, 18)">FZS – Fakulta zdravotnických studií</li> |
|
123 |
<li onclick="setMapView(50.0762590, 12.3640213, 17)">FEK – pracoviště Cheb</li> |
|
124 |
<li onclick="setMapView(49.7236785, 13.3353118, 18)">NTC – výzkumné centrum</li> |
|
125 |
<li onclick="setMapView(49.9590236, 13.1597114, 18)">Zámek ZČU – Nečtiny</li> |
|
126 |
<li onclick="setMapView(49.7345564, 13.3585038, 18)">Koleje Borská</li> |
|
127 |
<li onclick="setMapView(49.7250373, 13.3696772, 18)">Koleje Bory</li> |
|
128 |
<li onclick="setMapView(49.7600000, 13.3723463, 18)">Koleje Lochotín</li> |
|
129 |
<li onclick="setMapView(49.7293726, 13.3589237, 15)">Oblast s koloběžkami</li> |
|
130 |
</ul> |
|
110 |
{% include 'heatmap-locations.html.twig' %} |
|
131 | 111 |
</div> |
132 | 112 |
</div> |
133 | 113 |
|
... | ... | |
191 | 171 |
initDatepicker("{{ path('dates') }}"); |
192 | 172 |
initLocationsMenu(); |
193 | 173 |
initMap(); |
194 |
$( document ).ready(function() {
|
|
174 |
$(document).ready(function() {
|
|
195 | 175 |
onDocumentReady(); |
196 | 176 |
checkDataSetsAvailability("{{ path('available') }}") |
197 | 177 |
{% if submitted %} |
... | ... | |
209 | 189 |
<style> |
210 | 190 |
{% for key, item in dataset_colors %} |
211 | 191 |
.custom-control-input-{{key}}:focus~.custom-control-label::before { |
212 |
border-color: {{item}} !important;
|
|
213 |
box-shadow: 0 0 0 0.2rem rgba(192,192,192, 0.4) !important;
|
|
192 |
border-color: {{item}} !important; |
|
193 |
box-shadow: 0 0 0 0.2rem rgba(192,192,192, 0.4) !important; |
|
214 | 194 |
} |
215 | 195 |
|
216 | 196 |
.custom-control-input-{{key}}:checked~.custom-control-label::before { |
217 |
border-color: {{item}} !important;
|
|
218 |
background-color: {{item}} !important;
|
|
197 |
border-color: {{item}} !important; |
|
198 |
background-color: {{item}} !important; |
|
219 | 199 |
} |
220 | 200 |
|
221 | 201 |
.custom-control-input-{{key}}:focus:not(:checked)~.custom-control-label::before { |
222 |
border-color: {{item}} !important;
|
|
202 |
border-color: {{item}} !important; |
|
223 | 203 |
} |
224 | 204 |
|
225 | 205 |
.custom-control-input-{{key}}:not(:disabled):active~.custom-control-label::before { |
226 |
background-color: {{item}} !important;
|
|
227 |
border-color: {{item}} !important;
|
|
206 |
background-color: {{item}} !important; |
|
207 |
border-color: {{item}} !important; |
|
228 | 208 |
} |
229 | 209 |
|
230 |
.popup-{{key}} > .leaflet-popup-content-wrapper, .popup-{{key}} .leaflet-popup-tip{ |
|
210 |
.popup-{{key}} > .leaflet-popup-content-wrapper, .popup-{{key}} .leaflet-popup-tip {
|
|
231 | 211 |
background-color: {{item}} !important; |
232 | 212 |
} |
233 | 213 |
{% endfor %} |
Také k dispozici: Unified diff
Re #8159 - frontend bugfixes and refactoring