|
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-alt"></i> |
4 | | - {{ 'msgHeaderFAQOverview' | translate }} |
5 | | - </h1> |
6 | | - <div class="pmf-faq-overview-search col-4"> |
7 | | - <form name="pmf-faq-search-autocomplete" id="pmf-faq-search-autocomplete" action="?action=faq-overview" |
8 | | - method="post" role="form"> |
9 | | - {{ csrfTokenSearch | raw }} |
10 | | - <div class="input-group"> |
11 | | - <input type="text" class="form-control" placeholder="{{ 'msgAdminSearchFaqs' | translate }}" |
12 | | - id="pmf-faq-overview-search-input" autocomplete="off"> |
13 | | - <button class="btn btn-primary" type="button" id="pmf-faq-overview-search-button"> |
14 | | - <i class="bi bi-search" aria-hidden="true"></i> |
15 | | - </button> |
16 | | - </div> |
17 | | - </form> |
18 | | - </div> |
19 | | -</div> |
| 1 | +{% extends '@admin/index.twig' %} |
20 | 2 |
|
21 | | -{% if categories is empty %} |
22 | | - <div class="alert alert-danger" role="alert"> |
23 | | - {{ 'msgErrorNoRecords' | translate }} |
| 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-alt"></i> |
| 7 | + {{ 'msgHeaderFAQOverview' | translate }} |
| 8 | + </h1> |
| 9 | + <div class="pmf-faq-overview-search col-4"> |
| 10 | + <form name="pmf-faq-search-autocomplete" id="pmf-faq-search-autocomplete" action="?action=faq-overview" |
| 11 | + method="post" role="form"> |
| 12 | + {{ csrfTokenSearch | raw }} |
| 13 | + <div class="input-group"> |
| 14 | + <input type="text" class="form-control" placeholder="{{ 'msgAdminSearchFaqs' | translate }}" |
| 15 | + id="pmf-faq-overview-search-input" autocomplete="off"> |
| 16 | + <button class="btn btn-primary" type="button" id="pmf-faq-overview-search-button"> |
| 17 | + <i class="bi bi-search" aria-hidden="true"></i> |
| 18 | + </button> |
| 19 | + </div> |
| 20 | + </form> |
| 21 | + </div> |
24 | 22 | </div> |
25 | | -{% endif %} |
26 | 23 |
|
27 | | -<div class="accordion shadow" id="pm-admin-faq-overview"> |
28 | | - <div class="accordion-item d-flex justify-content-start flex-wrap flex-md-nowrap align-items-center p-3 bg-secondary-subtle"> |
29 | | - <div class="col-2"> |
30 | | - <div class="form-check"> |
31 | | - <input class="form-check-input" type="checkbox" value="" id="pmf-checkbox-filter-inactive"> |
32 | | - <label class="form-check-label" for="pmf-checkbox-filter-inactive"> |
33 | | - {{ 'msgOnlyInactiveFAQs' | translate }} |
34 | | - </label> |
35 | | - </div> |
| 24 | + {% if categories is empty %} |
| 25 | + <div class="alert alert-danger" role="alert"> |
| 26 | + {{ 'msgErrorNoRecords' | translate }} |
36 | 27 | </div> |
37 | | - <div class="col-2"> |
38 | | - <div class="form-check"> |
39 | | - <input class="form-check-input" type="checkbox" value="" id="pmf-checkbox-filter-new"> |
40 | | - <label class="form-check-label" for="pmf-checkbox-filter-new"> |
41 | | - {{ 'msgOnlyNewFAQs' | translate }} |
42 | | - </label> |
| 28 | + {% endif %} |
| 29 | + |
| 30 | + <div class="accordion shadow" id="pm-admin-faq-overview"> |
| 31 | + <div class="accordion-item d-flex justify-content-start flex-wrap flex-md-nowrap align-items-center p-3 bg-secondary-subtle"> |
| 32 | + <div class="col-2"> |
| 33 | + <div class="form-check"> |
| 34 | + <input class="form-check-input" type="checkbox" value="" id="pmf-checkbox-filter-inactive"> |
| 35 | + <label class="form-check-label" for="pmf-checkbox-filter-inactive"> |
| 36 | + {{ 'msgOnlyInactiveFAQs' | translate }} |
| 37 | + </label> |
| 38 | + </div> |
| 39 | + </div> |
| 40 | + <div class="col-2"> |
| 41 | + <div class="form-check"> |
| 42 | + <input class="form-check-input" type="checkbox" value="" id="pmf-checkbox-filter-new"> |
| 43 | + <label class="form-check-label" for="pmf-checkbox-filter-new"> |
| 44 | + {{ 'msgOnlyNewFAQs' | translate }} |
| 45 | + </label> |
| 46 | + </div> |
43 | 47 | </div> |
44 | 48 | </div> |
45 | | - </div> |
46 | | - {% for category in categories %} |
47 | | - <div class="accordion-item"> |
48 | | - <div class="accordion-header category-header-indent-{{ category.indent }}"> |
49 | | - <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" |
50 | | - data-bs-target="#category-id-{{ category.id }}"> |
| 49 | + {% for category in categories %} |
| 50 | + <div class="accordion-item"> |
| 51 | + <div class="accordion-header category-header-indent-{{ category.indent }}"> |
| 52 | + <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" |
| 53 | + data-bs-target="#category-id-{{ category.id }}"> |
51 | 54 |
|
52 | | - <span class="lead">{{ category.name }}</span> |
53 | | - <span class="badge bg-primary mx-1">{{ numberOfRecords[category.id] ?? 0 }} {{ 'msgEntries' | translate }}</span> |
54 | | - <span class="badge bg-info mx-1">{{ numberOfComments[category.id] ?? 0 }} {{ msgComments }}</span> |
| 55 | + <span class="lead">{{ category.name }}</span> |
| 56 | + <span class="badge bg-primary mx-1">{{ numberOfRecords[category.id] ?? 0 }} {{ 'msgEntries' | translate }}</span> |
| 57 | + <span class="badge bg-info mx-1">{{ numberOfComments[category.id] ?? 0 }} {{ msgComments }}</span> |
55 | 58 |
|
56 | | - </button> |
57 | | - </div> |
58 | | - <div id="category-id-{{ category.id }}" class="accordion-collapse collapse" data-pmf-language="{{ category.lang }}" |
59 | | - data-bs-parent="#category-id-{{ category.id }}" data-pmf-categoryId="{{ category.id }}"> |
60 | | - <div class="accordion-body"> |
61 | | - <table class="table table-hover table-sm align-middle"> |
62 | | - <thead class="thead-light"> |
63 | | - <tr> |
64 | | - <th colspan="3" class="align-middle"> |
65 | | - ID |
66 | | - </th> |
67 | | - <th class="align-middle"> |
68 | | - {{ msgQuestion }} |
69 | | - </th> |
70 | | - <th class="align-middle"> |
71 | | - {{ msgDate }} |
72 | | - </th> |
73 | | - <th class="align-middle"> |
74 | | - {{ msgSticky }} |
75 | | - </th> |
76 | | - <th class="align-middle"> |
77 | | - {{ 'msgActive' | translate }} |
78 | | - </th> |
79 | | - <th colspan="4" class="align-middle"> |
80 | | - Actions |
81 | | - </th> |
82 | | - </tr> |
83 | | - </thead> |
84 | | - <tbody id="tbody-category-id-{{ category.id }}" data-pmf-csrf="{{ csrfTokenOverview }}"> |
| 59 | + </button> |
| 60 | + </div> |
| 61 | + <div id="category-id-{{ category.id }}" class="accordion-collapse collapse" data-pmf-language="{{ category.lang }}" |
| 62 | + data-bs-parent="#category-id-{{ category.id }}" data-pmf-categoryId="{{ category.id }}"> |
| 63 | + <div class="accordion-body"> |
| 64 | + <table class="table table-hover table-sm align-middle"> |
| 65 | + <thead class="thead-light"> |
| 66 | + <tr> |
| 67 | + <th colspan="3" class="align-middle"> |
| 68 | + ID |
| 69 | + </th> |
| 70 | + <th class="align-middle"> |
| 71 | + {{ msgQuestion }} |
| 72 | + </th> |
| 73 | + <th class="align-middle"> |
| 74 | + {{ msgDate }} |
| 75 | + </th> |
| 76 | + <th class="align-middle"> |
| 77 | + {{ msgSticky }} |
| 78 | + </th> |
| 79 | + <th class="align-middle"> |
| 80 | + {{ 'msgActive' | translate }} |
| 81 | + </th> |
| 82 | + <th colspan="4" class="align-middle"> |
| 83 | + Actions |
| 84 | + </th> |
| 85 | + </tr> |
| 86 | + </thead> |
| 87 | + <tbody id="tbody-category-id-{{ category.id }}" data-pmf-csrf="{{ csrfTokenOverview }}"> |
85 | 88 |
|
86 | | - </tbody> |
87 | | - </table> |
| 89 | + </tbody> |
| 90 | + </table> |
| 91 | + </div> |
88 | 92 | </div> |
89 | 93 | </div> |
| 94 | + {% endfor %} |
90 | 95 | </div> |
91 | | - {% endfor %} |
92 | | -</div> |
| 96 | +{% endblock %} |
0 commit comments