Skip to content

Commit d21de3c

Browse files
committed
consolidate custom templates with main templates
1 parent a2b1564 commit d21de3c

File tree

9 files changed

+68
-34
lines changed

9 files changed

+68
-34
lines changed

zmsadmin/templates/block/appointment/form.twig

+9-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,17 @@
44

55
{% block board_title %}
66
{% if selectedProcess %}
7-
Terminvereinbarung Aktualisieren
7+
<span id="appointment-edit-title" tabindex="0">Terminvereinbarung Aktualisieren</span>
88
{% else %}
9-
Terminvereinbarung Neu
9+
Terminvereinbarung Neu
1010
{% endif %}
11+
12+
<script>
13+
if (document.getElementById('appointment-edit-title')) {
14+
document.querySelector('.board.appointment-form').focus();
15+
document.getElementById('appointment-edit-title').focus();
16+
}
17+
</script>
1118
{% endblock %}
1219

1320
{% block board_body %}

zmsadmin/templates/block/navigation/navigation.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
<a class="extern" title="{% trans %}Zu Statistiken / Auswertungen{% endtrans %}" href="{{ includeUrl() }}/../statistic/" target="_blank">Statistiken/Auswertungen</a>
139139
</li>
140140
</ul>
141-
</li>
141+
</li>
142142
</ul>
143143
</li>
144144
{% endif %}

zmsadmin/templates/block/process/precall.twig

+1-8
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,11 @@
5454
{{ process.customTextfield }}
5555
</dd>
5656
{% endif %}
57-
{% set currentTime = "now"|date("U") %}
58-
{% set arrivalTime = process.queue.arrivalTime %}
59-
{% set differenceInSeconds = currentTime - arrivalTime %}
60-
61-
{% set hours = (differenceInSeconds // 3600) %}
62-
{% set minutes = ((differenceInSeconds % 3600) // 60) %}
63-
{% set seconds = (differenceInSeconds % 60) %}
6457
<dt>
6558
Wartezeit (Std.:Min.:Sek.)
6659
</dt>
6760
<dd>
68-
{{ "%02d"|format(hours) ~ ':' ~ "%02d"|format(minutes) ~ ':' ~ "%02d"|format(seconds) }}
61+
{{ timeDifference }}
6962
</dd>
7063

7164
</dl>

zmsadmin/templates/block/scope/form.twig

+29-14
Original file line numberDiff line numberDiff line change
@@ -357,21 +357,36 @@
357357
}]
358358
) }}
359359

360-
{{ formgroup(
361-
{
362-
"label": "Maximale Anzahl an Terminen pro E-Mail-Adresse:"
363-
},
364-
[{
365-
"type":"input",
366-
"parameter": {
367-
"name": "preferences[client][appointmentsPerMail]",
368-
"value": scope.preferences.client.appointmentsPerMail,
369-
"maxlength": 2
370-
}
371-
}]
372-
) }}
360+
{{ formgroup(
361+
{
362+
"label": "Maximale Anzahl an Terminen pro E-Mail-Adresse:"
363+
},
364+
[{
365+
"type":"input",
366+
"parameter": {
367+
"name": "preferences[client][appointmentsPerMail]",
368+
"value": scope.preferences.client.appointmentsPerMail,
369+
"maxlength": 2
370+
}
371+
}]
372+
) }}
373373

