Projekt

Obecné

Profil

Stáhnout (6.35 KB) Statistiky
| Větev: | Revize:
1 3fc08f2d vastja
{% extends 'base.html.twig' %}
2 c6708024 vastja
  
3 3c909967 Martin Sebela
{% block title %}Heatmap.ZČU{% endblock %}
4 3fc08f2d vastja
{% block stylesheets %}
5 c883131e Martin Sebela
  <link rel="stylesheet" href="{{ asset('css/leaflet.css') }}">
6
  <link rel="stylesheet" href="{{ asset('css/bootstrap.min.css') }}">
7 3c909967 Martin Sebela
  <link rel="stylesheet" href="{{ asset('css/style.css') }}">
8 c883131e Martin Sebela
  <link rel="stylesheet" href="{{ asset('css/bootstrap-datepicker3.css') }}">
9 3fc08f2d vastja
{% endblock %}
10
11 c6708024 vastja
12 3fc08f2d vastja
{% block body %}
13
14 c6708024 vastja
  <header class="map">
15 3fc22d29 Martin Sebela
    <nav class="navbar navbar-expand-lg ml-auto">
16
      <a href="{{ path('home') }}" class="navbar-brand">
17 c6708024 vastja
        <h1>Heatmap.ZČU</h1>
18
      </a>
19
20
      <button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navigation" aria-controls="navigation" aria-expanded="false" aria-label="Toggle navigation">
21
        <span class="navbar-toggler-icon"></span>
22
      </button>
23
24 3fc22d29 Martin Sebela
      <div class="collapse navbar-collapse ml-auto" id="navigation">
25 03c02899 vastja
        
26 896f0d9c vastja
        {{ form_start(form, {'action': path('heatmap'), 'method': 'GET'}) }}
27 03c02899 vastja
28 c6708024 vastja
          <ul class="navbar-nav">
29
            <li class="nav-item">
30 03c02899 vastja
              {{ form_label(form.date, 'Vyberte datum') }}
31
              {{
32
                form_widget(form.date,
33
                {
34 c883131e Martin Sebela
                  'type' : 'text',
35 03c02899 vastja
                  'id' : 'date',
36
                  'attr' : {
37 0a828a5a Martin Sebela
                    'class' : 'form-control',
38 a7e04778 Martin Sebela
                    'maxlength' : '10',
39
                    'placeholder' : 'YYYY-MM-DD',
40 63cd0d07 Martin Sebela
                    'autocomplete' : 'off',
41 03c02899 vastja
                    'onChange' : 'checkDataSetsAvailability("' ~ path('available') ~ '")'
42
                  }
43
                })
44
              }}
45 c6708024 vastja
            </li>
46
47
            <li class="nav-item">
48 4cc90563 vastja
              {{ form_label(form.time, 'Vyberte čas') }}
49 03c02899 vastja
              {{
50
                form_widget(form.time, {
51 64bc2934 vastja
                  'id' : 'time',
52 03c02899 vastja
                  'attr' : {
53 0a828a5a Martin Sebela
                    'class' : 'custom-select'
54 03c02899 vastja
                  }
55
                })
56
              }}             
57 c6708024 vastja
            </li>
58 3fc08f2d vastja
59 c6708024 vastja
            <li class="nav-item">
60 bc7738cd Martin Sebela
              {{ form_label(form.type, 'Vyberte datovou sadu') }}
61 03c02899 vastja
              {{
62
                form_widget(form.type, {
63 64bc2934 vastja
                  'id' : 'type',
64 03c02899 vastja
                  'attr' : {
65 0a828a5a Martin Sebela
                    'class' : 'custom-select'
66 03c02899 vastja
                  }
67
                })
68
              }}  
69 c6708024 vastja
            </li>
70 3fc08f2d vastja
71 c6708024 vastja
            <li class="nav-item">
72 03c02899 vastja
              {{
73
                form_widget(form.submit,
74
                {
75
                  'label' : 'Potvrdit výběr',
76
                  'type' : 'submit',
77 dfe43218 vastja
                  'id' : 'submit-btn',
78 03c02899 vastja
                  'attr' : {
79
                    'class': 'btn btn-secondary'
80
                  }
81
                })
82
              }}
83 c6708024 vastja
            </li>
84 03c02899 vastja
          </ul> 
85
        
86
        {{ form_end(form) }}
87
88 c6708024 vastja
      </div>
89
    </nav>
90
  </header>
91 3fc08f2d vastja
92 c236b33a msebela
  <div class="map-locations">
93 351696d5 Martin Sebela
    <a class="menu" data-toggle="collapse" href="#mapLocations" role="button" aria-expanded="false" aria-controls="mapLocations">
94 dd652e61 Martin Sebela
      <span class="desktop">Prohlédněte si jednotlivé oblasti</span>
95
      <span class="mobile">Jednotlivé oblasti</span>
96 c236b33a msebela
      <div class="circle"></div>
97 351696d5 Martin Sebela
    </a>
98 dd652e61 Martin Sebela
    <div class="locations collapse" id="mapLocations">
99 c236b33a msebela
      <ul>
