Projekt

Obecné

Profil

Stáhnout (6.35 KB) Statistiky
| Větev: | Revize:
1
{% extends 'base.html.twig' %}
2
  
3
{% block title %}Heatmap.ZČU{% endblock %}
4
{% block stylesheets %}
5
  <link rel="stylesheet" href="{{ asset('css/leaflet.css') }}">
6
  <link rel="stylesheet" href="{{ asset('css/bootstrap.min.css') }}">
7
  <link rel="stylesheet" href="{{ asset('css/style.css') }}">
8
  <link rel="stylesheet" href="{{ asset('css/bootstrap-datepicker3.css') }}">
9
{% endblock %}
10

    
11

    
12
{% block body %}
13

    
14
  <header class="map">
15
    <nav class="navbar navbar-expand-lg ml-auto">
16
      <a href="{{ path('home') }}" class="navbar-brand">
17
        <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
      <div class="collapse navbar-collapse ml-auto" id="navigation">
25
        
26
        {{ form_start(form, {'action': path('heatmap'), 'method': 'GET'}) }}
27

    
28
          <ul class="navbar-nav">
29
            <li class="nav-item">
30
              {{ form_label(form.date, 'Vyberte datum') }}
31
              {{
32
                form_widget(form.date,
33
                {
34
                  'type' : 'text',
35
                  'id' : 'date',
36
                  'attr' : {
37
                    'class' : 'form-control',
38
                    'maxlength' : '10',
39
                    'placeholder' : 'YYYY-MM-DD',
40
                    'autocomplete' : 'off',
41
                    'onChange' : 'checkDataSetsAvailability("' ~ path('available') ~ '")'
42
                  }
43
                })
44
              }}
45
            </li>
46

    
47
            <li class="nav-item">
48
              {{ form_label(form.time, 'Vyberte čas') }}
49
              {{
50
                form_widget(form.time, {
51
                  'id' : 'time',
52
                  'attr' : {
53
                    'class' : 'custom-select'
54
                  }
55
                })
56
              }}             
57
            </li>
58

    
59
            <li class="nav-item">
60
              {{ form_label(form.type, 'Vyberte datovou sadu') }}
61
              {{
62
                form_widget(form.type, {
63
                  'id' : 'type',
64
                  'attr' : {
65
                    'class' : 'custom-select'
66
                  }
67
                })
68
              }}  
69
            </li>
70

    
71
            <li class="nav-item">
72
              {{
73
                form_widget(form.submit,
74
                {
75
                  'label' : 'Potvrdit výběr',
76
                  'type' : 'submit',
77
                  'id' : 'submit-btn',
78
                  'attr' : {
79
                    'class': 'btn btn-secondary'
80
                  }
81
                })
82
              }}
83
            </li>
84
          </ul> 
85
        
86
        {{ form_end(form) }}
87

    
88
      </div>
89
    </nav>
90
  </header>
91

    
92
  <div class="map-locations">
93
    <a class="menu" data-toggle="collapse" href="#mapLocations" role="button" aria-expanded="false" aria-controls="mapLocations">
94
      <span class="desktop">Prohlédněte si jednotlivé oblasti</span>
95
      <span class="mobile">Jednotlivé oblasti</span>
96
      <div class="circle"></div>
97
    </a>
98
    <div class="locations collapse" id="mapLocations">
99
      <ul>
100
        <li onclick="setMapView(49.7248, 13.3521, 17)">Kampus ZČU</li>
101
        <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
        <li onclick="setMapView(50.0762590, 12.3640213, 17)">FEK &ndash; pracoviště Cheb</li>
105
        <li onclick="setMapView(49.7236785, 13.3353118, 18)">NTC &ndash; výzkumné centrum</li>
106
        <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
      </ul>
112
    </div>
113
  </div>
114

    
115
  <div class="player">
116
    <div class="prev" onclick="previous()"></div>
117
    <div class="play" id="play-pause" onclick="changeAnimationState()"></div>
118
    <div class="next" onclick="next()"></div>
119

    
120
    <div class="datetime">
121
    
122
    {% if form.vars.value.date %}
123
      <div class="date" onclick="openDatepicker()">{{ form.vars.value.date|date('j. n. Y') }}</div>
124
    {% endif %}
125

    
126
    <div class="timeline">
127
      <div class="time hour-0" id="timeline">0:00</div>
128

    
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
    </div>
155
    </div>
156
  </div>
157

    
158
  <div id="heatmap"></div>
159
  
160
{% endblock %}
161

    
162
{% block javascripts %}
163

    
164
    <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
    <script src="{{ asset('js/zcu-heatmap.js') }}"></script>
171
    <script>
172
        initDatepicker("{{ path('dates') }}");
173
        initLocationsMenu();
174
        initMap();
175
        checkDataSetsAvailability("{{ path('available') }}")
176
        {% if submitted %}
177
        loadCurrentTimeHeatmap("{{ path('opendata') }}", "{{ path('positions') }}");
178
        {% endif %}
179

    
180
        $(window).resize(function() {
181
          initLocationsMenu();
182
        });
183
  </script>
184

    
185
{% endblock %}
(2-2/3)