|
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-chat-right-dots"></i> |
4 | | - {{ 'adminHeaderComments' | translate }} |
5 | | - </h1> |
6 | | -</div> |
| 1 | +{% extends '@admin/index.twig' %} |
7 | 2 |
|
8 | | -<div id="returnMessage"></div> |
| 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-chat-right-dots"></i> |
| 7 | + {{ 'adminHeaderComments' | translate }} |
| 8 | + </h1> |
| 9 | + </div> |
9 | 10 |
|
10 | | -<ul class="nav nav-tabs" id="comments" role="tablist"> |
11 | | - <li class="nav-item" role="presentation"> |
12 | | - <button class="nav-link active" id="home-tab" data-bs-toggle="tab" data-bs-target="#faqs-tab-pane" type="button" |
13 | | - role="tab" aria-controls="home-tab-pane" aria-selected="true"> |
14 | | - {{ 'msgAdminCommentFaqs' | translate }} |
15 | | - </button> |
16 | | - </li> |
17 | | - <li class="nav-item" role="presentation"> |
18 | | - <button class="nav-link" id="profile-tab" data-bs-toggle="tab" data-bs-target="#news-tab-pane" type="button" |
19 | | - role="tab" aria-controls="news-tab-pane" aria-selected="false"> |
20 | | - {{ 'msgAdminCommentNews' | translate }} |
21 | | - </button> |
22 | | - </li> |
23 | | -</ul> |
24 | | -<div class="tab-content" id="commentsContent"> |
25 | | - <div class="tab-pane fade show active mt-2" id="faqs-tab-pane" role="tabpanel" aria-labelledby="faqs-tab" tabindex="0"> |
26 | | - <form id="pmf-comments-selected-faq" name="pmf-comments-selected-faq" method="post" accept-charset="utf-8"> |
27 | | - <input type="hidden" id="pmf-csrf-token" name="pmf-csrf-token" value="{{ csrfToken }}"> |
| 11 | + <div id="returnMessage"></div> |
28 | 12 |
|
29 | | - <table class="table table-striped border align-middle"> |
30 | | - {% for comment in faqComments %} |
31 | | - <tr id="comments_{{ comment.id }}"> |
32 | | - <td> |
33 | | - <label> |
34 | | - <input type="checkbox" class="form-check-input" id="comments[]" name="comments[]" |
35 | | - value="{{ comment.id }}"> |
36 | | - </label> |
37 | | - </td> |
38 | | - <td> |
39 | | - <div class="d-flex align-items-center flex-wrap text-muted mb-md-0 mb-4 small"> |
40 | | - <div class="border-end pe-3 me-3 mb-2"> |
41 | | - <i aria-hidden="true" class="bi bi-person"></i> |
42 | | - <a href="mailto:{{ comment.email }}">{{ comment.username }}</a> |
43 | | - </div> |
44 | | - <div class="d-flex mb-2"> |
45 | | - <div class="d-flex border-end align-items-center pe-3 me-3"> |
46 | | - <i aria-hidden="true" class="bi bi-calendar-date me-1"></i> |
47 | | - {{ comment.date | format_datetime(locale=currentLocale) }} |
48 | | - </div> |
49 | | - <div class="d-flex align-items-center me-3"> |
50 | | - <i aria-hidden="true" class="bi bi-chat-dots me-1"></i> |
51 | | - <a href="../?action=faq&cat={{ comment.categoryId }}&id={{ comment.recordId }}&artlang={{ currentLocale }}"> |
52 | | - {{ comment.recordId | faqQuestion | raw }} |
53 | | - </a> |
| 13 | + <ul class="nav nav-tabs" id="comments" role="tablist"> |
| 14 | + <li class="nav-item" role="presentation"> |
| 15 | + <button class="nav-link active" id="home-tab" data-bs-toggle="tab" data-bs-target="#faqs-tab-pane" type="button" |
| 16 | + role="tab" aria-controls="home-tab-pane" aria-selected="true"> |
| 17 | + {{ 'msgAdminCommentFaqs' | translate }} |
| 18 | + </button> |
| 19 | + </li> |
| 20 | + <li class="nav-item" role="presentation"> |
| 21 | + <button class="nav-link" id="profile-tab" data-bs-toggle="tab" data-bs-target="#news-tab-pane" type="button" |
| 22 | + role="tab" aria-controls="news-tab-pane" aria-selected="false"> |
| 23 | + {{ 'msgAdminCommentNews' | translate }} |
| 24 | + </button> |
| 25 | + </li> |
| 26 | + </ul> |
| 27 | + <div class="tab-content" id="commentsContent"> |
| 28 | + <div class="tab-pane fade show active mt-2" id="faqs-tab-pane" role="tabpanel" aria-labelledby="faqs-tab" |
| 29 | + tabindex="0"> |
| 30 | + <form id="pmf-comments-selected-faq" name="pmf-comments-selected-faq" method="post" accept-charset="utf-8"> |
| 31 | + <input type="hidden" id="pmf-csrf-token" name="pmf-csrf-token" value="{{ csrfToken }}"> |
| 32 | + |
| 33 | + <table class="table table-striped border align-middle"> |
| 34 | + {% for comment in faqComments %} |
| 35 | + <tr id="comments_{{ comment.id }}"> |
| 36 | + <td> |
| 37 | + <label> |
| 38 | + <input type="checkbox" class="form-check-input" id="comments[]" name="comments[]" |
| 39 | + value="{{ comment.id }}"> |
| 40 | + </label> |
| 41 | + </td> |
| 42 | + <td> |
| 43 | + <div class="d-flex align-items-center flex-wrap text-muted mb-md-0 mb-4 small"> |
| 44 | + <div class="border-end pe-3 me-3 mb-2"> |
| 45 | + <i aria-hidden="true" class="bi bi-person"></i> |
| 46 | + <a href="mailto:{{ comment.email }}">{{ comment.username }}</a> |
| 47 | + </div> |
| 48 | + <div class="d-flex mb-2"> |
| 49 | + <div class="d-flex border-end align-items-center pe-3 me-3"> |
| 50 | + <i aria-hidden="true" class="bi bi-calendar-date me-1"></i> |
| 51 | + {{ comment.date | format_datetime(locale=currentLocale) }} |
| 52 | + </div> |
| 53 | + <div class="d-flex align-items-center me-3"> |
| 54 | + <i aria-hidden="true" class="bi bi-chat-dots me-1"></i> |
| 55 | + <a |
| 56 | + href="../?action=faq&cat={{ comment.categoryId }}&id={{ comment.recordId }}&artlang={{ currentLocale }}"> |
| 57 | + {{ comment.recordId | faqQuestion | raw }} |
| 58 | + </a> |
| 59 | + </div> |
| 60 | + </div> |
54 | 61 | </div> |
55 | | - </div> |
56 | | - </div> |
57 | | - {{ comment.comment }} |
58 | | - </td> |
59 | | - </tr> |
60 | | - {% endfor %} |
61 | | - </table> |
| 62 | + {{ comment.comment | striptags }} |
| 63 | + </td> |
| 64 | + </tr> |
| 65 | + {% endfor %} |
| 66 | + </table> |
62 | 67 |
|
63 | | - </form> |
64 | | - <div class="text-end"> |
65 | | - <button class="btn btn-danger" id="pmf-button-delete-faq-comments" type="button"> |
66 | | - {{ 'msgDelete' | translate }} |
67 | | - </button> |
| 68 | + </form> |
| 69 | + <div class="text-end"> |
| 70 | + <button class="btn btn-danger" id="pmf-button-delete-faq-comments" type="button"> |
| 71 | + {{ 'msgDelete' | translate }} |
| 72 | + </button> |
| 73 | + </div> |
68 | 74 | </div> |
69 | | - </div> |
70 | | - <div class="tab-pane fade mt-2" id="news-tab-pane" role="tabpanel" aria-labelledby="news-tab" tabindex="0"> |
71 | | - <form id="pmf-comments-selected-news" name="pmf-comments-selected-news" method="post" accept-charset="utf-8"> |
72 | | - <input type="hidden" id="pmf-csrf-token" name="pmf-csrf-token" value="{{ csrfToken }}"> |
| 75 | + <div class="tab-pane fade mt-2" id="news-tab-pane" role="tabpanel" aria-labelledby="news-tab" tabindex="0"> |
| 76 | + <form id="pmf-comments-selected-news" name="pmf-comments-selected-news" method="post" accept-charset="utf-8"> |
| 77 | + <input type="hidden" id="pmf-csrf-token" name="pmf-csrf-token" value="{{ csrfToken }}"> |
73 | 78 |
|
74 | | - <table class="table table-striped border align-middle"> |
75 | | - {% for comment in newsComments %} |
76 | | - <tr id="comments_{{ comment.id }}"> |
77 | | - <td> |
78 | | - <label> |
79 | | - <input type="checkbox" class="form-check-input" id="comments[]" name="comments[]" |
80 | | - value="{{ comment.id }}"> |
81 | | - </label> |
82 | | - </td> |
83 | | - <td> |
84 | | - <div class="d-flex align-items-center flex-wrap text-muted mb-md-0 mb-4 small"> |
85 | | - <div class="border-end pe-3 me-3 mb-2"> |
86 | | - <i aria-hidden="true" class="bi bi-person"></i> |
87 | | - <a href="mailto:{{ comment.email }}">{{ comment.username }}</a> |
88 | | - </div> |
89 | | - <div class="d-flex mb-2"> |
90 | | - <div class="d-flex border-end align-items-center pe-3 me-3"> |
91 | | - <i aria-hidden="true" class="bi bi-calendar-date me-1"></i> |
92 | | - {{ comment.date | format_datetime(locale=currentLocale) }} |
| 79 | + <table class="table table-striped border align-middle"> |
| 80 | + {% for comment in newsComments %} |
| 81 | + <tr id="comments_{{ comment.id }}"> |
| 82 | + <td> |
| 83 | + <label> |
| 84 | + <input type="checkbox" class="form-check-input" id="comments[]" name="comments[]" |
| 85 | + value="{{ comment.id }}"> |
| 86 | + </label> |
| 87 | + </td> |
| 88 | + <td> |
| 89 | + <div class="d-flex align-items-center flex-wrap text-muted mb-md-0 mb-4 small"> |
| 90 | + <div class="border-end pe-3 me-3 mb-2"> |
| 91 | + <i aria-hidden="true" class="bi bi-person"></i> |
| 92 | + <a href="mailto:{{ comment.email }}">{{ comment.username }}</a> |
| 93 | + </div> |
| 94 | + <div class="d-flex mb-2"> |
| 95 | + <div class="d-flex border-end align-items-center pe-3 me-3"> |
| 96 | + <i aria-hidden="true" class="bi bi-calendar-date me-1"></i> |
| 97 | + {{ comment.date | format_datetime(locale=currentLocale) }} |
| 98 | + </div> |
| 99 | + <div class="d-flex align-items-center me-3"> |
| 100 | + <a href="../?action=news&newsid={{ comment.recordId }}&artlang={{ currentLocale }}"> |
| 101 | + <i class="bi bi-newspaper"></i> |
| 102 | + </a> |
| 103 | + </div> |
| 104 | + </div> |
93 | 105 | </div> |
94 | | - <div class="d-flex align-items-center me-3"> |
95 | | - <a href="../?action=news&newsid={{ comment.recordId }}&artlang={{ currentLocale }}"> |
96 | | - <i class="bi bi-newspaper"></i> |
97 | | - </a> |
98 | | - </div> |
99 | | - </div> |
100 | | - </div> |
101 | | - {{ comment.comment }} |
102 | | - </td> |
103 | | - </tr> |
104 | | - {% endfor %} |
105 | | - </table> |
| 106 | + {{ comment.comment }} |
| 107 | + </td> |
| 108 | + </tr> |
| 109 | + {% endfor %} |
| 110 | + </table> |
106 | 111 |
|
107 | | - </form> |
108 | | - <div class="text-end"> |
109 | | - <button class="btn btn-danger" id="pmf-button-delete-news-comments" type="button"> |
110 | | - {{ 'msgDelete' | translate }} |
111 | | - </button> |
| 112 | + </form> |
| 113 | + <div class="text-end"> |
| 114 | + <button class="btn btn-danger" id="pmf-button-delete-news-comments" type="button"> |
| 115 | + {{ 'msgDelete' | translate }} |
| 116 | + </button> |
| 117 | + </div> |
112 | 118 | </div> |
113 | 119 | </div> |
114 | | -</div> |
| 120 | +{% endblock %} |
0 commit comments