100 72a438f3 vastja
        <li onclick="setMapView(49.7248, 13.3521, 17)">Kampus ZČU</li>
101 4e8c0e5b Martin Sebela
        <li onclick="setMapView(49.7367263, 13.3709177, 18)">FPE &ndash; Pedagogická fakulta</li>
102
        <li onclick="setMapView(49.7474950, 13.3748308, 18)">FPR &ndash; Právnická fakulta</li>
103
        <li onclick="setMapView(49.7450169, 13.3702668, 18)">FZS &ndash; Fakulta zdravotnických studií</li>
104 dd652e61 Martin Sebela
        <li onclick="setMapView(50.0762590, 12.3640213, 17)">FEK &ndash; pracoviště Cheb</li>
105 c236b33a msebela
        <li onclick="setMapView(49.7236785, 13.3353118, 18)">NTC &ndash; výzkumné centrum</li>
106 4e8c0e5b Martin Sebela
        <li onclick="setMapView(49.9590236, 13.1597114, 18)">Zámek ZČU &ndash; Nečtiny</li>
107
        <li onclick="setMapView(49.7345564, 13.3585038, 18)">Koleje Borská</li>
108
        <li onclick="setMapView(49.7250373, 13.3696772, 18)">Koleje Bory</li>
109
        <li onclick="setMapView(49.7600000, 13.3723463, 18)">Koleje Lochotín</li>
110
        <li onclick="setMapView(49.7293726, 13.3589237, 15)">Oblast s&nbsp;koloběžkami</li>
111 c236b33a msebela
      </ul>
112
    </div>
113
  </div>
114
115
  <div class="player">
116 a48642fb vastja
    <div class="prev" onclick="previous()"></div>
117
    <div class="play" id="play-pause" onclick="changeAnimationState()"></div>
118
    <div class="next" onclick="next()"></div>
119 351696d5 Martin Sebela
120 4e003182 Martin Sebela
    <div class="datetime">
121 bc0a7bfd Martin Sebela
    
122
    {% if form.vars.value.date %}
123
      <div class="date" onclick="openDatepicker()">{{ form.vars.value.date|date('j. n. Y') }}</div>
124
    {% endif %}
125 4e003182 Martin Sebela
126 351696d5 Martin Sebela
    <div class="timeline">
127 a48642fb vastja
      <div class="time hour-0" id="timeline">0:00</div>
128 351696d5 Martin Sebela
129
      <div class="hour"></div>
130
      <div class="hour"></div>
131
      <div class="hour"></div>
132
      <div class="hour"></div>
133
      <div class="hour"></div>
134
      <div class="hour"></div>
135
      <div class="hour"></div>
136
      <div class="hour"></div>
137
      <div class="hour"></div>
138
      <div class="hour"></div>
139
      <div class="hour"></div>
140
      <div class="hour"></div>
141
      <div class="hour"></div>
142
      <div class="hour"></div>
143
      <div class="hour"></div>
144
      <div class="hour"></div>
145
      <div class="hour"></div>
146
      <div class="hour"></div>
147
      <div class="hour"></div>
148
      <div class="hour"></div>
149
      <div class="hour"></div>
150
      <div class="hour"></div>
151
      <div class="hour"></div>
152
      <div class="hour"></div>
153
      <div class="end-dot"></div>
154 4e003182 Martin Sebela
    </div>
155 351696d5 Martin Sebela
    </div>
156 c236b33a msebela
  </div>
157
158 c6708024 vastja
  <div id="heatmap"></div>
159
  
160 3fc08f2d vastja
{% endblock %}
161
162
{% block javascripts %}
163
164 8feb1753 ballakt
    <script src="{{ asset('js/vendor/jquery-3.4.1.min.js') }}"></script>
165
    <script src="{{ asset('js/vendor/bootstrap.min.js') }}"></script>
166
    <script src="{{ asset('js/vendor/bootstrap-datepicker.min.js') }}"></script>
167
    <script src="{{ asset('js/vendor/bootstrap-datepicker.cs.min.js') }}" charset="UTF-8"></script>
168
    <script src="{{ asset('js/vendor/leaflet.js') }}"></script>
169
    <script src="{{ asset('js/vendor/leaflet-heat.js') }}"></script>
170 03c02899 vastja
    <script src="{{ asset('js/zcu-heatmap.js') }}"></script>
171
    <script>
172 0a828a5a Martin Sebela
        initDatepicker("{{ path('dates') }}");
173 dd652e61 Martin Sebela
        initLocationsMenu();
174 a48642fb vastja
        initMap();
175 5d599617 vastja
        checkDataSetsAvailability("{{ path('available') }}")
176 a48642fb vastja
        {% if submitted %}
177 a7e04778 Martin Sebela
        loadCurrentTimeHeatmap("{{ path('opendata') }}", "{{ path('positions') }}");
178 64bc2934 vastja
        {% endif %}
179 dd652e61 Martin Sebela
180
        $(window).resize(function() {
181
          initLocationsMenu();
182
        });
183 c883131e Martin Sebela
  </script>
184 3fc08f2d vastja
185
{% endblock %}