|
1 | 1 | {% extends 'base.html.twig' %}
|
2 | 2 |
|
3 | 3 | {% block content %}
|
| 4 | + <div {% if game.closedAt is null %}data-controller="protocol" data-protocol-form-query="form[name='protocol']"{% endif %}> |
| 5 | + <div class="row row-cards"> |
| 6 | + {% if game.closedAt is null %} |
| 7 | + <div class="col-sm-12 col-md-4"> |
| 8 | + <div class="row row-cards"> |
| 9 | + {% if game.closedAt is null %} |
| 10 | + <div class="col-sm-12"> |
| 11 | + <div class="card"> |
| 12 | + {{ form_start(form, {'action': path('protocol_index', {'game': game.id})}) }} |
| 13 | + <div class="card-body protocol-form"> |
| 14 | + {{ form_errors(form) }} |
| 15 | + {{ form_errors(form.content) }} |
| 16 | + <div class="mb-3">{{ form_widget(form.sender, {'attr': {'tabindex': 1}}) }}</div> |
| 17 | + <div class="mb-3">{{ form_widget(form.content, {'attr': {'tabindex': 2}}) }}</div> |
| 18 | + <div class="mb-3">{{ form_widget(form.recipent, {'attr': {'tabindex': 3}}) }}</div> |
| 19 | + <div class="mb-3"> |
4 | 20 |
|
5 |
| - <div class="row"> |
6 |
| - <div class="col-12"> |
7 |
| - <h3>Funkprotokoll {{ game.name }} vom {{ game.createdAt|format_datetime('short', 'none') }}</h3> |
8 |
| - </div> |
9 |
| - </div> |
10 |
| - <div class="row" data-controller="protocol" data-protocol-form-query="form[name='protocol']"> |
11 |
| - {% if game.closedAt is null %} |
12 |
| - <div class="col-4"> |
13 |
| - <div class="card-body position-fixed bg-white border-top protocol-form" style="width: 15%; min-width: 380px;"> |
14 |
| - {{ form_errors(form) }} |
15 |
| - |
16 |
| - {{ form_start(form, {'action': path('protocol_index', {'game': game.id})}) }} |
17 |
| - {{ form_errors(form.content) }} |
18 |
| - <div class="mb-3">{{ form_widget(form.sender, {'attr': {'tabindex': 1}}) }}</div> |
19 |
| - <div class="mb-3">{{ form_widget(form.content, {'attr': {'tabindex': 2}}) }}</div> |
20 |
| - <div class="mb-3">{{ form_widget(form.recipent, {'attr': {'tabindex': 3}}) }}</div> |
21 |
| - <div class="mb-3"><button type="submit" class="btn btn-block btn-primary" tabindex="3" data-check-form="protocol">Speichern</button></div> |
22 |
| - {{ form_end(form) }} |
23 |
| - <p class="mt-3"> |
24 |
| - <strong>STRG + C</strong>: Abbrechen einer Eingabe<br /> |
25 |
| - <strong>STRG + Return</strong>: Absenden des Formulars |
26 |
| - </p> |
27 |
| - <span id="focusguard" tabindex="5" data-action="focus->protocol#focusguard"></span> |
| 21 | + </div> |
| 22 | + <span id="focusguard" tabindex="5" data-action="focus->protocol#focusguard" style="height: 1px; width: 1px;"></span> |
| 23 | + <p class="mt-3"> |
| 24 | + <strong>STRG + C</strong>: Abbrechen einer Eingabe<br/> |
| 25 | + <strong>STRG + Return</strong>: Absenden des Formulars |
| 26 | + </p> |
| 27 | + </div> |
| 28 | + <div class="card-footer"> |
| 29 | + <div class="d-flex protocol-form-buttons"> |
| 30 | + <button type="submit" class="btn btn-primary ms-auto" tabindex="3" data-check-form="protocol">Speichern</button> |
| 31 | + </div> |
| 32 | + </div> |
| 33 | + {{ form_end(form) }} |
| 34 | + </div> |
| 35 | + </div> |
| 36 | + {% endif %} |
| 37 | + </div> |
28 | 38 | </div>
|
29 |
| - </div> |
30 |
| - {% endif %} |
| 39 | + {% endif %} |
31 | 40 |
|
32 |
| - <div class="{% if game.closedAt is null %}col-8{% else %}col-12{% endif %}"> |
33 |
| - {% for protocol in protocol_list %} |
34 |
| - <div class="row protocol-entry"> |
| 41 | + |
| 42 | + <div class="{% if game.closedAt is null %}col-md-8 col-sm-12{% else %}col-12{% endif %}"> |
| 43 | + <div class="row row-cards "> |
35 | 44 | <div class="col-12">
|
36 |
| - <div class="card p-3 mb-1"> |
37 |
| - <div class="media"> |
38 |
| - <div class="media-body"> |
39 |
| - <div class="media-heading"> |
40 |
| - <small class="float-right text-muted text-right"> |
41 |
| - {{ protocol.createdAt|ago }} - {{ protocol.createdAt|format_datetime('none', 'short') }} |
42 |
| - {% if game.closedAt is null %} |
43 |
| - <button data-id="{{ protocol.id }}" data-highlite="card" class="btn btn-success btn-sm no-loader" data-action="protocol#addChildEntry"><i class="fas fa-plus p-1"></i></button> |
| 45 | + <h3>Funkprotokoll {{ game.name }} vom {{ game.createdAt|format_datetime('short', 'none') }}</h3> |
| 46 | + </div> |
| 47 | + {% for protocol in protocol_list %} |
| 48 | + <div class="col-12 protocol-entry"> |
| 49 | + <div class="card"> |
| 50 | + <div class="card-body"> |
| 51 | + <div class="media"> |
| 52 | + <div class="media-body"> |
| 53 | + <div class="media-heading"> |
| 54 | + <small class="float-right text-muted text-right"> |
| 55 | + {{ protocol.createdAt|ago }} - {{ protocol.createdAt|format_datetime('none', 'short') }} |
| 56 | + {% if game.closedAt is null %} |
| 57 | + <button data-id="{{ protocol.id }}" data-highlite="card" class="btn btn-success btn-sm no-loader" data-action="protocol#addChildEntry"><i class="fas fa-plus p-1"></i></button> |
| 58 | + {% endif %} |
| 59 | + </small> |
| 60 | + <h5 class="mb-0 strong">Von <span class="bold protocol-sender">{{ protocol.sender ?: '10' }}</span> an <span class= "bold protocol-recipent">{{ protocol.recipent ?: (protocol.sender is empty ? 'alle' : '10') }}</span></h5> |
| 61 | + </div> |
| 62 | + <div class="protocol-content">{{ protocol.content|nl2br }}</div> |
| 63 | + {% if protocol.children|length > 0 %} |
| 64 | + <ul class="mt-3 protocol-entry-replies"> |
| 65 | + {% for protocolChild in protocol.children %} |
| 66 | + <li class="media p-1 {{ cycle(['bg-muted-lt', ''], loop.index0) }}"> |
| 67 | + <div class="media-body border-left mb-3"> |
| 68 | + <small class="float-right text-muted">{{ protocolChild.createdAt|ago }} - {{ protocolChild.createdAt|format_datetime('none', 'short') }}</small> |
| 69 | + <h5 class="mb-0 strong">Von {{ protocolChild.sender ?: '10' }} an {{ protocolChild.recipent ?: (protocolChild.sender is empty ? 'alle' : '10') }}</h5> |
| 70 | + <div>{{ protocolChild.content|nl2br }}</div> |
| 71 | + </div> |
| 72 | + </li> |
| 73 | + {% endfor %} |
| 74 | + </ul> |
44 | 75 | {% endif %}
|
45 |
| - </small> |
46 |
| - <h5 class="mb-0">Von <span class="bold protocol-sender">{{ protocol.sender ?: '10' }}</span> an <span class= "bold protocol-recipent">{{ protocol.recipent ?: (protocol.sender is empty ? 'alle' : '10') }}</span></h5> |
| 76 | + </div> |
47 | 77 | </div>
|
48 |
| - <div class="protocol-content">{{ protocol.content|nl2br }}</div> |
49 |
| - {% if protocol.children|length > 0 %} |
50 |
| - <ul class="media-list mt-4 ml-5 protocol-entry-replies"> |
51 |
| - {% for protocolChild in protocol.children %} |
52 |
| - <li class="media mt-4"> |
53 |
| - <div class="media-body border-left pl-3 mb-3"> |
54 |
| - <small class="float-right text-muted">{{ protocolChild.createdAt|ago }} - {{ protocolChild.createdAt|format_datetime('none', 'short') }}</small> |
55 |
| - <strong>Von <strong>{{ protocolChild.sender ?: '10' }}</strong> an <strong>{{ protocolChild.recipent ?: (protocolChild.sender is empty ? 'alle VDO' : 'VDO 10') }}</strong></strong> |
56 |
| - <div>{{ protocolChild.content|nl2br }}</div> |
57 |
| - </div> |
58 |
| - </li> |
59 |
| - {% endfor %} |
60 |
| - </ul> |
61 |
| - {% endif %} |
62 | 78 | </div>
|
63 | 79 | </div>
|
64 | 80 | </div>
|
65 |
| - </div> |
| 81 | + {% else %} |
| 82 | + <div class="alert alert-info">Es liegen aktuell keine Aktivitäten vor</div> |
| 83 | + {% endfor %} |
66 | 84 | </div>
|
67 |
| - {% else %} |
68 |
| - <li class="list-group-item py-5"> |
69 |
| - <div class="media"> |
70 |
| - <div class="media-body"> |
71 |
| - <div class="alert alert-info"> |
72 |
| - Keine Einträge bisher |
73 |
| - </div> |
74 |
| - </div> |
75 |
| - </div> |
76 |
| - </li> |
77 |
| - {% endfor %} |
| 85 | + </div> |
78 | 86 | </div>
|
79 | 87 | </div>
|
80 |
| - </protocol> |
81 |
| - |
82 | 88 | {% endblock %}
|
0 commit comments