-
Notifications
You must be signed in to change notification settings - Fork 458
/
base.html
476 lines (468 loc) · 29.2 KB
/
base.html
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
{% load compress %}
{% load static %}
{% load i18n %}
{% load statici18n %}
{% load eventsignal %}
{% load eventurl %}
<!DOCTYPE html>
<html{% if rtl %} dir="rtl" class="rtl"{% endif %}>
<head>
<title>{% block title %}{% endblock %}{% if url_name != "index" %} :: {% endif %}
{{ settings.PRETIX_INSTANCE_NAME }}</title>
{% compress css %}
<link rel="stylesheet" type="text/x-scss" href="{% static "pretixcontrol/scss/main.scss" %}" />
<link rel="stylesheet" type="text/x-scss" href="{% static "lightbox/css/lightbox.scss" %}" />
{% endcompress %}
{% if DEBUG %}
<script type="text/javascript" src="{% url 'javascript-catalog' lang=request.LANGUAGE_CODE %}"></script>
{% else %}
<script src="{% statici18n request.LANGUAGE_CODE %}"></script>
{% endif %}
{% compress js %}
<script type="text/javascript" src="{% static "jquery/js/jquery-2.1.1.min.js" %}"></script>
<script type="text/javascript" src="{% static "js/jquery.formset.js" %}"></script>
<script type="text/javascript" src="{% static "typeahead/typeahead.bundle.js" %}"></script>
<script type="text/javascript" src="{% static "bootstrap/js/bootstrap.js" %}"></script>
<script type="text/javascript" src="{% static "moment/moment-with-locales.js" %}"></script>
<script type="text/javascript" src="{% static "datetimepicker/bootstrap-datetimepicker.js" %}"></script>
<script type="text/javascript" src="{% static "select2/select2.js" %}"></script>
<script type="text/javascript" src="{% static "select2/i18n/de.js" %}"></script>
<script type="text/javascript" src="{% static "select2/i18n/en.js" %}"></script>
<script type="text/javascript" src="{% static "charts/raphael-min.js" %}"></script>
<script type="text/javascript" src="{% static "charts/morris.js" %}"></script>
<script type="text/javascript" src="{% static "clipboard/clipboard.js" %}"></script>
<script type="text/javascript" src="{% static "cropper/cropper.js" %}"></script>
<script type="text/javascript" src="{% static "rrule/rrule.js" %}"></script>
<script type="text/javascript" src="{% static "pretixpresale/js/ui/questions.js" %}"></script>
<script type="text/javascript" src="{% static "pretixcontrol/js/jquery.qrcode.min.js" %}"></script>
<script type="text/javascript" src="{% static "pretixcontrol/js/clipboard.js" %}"></script>
<script type="text/javascript" src="{% static "pretixcontrol/js/menu.js" %}"></script>
<script type="text/javascript" src="{% static "pretixcontrol/js/sb-admin-2.js" %}"></script>
<script type="text/javascript" src="{% static "pretixcontrol/js/ui/main.js" %}"></script>
<script type="text/javascript" src="{% static "pretixcontrol/js/ui/quota.js" %}"></script>
<script type="text/javascript" src="{% static "pretixcontrol/js/ui/subevent.js" %}"></script>
<script type="text/javascript" src="{% static "pretixcontrol/js/ui/question.js" %}"></script>
<script type="text/javascript" src="{% static "pretixcontrol/js/ui/variations.js" %}"></script>
<script type="text/javascript" src="{% static "pretixcontrol/js/ui/dragndroplist.js" %}"></script>
<script type="text/javascript" src="{% static "pretixcontrol/js/ui/mail.js" %}"></script>
<script type="text/javascript" src="{% static "pretixcontrol/js/ui/orderchange.js" %}"></script>
<script type="text/javascript" src="{% static "pretixcontrol/js/ui/typeahead.js" %}"></script>
<script type="text/javascript" src="{% static "pretixcontrol/js/ui/quicksetup.js" %}"></script>
<script type="text/javascript" src="{% static "pretixcontrol/js/ui/dashboard.js" %}"></script>
<script type="text/javascript" src="{% static "pretixcontrol/js/ui/tabs.js" %}"></script>
<script type="text/javascript" src="{% static "leaflet/leaflet.js" %}"></script>
<script type="text/javascript" src="{% static "pretixcontrol/js/ui/geo.js" %}"></script>
<script type="text/javascript" src="{% static "pretixbase/js/details.js" %}"></script>
<script type="text/javascript" src="{% static "pretixbase/js/asynctask.js" %}"></script>
<script type="text/javascript" src="{% static "sortable/Sortable.js" %}"></script>
<script type="text/javascript" src="{% static "colorpicker/bootstrap-colorpicker.js" %}"></script>
<script type="text/javascript" src="{% static "fileupload/jquery.ui.widget.js" %}"></script>
<script type="text/javascript" src="{% static "fileupload/jquery.fileupload.js" %}"></script>
<script type="text/javascript" src="{% static "lightbox/js/lightbox.js" %}"></script>
<script type="text/javascript" src="{% static "are-you-sure/jquery.are-you-sure.js" %}"></script>
{% endcompress %}
{{ html_head|safe }}
<meta name="viewport" content="width=device-width, initial-scale=1">
{% if development_warning or debug_warning %}
<link rel="shortcut icon" href="{% static "pretixbase/img/favicon-debug.ico" %}">
{% else %}
<link rel="shortcut icon" href="{% static "pretixbase/img/favicon.ico" %}">
<link rel="icon" type="image/png" sizes="32x32" href="{% static "pretixbase/img/icons/favicon-32x32.png" %}">
<link rel="icon" type="image/png" sizes="194x194" href="{% static "pretixbase/img/icons/favicon-194x194.png" %}">
<link rel="icon" type="image/png" sizes="16x16" href="{% static "pretixbase/img/icons/favicon-16x16.png" %}">
{% endif %}
<link rel="apple-touch-icon" sizes="180x180" href="{% static "pretixbase/img/icons/apple-touch-icon.png" %}">
<link rel="icon" type="image/png" sizes="192x192" href="{% static "pretixbase/img/icons/android-chrome-192x192.png" %}">
<link rel="manifest" href="{% url "presale:site.webmanifest" %}">
<link rel="mask-icon" href="{% static "pretixbase/img/icons/safari-pinned-tab.svg" %}" color="#3b1c4a">
<meta name="msapplication-TileColor" content="#3b1c4a">
<meta name="msapplication-config" content="{% url "presale:browserconfig.xml" %}">
<meta name="theme-color" content="#3b1c4a">
<meta name="referrer" content="origin">
{% block custom_header %}{% endblock %}
</head>
<body data-datetimeformat="{{ js_datetime_format }}" data-timeformat="{{ js_time_format }}"
data-dateformat="{{ js_date_format }}" data-datetimelocale="{{ js_locale }}"
data-pretixlocale="{{ request.LANGUAGE_CODE }}"
data-payment-weekdays-disabled="{{ js_payment_weekdays_disabled }}"
{% if request.organizer %}data-organizer="{{ request.organizer.slug }}"{% endif %}
{% if request.event %}data-event="{{ request.event.slug }}"{% endif %}
data-select2-locale="{{ select2locale }}" data-longdateformat="{{ js_long_date_format }}" class="nojs">
<div id="wrapper">
<nav class="navbar navbar-inverse navbar-static-top" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle"
data-toggle="collapse" data-target=".navbar-nav-collapse">
<span class="sr-only">{% trans "Toggle navigation" %}</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
{% if request.event %}
{% if has_domain and not request.event.live %}
<form action="{% eventurl request.event "presale:event.auth" %}" method="post"
target="_blank" class="mobile-navbar-view-form visible-xs-block">
<input type="hidden" value="{{ new_session }}" name="session">
<button type="submit" class="btn btn-link navbar-toggle">
<i class="fa fa-eye"></i>
</button>
</form>
{% else %}
<a href="{% eventurl request.event "presale:event.index" %}" title="{% trans "Go to shop" %}"
target="_blank" class="navbar-toggle mobile-navbar-view-link">
<i class="fa fa-eye"></i>
</a>
{% endif %}
{% elif request.organizer %}
<a href="{% eventurl request.organizer "presale:organizer.index" %}" title="{% trans "Public profile" %}" target="_blank"
class="navbar-toggle mobile-navbar-view-link">
<i class="fa fa-eye"></i>
</a>
{% endif %}
<a class="navbar-brand" href="{% url "control:index" %}">
<img src="{% static "pretixbase/img/pretix-icon.svg" %}" />
{{ settings.PRETIX_INSTANCE_NAME }}
</a>
</div>
<ul class="nav navbar-nav navbar-top-links navbar-left flip hidden-xs">
{% if request.event %}
<li>
{% if has_domain and not request.event.live %}
<form action="{% eventurl request.event "presale:event.auth" %}" method="post" target="_blank">
<input type="hidden" value="{{ new_session }}" name="session">
<button type="submit" class="btn btn-link" id="button-shop">
<i class="fa fa-eye"></i> {% trans "Go to shop" %}
</button>
</form>
{% else %}
<a href="{% eventurl request.event "presale:event.index" %}" title="{% trans "Go to shop" %}" target="_blank">
<i class="fa fa-eye"></i> {% trans "Go to shop" %}
</a>
{% endif %}
</li>
{% elif request.organizer %}
<li>
<a href="{% eventurl request.organizer "presale:organizer.index" %}" title="{% trans "Public profile" %}" target="_blank">
<i class="fa fa-eye"></i> {% trans "Public profile" %}
</a>
</li>
{% endif %}
</ul>
<ul class="nav navbar-nav navbar-top-links navbar-right flip">
{% for nav in nav_topbar %}
<li {% if nav.children %}class="dropdown"{% endif %}>
<a href="{{ nav.url }}" title="{{ nav.title }}" {% if nav.active %}class="active"{% endif %}
{% if nav.children %}class="dropdown-toggle" data-toggle="dropdown"{% endif %}>
{% if nav.icon %}
{% if "<svg" in nav.icon %}
{{ nav.icon|safe }}
{% else %}
<span class="fa fa-{{ nav.icon }}"></span>
{% endif %}
<span class="visible-xs-inline">{{ nav.label }}</span>
{% else %}
{{ nav.label }}
{% endif %}
</a>
{% if nav.children %}
<ul class="dropdown-menu" role="menu">
{% for item in nav.children %}
<li>
<a {% if item.url %}href="{{ item.url }}"{% endif %}
{% if item.external %}target="_blank"{% endif %}
{% if item.active %}class="active"{% endif %}>
{% if item.icon %}
<span class="fa fa-fw fa-{{ item.icon }}"></span>
{% endif %}
{{ item.label|safe }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
{% if request.user.is_staff and not staff_session %}
<li>
<form action="{% url 'control:user.sudo' %}?next={{ request.path|add:"?"|add:request.GET.urlencode|urlencode }}" method="post">
{% csrf_token %}
<button type="submit" class="btn btn-link" id="button-sudo">
<i class="fa fa-id-card"></i> {% trans "Admin mode" %}
</button>
</form>
</li>
{% elif request.user.is_staff and staff_session %}
<li>
<a href="{% url 'control:user.sudo.stop' %}" class="danger">
<i class="fa fa-id-card"></i> {% trans "End admin session" %}
</a>
</li>
{% endif %}
{% if warning_update_available %}
<li>
<a href="{% url 'control:global.update' %}" class="danger">
<i class="fa fa-bell"></i>
</a>
</li>
{% endif %}
<li>
<a href="{% url 'control:user.settings' %}" title="{% trans "Account Settings" %}" >
<i class="fa fa-user"></i> {{ request.user.get_full_name }}
</a>
</li>
<li>
<a href="{% url 'control:auth.logout' %}" title="{% trans "Log out" %}">
<i class="fa fa-sign-out"></i>
<span class="visible-xs-inline">{% trans "Log out" %}</span>
</a>
</li>
</ul>
<div class="navbar-default sidebar" role="navigation">
<div class="sidebar-nav navbar-nav-collapse navbar-collapse">
<div class="dropdown context-selector">
{% if request.event %}
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-calendar fa-stack-1x fa-inverse"></i>
</span>
<div class="context-indicator">
<span class="context-name">{{ request.event }}</span>
<span class="context-meta">{{ request.event.get_date_range_display }}</span>
</div>
<span class="caret"></span></a>
{% elif request.organizer %}
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-group fa-stack-1x fa-inverse"></i>
</span>
<div class="context-indicator">
<span class="context-name">{{ request.organizer }}</span>
<span class="context-meta">{% trans "Organizer account" %}</span>
</div>
<span class="caret"></span></a>
{% else %}
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-user fa-stack-1x fa-inverse"></i>
</span>
<div class="context-indicator">
<span class="context-name">{{ request.user }}</span>
</div>
<span class="caret"></span></a>
{% endif %}
<ul class="dropdown-menu event-dropdown" role="menu" data-event-typeahead
data-source="{% url "control:nav.typeahead" %}"
{% if request.event %}
data-organizer="{{ request.organizer.id }}"
{% endif %}>
<li class="query-holder">
<div class="form-box">
<input type="text" class="form-control" id="event-dropdown-field"
placeholder="{% trans "Search for events" %}"
data-typeahead-query autocomplete="off">
</div>
</li>
</ul>
</div>
<ul class="nav" id="side-menu">
{% if request.event and request.event.testmode %}
<li class="testmode">
<a href="{% url "control:event.live" event=request.event.slug organizer=request.organizer.slug %}">
<i class="fa fa-warning fa-fw"></i>
{% trans "TEST MODE" %}
</a>
</li>
{% endif %}
{% block nav %}
{% for nav in nav_items %}
<li>
<a href="{{ nav.url }}" {% if nav.active %}class="active"{% endif %}
{% if nav.external %}target="_blank"{% endif %}
{% if nav.children %}class="has-children"{% endif %}>
{% if nav.icon %}
{% if "<svg" in nav.icon %}
{{ nav.icon|safe }}
{% else %}
<span class="fa fa-fw fa-{{ nav.icon }}"></span>
{% endif %}
{% endif %}
{{ nav.label }}
</a>
{% if nav.children %}
<a href="#" class="arrow">
<span class="fa arrow"></span>
</a>
<ul class="nav nav-second-level">
{% for item in nav.children %}
<li>
<a href="{{ item.url }}"
{% if item.external %}target="_blank"{% endif %}
{% if item.active %}class="active"{% endif %}>
{{ item.label }}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
{% endblock %}
</ul>
{% include "pretixcontrol/base_after_nav.html" %}
</div>
</div>
</nav>
{% if ie_deprecation_warning %}
<div class="old-browser-warning">
<span class="fa fa-internet-explorer"></span>
{% blocktrans trimmed %}
We've detected that you are using <strong>Microsoft Internet Explorer</strong>.
{% endblocktrans %}
{% blocktrans trimmed %}
Internet Explorer is an old browser that does not support lots of recent web-based
technologies. While some features might already not work properly, we plan on no longer
supporting Internet Explorer in our administrative backend in the next months.
{% endblocktrans %}
{% blocktrans trimmed %}
We kindly ask you to move to one of our supported browsers, such as Microsoft Edge,
Mozilla Firefox, Google Chrome, or Safari.
{% endblocktrans %}
</div>
{% endif %}
{% if staff_need_to_explain %}
<div class="impersonate-warning">
<span class="fa fa-id-card"></span>
{% blocktrans trimmed %}
Please leave a short comment on what you did in the following admin sessions:
{% endblocktrans %}
<ul>
{% for s in staff_need_to_explain %}
<li>
<a href="{% url "control:user.sudo.edit" id=s.pk %}">#{{ s.pk }}</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if request.user.is_hijacked %}
<div class="impersonate-warning">
<span class="fa fa-user-secret"></span>
{% blocktrans with user=request.user%}You are currently working on behalf of {{ user }}.{% endblocktrans %}
<form action="{% url 'control:users.impersonate.stop' %}" method="post" class="helper-display-inline">
{% csrf_token %}
<button class="btn btn-default btn-sm">
{% trans "Stop impersonating" %}
</button>
</form>
</div>
{% endif %}
{% if global_settings.banner_message %}
<div class="impersonate-warning">
<span class="fa fa-bell"></span>
{{ global_settings.banner_message }}
{% if global_settings.banner_message_detail %}
<a href="{% url 'control:global.message' %}">
{% trans "Read more" %}
</a>
{% endif %}
</div>
{% endif %}
<div id="page-wrapper">
<div class="container-fluid">
{% signal "pretix.control.signals.html_page_start" request %}
{% if messages %}
{% for message in messages %}
<div class="alert {{ message.tags }}">
{{ message|linebreaksbr }}
</div>
{% endfor %}
{% endif %}
{% if complain_testmode_orders %}
<div class="alert alert-warning">
{% blocktrans trimmed %}
Your event contains <strong>test mode orders</strong> even though <strong>test mode has been disabled</strong>.
You should delete those orders to make sure they do not show up in your reports and statistics and block people from
actually buying tickets.
{% endblocktrans %}
<strong>
<a href="{% url "control:event.orders" event=request.event.slug organizer=request.organizer.slug %}?status=testmode">
{% trans "Show all test mode orders" %}
</a>
</strong>
</div>
{% endif %}
{% if warning_update_check_active %}
<div class="alert alert-info">
<a href="{% url "control:global.update" %}">
{% blocktrans trimmed %}
Starting with version 1.2.0, pretix automatically checks for updates in the background.
During this check, anonymous data is transmitted to servers operated by pretix'
developers. Click on this message to find out more, disable this feature or enter your
email address to get notified via email if a new update arrives. This message will
disappear once you clicked it.
{% endblocktrans %}
</a>
</div>
{% endif %}
{% if warning_license_compliance_check_required %}
<div class="alert alert-legal">
<a href="{% url "control:global.license" %}">
{% blocktrans trimmed %}
Click here to do a license compliance check to make sure your usage of pretix is in
line with pretix' license.
{% endblocktrans %}
</a>
</div>
{% endif %}
{% if debug_warning %}
<div class="alert alert-danger">
{% trans "pretix is running in debug mode. For security reasons, please never run debug mode on a production instance." %}
</div>
{% endif %}
{% if request.user.needs_password_change %}
<div class="alert alert-warning">
{% blocktrans trimmed %}
For security reasons, please change your password before you continue. Afterwards you
will be redirected to your original destination.
{% endblocktrans %}
</div>
{% endif %}
{% block content %}
{% endblock %}
<footer>
{% if request.timezone %}
<span class="fa fa-globe"></span>
{% blocktrans trimmed with tz=request.timezone %}
Times displayed in {{ tz }}
{% endblocktrans %} ·
{% endif %}
{{ poweredby }} {# removing or hiding this might be in violation of pretix' license #}
{% if development_warning %}
<span class="text-warning">· {% trans "running in development mode" %}</span>
{% endif %}
</footer>
</div>
</div>
</div>
<div id="ajaxerr">
</div>
<div id="loadingmodal">
<div class="modal-card">
<div class="modal-card-icon">
<i class="fa fa-cog big-rotating-icon"></i>
</div>
<div class="modal-card-content">
<h3></h3>
<p class="text"></p>
<p class="status">{% trans "If this takes longer than a few minutes, please contact us." %}</p>
<div class="progress">
<div class="progress-bar progress-bar-success">
</div>
</div>
</div>
</div>
</div>
</body>
</html>