|
1 | | -<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom"> |
2 | | - <h1 class="h2"> |
3 | | - <i aria-hidden="true" class="bi bi-list-ul"></i> {{ adminHeaderGlossary }} |
4 | | - </h1> |
5 | | - <div class="btn-toolbar mb-2 mb-md-0"> |
6 | | - <div class="btn-group mr-2"> |
7 | | - <button class="btn btn-outline-success" data-bs-toggle="modal" data-bs-target="#addGlossaryModal"> |
8 | | - <i aria-hidden="true" class="bi bi-plus"></i> {{ msgAddGlossary }} |
9 | | - </button> |
| 1 | +{% extends '@admin/index.twig' %} |
| 2 | + |
| 3 | +{% block content %} |
| 4 | + <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom"> |
| 5 | + <h1 class="h2"> |
| 6 | + <i aria-hidden="true" class="bi bi-list-ul"></i> {{ adminHeaderGlossary }} |
| 7 | + </h1> |
| 8 | + <div class="btn-toolbar mb-2 mb-md-0"> |
| 9 | + <div class="btn-group mr-2"> |
| 10 | + <button class="btn btn-outline-success" data-bs-toggle="modal" data-bs-target="#addGlossaryModal"> |
| 11 | + <i aria-hidden="true" class="bi bi-plus"></i> {{ msgAddGlossary }} |
| 12 | + </button> |
| 13 | + </div> |
10 | 14 | </div> |
11 | 15 | </div> |
12 | | -</div> |
13 | 16 |
|
14 | | -<div class="row"> |
15 | | - <div class="col-12"> |
| 17 | + <div class="row"> |
| 18 | + <div class="col-12"> |
16 | 19 |
|
17 | | - <table class="table table-striped align-middle border shadow" id="pmf-admin-glossary-table"> |
18 | | - <thead> |
19 | | - <tr> |
20 | | - <th>{{ msgGlossaryItem }}</th> |
21 | | - <th colspan="2">{{ msgGlossaryDefinition }}</th> |
22 | | - </tr> |
23 | | - </thead> |
24 | | - <tbody> |
25 | | - {% for glossary in glossaryItems %} |
26 | | - <tr id="pmf-glossary-id-{{ glossary.id }}"> |
27 | | - <td> |
28 | | - <a href="#" data-bs-toggle="modal" data-bs-target="#updateGlossaryModal" |
29 | | - data-pmf-glossary-id="{{ glossary.id }}" data-pmf-glossary-language="{{ glossary.language }}"> |
30 | | - {{ glossary.item }} |
31 | | - </a> |
32 | | - </td> |
33 | | - <td>{{ glossary.definition }}</td> |
34 | | - <td class="text-end"> |
35 | | - <button class="btn btn-danger pmf-admin-delete-glossary" data-pmf-glossary-id="{{ glossary.id }}" |
36 | | - data-pmf-csrf-token="{{ csrfTokenDelete }}" data-pmf-glossary-language="{{ glossary.language }}"> |
37 | | - <i aria-hidden="true" class="bi bi-trash"></i> |
38 | | - {{ buttonDelete }} |
39 | | - </button> |
40 | | - </td> |
| 20 | + <table class="table table-striped align-middle border shadow" id="pmf-admin-glossary-table"> |
| 21 | + <thead> |
| 22 | + <tr> |
| 23 | + <th>{{ msgGlossaryItem }}</th> |
| 24 | + <th colspan="2">{{ msgGlossaryDefinition }}</th> |
41 | 25 | </tr> |
42 | | - {% endfor %} |
43 | | - </tbody> |
44 | | - </table> |
| 26 | + </thead> |
| 27 | + <tbody> |
| 28 | + {% for glossary in glossaryItems %} |
| 29 | + <tr id="pmf-glossary-id-{{ glossary.id }}"> |
| 30 | + <td> |
| 31 | + <a href="#" data-bs-toggle="modal" data-bs-target="#updateGlossaryModal" |
| 32 | + data-pmf-glossary-id="{{ glossary.id }}" data-pmf-glossary-language="{{ glossary.language }}"> |
| 33 | + {{ glossary.item }} |
| 34 | + </a> |
| 35 | + </td> |
| 36 | + <td>{{ glossary.definition }}</td> |
| 37 | + <td class="text-end"> |
| 38 | + <button class="btn btn-danger pmf-admin-delete-glossary" data-pmf-glossary-id="{{ glossary.id }}" |
| 39 | + data-pmf-csrf-token="{{ csrfTokenDelete }}" data-pmf-glossary-language="{{ glossary.language }}"> |
| 40 | + <i aria-hidden="true" class="bi bi-trash"></i> |
| 41 | + {{ buttonDelete }} |
| 42 | + </button> |
| 43 | + </td> |
| 44 | + </tr> |
| 45 | + {% endfor %} |
| 46 | + </tbody> |
| 47 | + </table> |
45 | 48 |
|
| 49 | + </div> |
46 | 50 | </div> |
47 | | -</div> |
48 | 51 |
|
49 | | -<!-- Add Glossary Modal --> |
50 | | -<div class="modal fade" id="addGlossaryModal" tabindex="-1" aria-labelledby="addGlossaryModal" aria-hidden="true"> |
51 | | - <div class="modal-dialog modal-lg"> |
52 | | - <div class="modal-content"> |
53 | | - <div class="modal-header"> |
54 | | - <h1 class="modal-title fs-5" id="addGlossaryModalLabel"> |
55 | | - <i aria-hidden="true" class="bi bi-list-ul"></i> |
56 | | - {{ addGlossaryTitle }} |
57 | | - </h1> |
58 | | - <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{{ closeModal }}"></button> |
59 | | - </div> |
60 | | - <div class="modal-body"> |
61 | | - <form action="#" method="post" accept-charset="utf-8"> |
62 | | - <input type="hidden" name="language" id="language" value="{{ currentLanguage }}"> |
63 | | - {{ addGlossaryCsrfTokenInput | raw }} |
| 52 | + <!-- Add Glossary Modal --> |
| 53 | + <div class="modal fade" id="addGlossaryModal" tabindex="-1" aria-labelledby="addGlossaryModal" aria-hidden="true"> |
| 54 | + <div class="modal-dialog modal-lg"> |
| 55 | + <div class="modal-content"> |
| 56 | + <div class="modal-header"> |
| 57 | + <h1 class="modal-title fs-5" id="addGlossaryModalLabel"> |
| 58 | + <i aria-hidden="true" class="bi bi-list-ul"></i> |
| 59 | + {{ addGlossaryTitle }} |
| 60 | + </h1> |
| 61 | + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{{ closeModal }}"></button> |
| 62 | + </div> |
| 63 | + <div class="modal-body"> |
| 64 | + <form action="#" method="post" accept-charset="utf-8"> |
| 65 | + <input type="hidden" name="language" id="language" value="{{ currentLanguage }}"> |
| 66 | + {{ addGlossaryCsrfTokenInput | raw }} |
64 | 67 |
|
65 | | - <div class="row mb-2"> |
66 | | - <label class="col-3 col-form-label" for="item">{{ msgGlossaryItem }}</label> |
67 | | - <div class="col-9"> |
68 | | - <input class="form-control" type="text" name="item" id="item" required> |
| 68 | + <div class="row mb-2"> |
| 69 | + <label class="col-3 col-form-label" for="item">{{ msgGlossaryItem }}</label> |
| 70 | + <div class="col-9"> |
| 71 | + <input class="form-control" type="text" name="item" id="item" required> |
| 72 | + </div> |
69 | 73 | </div> |
70 | | - </div> |
71 | 74 |
|
72 | | - <div class="row mb-2"> |
73 | | - <label class="col-3 col-form-label" for="definition"> |
74 | | - {{ msgGlossaryDefinition }} |
75 | | - </label> |
76 | | - <div class="col-9"> |
77 | | - <textarea class="form-control" name="definition" id="definition" cols="50" rows="5" required></textarea> |
| 75 | + <div class="row mb-2"> |
| 76 | + <label class="col-3 col-form-label" for="definition"> |
| 77 | + {{ msgGlossaryDefinition }} |
| 78 | + </label> |
| 79 | + <div class="col-9"> |
| 80 | + <textarea class="form-control" name="definition" id="definition" cols="50" rows="5" required></textarea> |
| 81 | + </div> |
78 | 82 | </div> |
79 | | - </div> |
80 | 83 |
|
81 | | - </form> |
82 | | - </div> |
83 | | - <div class="modal-footer"> |
84 | | - <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{ closeModal }}</button> |
85 | | - <button type="button" class="btn btn-primary" id="pmf-admin-glossary-add">{{ saveModal }}</button> |
| 84 | + </form> |
| 85 | + </div> |
| 86 | + <div class="modal-footer"> |
| 87 | + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{ closeModal }}</button> |
| 88 | + <button type="button" class="btn btn-primary" id="pmf-admin-glossary-add">{{ saveModal }}</button> |
| 89 | + </div> |
86 | 90 | </div> |
87 | 91 | </div> |
88 | 92 | </div> |
89 | | -</div> |
90 | 93 |
|
91 | | -<!-- Update Glossary Modal --> |
92 | | -<div class="modal fade" id="updateGlossaryModal" tabindex="-1" aria-labelledby="updateGlossaryModal" aria-hidden="true"> |
93 | | - <div class="modal-dialog modal-lg"> |
94 | | - <div class="modal-content"> |
95 | | - <div class="modal-header"> |
96 | | - <h1 class="modal-title fs-5" id="updateGlossaryModalLabel"> |
97 | | - <i aria-hidden="true" class="bi bi-list-ul"></i> |
98 | | - {{ updateGlossaryTitle }} |
99 | | - </h1> |
100 | | - <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{{ closeModal }}"></button> |
101 | | - </div> |
102 | | - <div class="modal-body"> |
103 | | - <form action="#" method="post" accept-charset="utf-8"> |
104 | | - <input type="hidden" name="update-id" id="update-id" value=""> |
105 | | - <input type="hidden" name="update-csrf-token" id="update-csrf-token" value="{{ updateGlossaryCsrfToken }}"> |
106 | | - <input type="hidden" name="update-language" id="update-language" value=""> |
| 94 | + <!-- Update Glossary Modal --> |
| 95 | + <div class="modal fade" id="updateGlossaryModal" tabindex="-1" aria-labelledby="updateGlossaryModal" aria-hidden="true"> |
| 96 | + <div class="modal-dialog modal-lg"> |
| 97 | + <div class="modal-content"> |
| 98 | + <div class="modal-header"> |
| 99 | + <h1 class="modal-title fs-5" id="updateGlossaryModalLabel"> |
| 100 | + <i aria-hidden="true" class="bi bi-list-ul"></i> |
| 101 | + {{ updateGlossaryTitle }} |
| 102 | + </h1> |
| 103 | + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{{ closeModal }}"></button> |
| 104 | + </div> |
| 105 | + <div class="modal-body"> |
| 106 | + <form action="#" method="post" accept-charset="utf-8"> |
| 107 | + <input type="hidden" name="update-id" id="update-id" value=""> |
| 108 | + <input type="hidden" name="update-csrf-token" id="update-csrf-token" value="{{ updateGlossaryCsrfToken }}"> |
| 109 | + <input type="hidden" name="update-language" id="update-language" value=""> |
107 | 110 |
|
108 | | - <div class="row mb-2"> |
109 | | - <label class="col-3 col-form-label" for="update-item">{{ msgGlossaryItem }}</label> |
110 | | - <div class="col-9"> |
111 | | - <input class="form-control" type="text" name="update-item" id="update-item" value="" required> |
| 111 | + <div class="row mb-2"> |
| 112 | + <label class="col-3 col-form-label" for="update-item">{{ msgGlossaryItem }}</label> |
| 113 | + <div class="col-9"> |
| 114 | + <input class="form-control" type="text" name="update-item" id="update-item" value="" required> |
| 115 | + </div> |
112 | 116 | </div> |
113 | | - </div> |
114 | 117 |
|
115 | | - <div class="row mb-2"> |
116 | | - <label class="col-3 col-form-label" for="update-definition"> |
117 | | - {{ msgGlossaryDefinition }} |
118 | | - </label> |
119 | | - <div class="col-9"> |
120 | | - <textarea class="form-control" name="update-definition" id="update-definition" cols="50" rows="5" required> |
| 118 | + <div class="row mb-2"> |
| 119 | + <label class="col-3 col-form-label" for="update-definition"> |
| 120 | + {{ msgGlossaryDefinition }} |
| 121 | + </label> |
| 122 | + <div class="col-9"> |
| 123 | + <textarea class="form-control" name="update-definition" id="update-definition" cols="50" rows="5" required> |
121 | 124 |
|
122 | | - </textarea> |
| 125 | + </textarea> |
| 126 | + </div> |
123 | 127 | </div> |
124 | | - </div> |
125 | 128 |
|
126 | | - </form> |
127 | | - </div> |
128 | | - <div class="modal-footer"> |
129 | | - <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{ closeModal }}</button> |
130 | | - <button type="button" class="btn btn-primary" id="pmf-admin-glossary-update">{{ saveModal }}</button> |
| 129 | + </form> |
| 130 | + </div> |
| 131 | + <div class="modal-footer"> |
| 132 | + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{ closeModal }}</button> |
| 133 | + <button type="button" class="btn btn-primary" id="pmf-admin-glossary-update">{{ saveModal }}</button> |
| 134 | + </div> |
131 | 135 | </div> |
132 | 136 | </div> |
133 | 137 | </div> |
134 | | -</div> |
| 138 | +{% endblock %} |
0 commit comments