374-
{{ formgroup(
374+
{{ formgroup(
375+
{
376+
"label": "E-Mail-Adressen, die unbegrenzt Termine buchen können:",
377+
"description": "Durch Kommas getrennte E-Mail-Adressen (ganze Domänen kann man mit beispielsweise @muenchen.de erlauben)"
378+
},
379+
[{
380+
"type":"input",
381+
"parameter": {
382+
"name": "preferences[client][whitelistedMails]",
383+
"value": scope.preferences.client.whitelistedMails,
384+
"maxlength": 1000
385+
}
386+
}]
387+
) }}
388+
389+
{{ formgroup(
375390
{
376391
"legend": "Freitextfeld:",
377392
"groupTag": "fieldset"

zmsadmin/templates/block/search/searchresults.twig

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
{% embed "block/scaffholding/board.twig" with {'class': 'board--spaceless searchresults'} %}
22

33
{% block board_title %}
4-
{% trans %}Suchergebnisse für {% endtrans %} "{{ searchQuery }}"
4+
<span tabindex="1" id="search-result-title">{% trans %}Suchergebnisse für {% endtrans %} "{{ searchQuery }}"</span>
55
{% endblock %}
66

77
{% block board_body %}
8-
<div class="table-responsive-wrapper">
8+
<script>
9+
document.getElementById("search-result-title").focus();
10+
</script>
11+
12+
<div tabindex="1" class="table-responsive-wrapper">
913
<table class="table--base" data-processList-count="{{ processList.count() }}" data-processListOther-count="{{ processListOther.count() }}">
1014
<thead>
1115
<tr>
@@ -22,11 +26,11 @@
2226
<tr>
2327
<td>
2428
{% if process.status == "pickup" or process.status == "pending" %}
25-
<a href="{{ urlGet("pickup", {}, {}) }}">
29+
<a tabindex="1" href="{{ urlGet("pickup", {}, {}) }}">
2630
{{process.clients.0.familyName}} ({{process.id}})
2731
</a>
2832
{% else %}
29-
<a href="{{ urlGet("counter", {}, {'selectedprocess': process.id, 'date': process.appointments.0.date|date('Y-m-d'), 'selectedscope': process.scope.id }) }}">
33+
<a tabindex="1" href="{{ urlGet("counter", {}, {'selectedprocess': process.id, 'date': process.appointments.0.date|date('Y-m-d'), 'selectedscope': process.scope.id }) }}">
3034
{{process.clients.0.familyName}} ({{process.id}})
3135
</a>
3236
{% endif %}
@@ -50,7 +54,7 @@
5054
{% endfor %}
5155
{% if processList.count() == 0 and processListOther.count() == 0 %}
5256
<tr>
53-
<td colspan="7">Keine Ergebnisse gefunden</td>
57+
<td colspan="7" tabindex="1">Keine Ergebnisse gefunden</td>
5458
</tr>
5559
{% endif %}
5660
{% if logList.count() %}

zmsadmin/templates/element/helper/messages.twig

+2-1
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@
263263
{{ block('success_start') }}
264264
Der Vorgang mit der Nummer {{ selectedprocess.queue.number }} wurde erfolgreich entfernt.
265265
<div class="form-actions">
266-
<button type="button" data-action-ok class="button button-ok btn right">OK</button>
266+
<button type="button" onclick="location.href = '{{ includeUrl() }}/counter';" data-action-ok class="button button-ok btn right">OK</button>
267267
</div>
268268
{{ block('success_end') }}
269269
{% endblock %}
@@ -347,6 +347,7 @@
347347
{% block success_start %}
348348
<section tabindex="0" class="dialog message message--success" role="alert">
349349
<h2 tabindex="0" class="message__heading title">{{ successTitle|default("Erfolgreiche Anfrage")|trans }}</h2>
350+
350351
<div tabindex="0" class="message__body">
351352
{% endblock %}
352353
{% block success_start_keep %}

zmscalldisplay/templates/block/default/head.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
99
<meta name="viewport" content="width=device-width, initial-scale=1.0">
1010
<meta charset="UTF-8" />
11-
<link rel="stylesheet" type="text/css" href="{{ includeUrl() }}/_css/calldisplay.css?version={{ currentVersion() }}">
11+
<link rel="stylesheet" type="text/css" href="{{ includeUrl() }}/_css/calldisplay.css?version={{ currentVersion() }}&ts={{ getNow()|date("U") }}">
1212

1313
<style>
1414
@font-face {

zmscalldisplay/templates/element/queueTable/rightCol.twig

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<td class="platznummer">
22
<div class="highlight {{ queue.status }}">
33
{% if queue.destinationHint and queue.destination != queue.destinationHint %}
4-
<span class="terminkundenanzeige">{{ queue.destinationHint | raw }}</span><br/>
4+
<span class="terminkundenanzeige hint-shown">{{ queue.destinationHint | raw }}</span><br/>
55
{% elseif queue.status in ['queued', 'confirmed'] %}
66
<span class="terminkundenanzeige">Aufruf in</span><br/>
77
{% endif %}
88

9-
<span data="{{ queue.destination | raw }}" class="destination terminkundennummer{% if not isNumeric(queue.destination) and queue.destination|length > 6 %} abholeranzeige{% endif %}">
9+
<span data="{{ queue.destination | raw }}" class="destination terminkundennummer{% if not isNumeric(queue.destination) and queue.destination|length > 6 %} abholeranzeige{% endif %}{% if queue.destination != queue.destinationHint %} hint-shown{% endif %}">
1010
{% if queue.status in ['queued', 'confirmed'] %}
1111
<span class="longrange">{{queue.waitingTimeOptimistic}}-{{queue.waitingTimeEstimate}}min</span>
1212
{% elseif queue.status in ['empty'] %}

zmscalldisplay/templates/layout/main.twig

+14
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,19 @@
4040
</div>
4141
{% endif %}
4242

43+
{% if zoom %}
44+
<script>
45+
document.body.style.zoom = {{ zoom }}
46+
</script>
47+
48+
<style>
49+
@-moz-document url-prefix() {
50+
#aufrufanzeige {
51+
transform: scale({{ zoom }});
52+
margin: {{ zoom * 100 }}px auto;
53+
}
54+
}
55+
</style>
56+
{% endif %}
4357
</body>
4458
</html>

0 commit comments

Comments
 (0)