source: Klonkt/src/views/pages/admin-comments.ejs@ c16e0a5

main
Last change on this file since c16e0a5 was bbf9d1a, checked in by roboburr <roboburr@…>, 3 months ago

feat(i18n phase 5): all admin sub-pages translated (NL/EN/DE)

settings, site-edit, seo, google, audio, stats, playlists, users, sites,
comments, circle, shows, newsletter, updates, epk, help. ~520 new keys
per language. Loop-shadowing of t() resolved by fetching before the loop. 709
view-keys cross-checked against the dictionary (0 missing).

Co-Authored-By: Claude <noreply@…>

  • Property mode set to 100644
File size: 5.7 KB
RevLine 
[7bc636b]1<div class="container admin-comments-page">
[bbf9d1a]2 <p><a href="/admin" class="btn">&larr; <%= t('acom.back') %></a></p>
3 <h1><%= t('acom.title') %></h1>
[7bc636b]4
5 <p class="muted">
[bbf9d1a]6 <%= t('acom.mode_for_site') %> <strong><%= moderationMode %></strong>
[7bc636b]7 <% if (moderationMode === 'trust') { %>
[bbf9d1a]8 &mdash; <%= t('acom.mode_trust_a') %> <em><%= t('acom.mode_moderate_word') %></em>
9 <a href="/admin/sites/<%= site.slug %>/edit"><%= t('acom.site_settings') %></a> <%= t('acom.mode_trust_b') %>
[7bc636b]10 <% } else { %>
[bbf9d1a]11 &mdash; <%= t('acom.mode_moderate_hint') %>
[7bc636b]12 <% } %>
13 </p>
14
15 <% if (success) { %><div class="audio-flash audio-flash--ok"><%= success %></div><% } %>
16 <% if (error) { %><div class="audio-flash audio-flash--err"><%= error %></div><% } %>
17
[bbf9d1a]18 <h2><%= t('acom.pending', { n: pending.length }) %></h2>
[7bc636b]19 <% if (!pending.length) { %>
[bbf9d1a]20 <p class="muted"><%= t('acom.nothing_waiting') %></p>
[7bc636b]21 <% } else { %>
[bbf9d1a]22 <%
23 var _c_reply = t('acom.reply');
24 var _c_on = t('acom.on');
25 var _c_approve = t('acom.approve');
26 var _c_reject = t('acom.reject');
27 %>
[7bc636b]28 <ol class="moderation-list">
29 <% pending.forEach(function(c) { %>
30 <li class="moderation-item">
31 <div class="moderation-meta">
32 <strong><%= c.author_username %></strong>
[bbf9d1a]33 <% if (c.parent_comment_id) { %><span class="muted">(<%= _c_reply %>)</span><% } %>
34 <%= _c_on %> <a href="<%= siteUrlBase %>/<%= c.post_slug %>"><%= c.post_title || c.post_slug %></a>
[7bc636b]35 <span class="muted">&middot; <%= formatDateTime(c.created_at) %></span>
36 </div>
37 <blockquote class="moderation-content"><%= c.content %></blockquote>
38 <div class="moderation-actions">
[8cb1dc7]39 <form method="post" action="<%= siteUrlBase %>/admin/comments/<%= c.id %>/approve" style="display:inline">
[bbf9d1a]40 <button type="submit" class="btn btn-primary"><%= _c_approve %></button>
[7bc636b]41 </form>
[8cb1dc7]42 <form method="post" action="<%= siteUrlBase %>/admin/comments/<%= c.id %>/reject" style="display:inline">
[bbf9d1a]43 <button type="submit" class="btn btn-danger"><%= _c_reject %></button>
[7bc636b]44 </form>
45 </div>
46 </li>
47 <% }); %>
48 </ol>
49 <% } %>
50
[bbf9d1a]51 <h2><%= t('acom.recent') %></h2>
[7bc636b]52 <% if (!recent.length) { %>
[bbf9d1a]53 <p class="muted"><%= t('acom.nothing_yet') %></p>
[7bc636b]54 <% } else { %>
[a474bd2]55 <ul class="decision-list">
56 <% recent.forEach(function(c) { %>
57 <li class="decision-card decision-card--<%= c.status %>">
58 <span class="status-pill status-pill--<%= c.status %>"><%= c.status %></span>
59 <div class="decision-main">
60 <span class="decision-author"><%= c.author_username %></span>
61 <a class="decision-post" href="<%= siteUrlBase %>/<%= c.post_slug %>"><%= c.post_title || c.post_slug %></a>
62 </div>
63 <span class="decision-date"><%= formatDateTime(c.created_at) %></span>
64 </li>
65 <% }); %>
66 </ul>
[7bc636b]67 <% } %>
68</div>
69
70<style>
71.admin-comments-page { max-width: 900px; margin: 3rem auto; padding: 0 1rem; }
72.admin-comments-page h1 { font-family: var(--font-display, serif); font-size: 2rem; margin: 0 0 1rem; }
73.admin-comments-page h2 { font-family: var(--font-display, serif); font-size: 1.25rem; margin: 1.5rem 0 0.75rem; }
74.muted { color: var(--ink-muted, var(--ink-soft)); }
75.muted a { color: var(--accent); }
76
77.moderation-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1rem; }
78.moderation-item {
79 background: var(--paper-2);
80 border: 1px solid var(--rule);
81 border-radius: 8px;
82 padding: 1rem;
83}
84.moderation-meta { font-size: 0.85rem; margin-bottom: 0.5rem; color: var(--ink-soft); }
85.moderation-meta a { color: var(--accent); }
86.moderation-content {
87 margin: 0 0 0.75rem;
88 padding: 0.5rem 0.75rem;
89 border-left: 3px solid var(--accent);
90 background: var(--paper);
91 white-space: pre-wrap;
92 word-wrap: break-word;
93 color: var(--ink);
94}
95.moderation-actions { display: flex; gap: 0.5rem; }
96
97.status-pill {
98 display: inline-block; padding: 0.1rem 0.5rem; border-radius: 10px;
99 font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em;
100}
101.status-pill--approved { background: rgba(40, 160, 90, 0.15); color: #2a9d5e; }
102.status-pill--rejected { background: rgba(200, 60, 60, 0.15); color: #c33; }
103.status-pill--pending { background: var(--paper); color: var(--ink-muted, var(--ink-soft)); }
104
[a474bd2]105/* Recent decisions als cards (i.p.v. een platte tabel) */
106.decision-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
107.decision-card {
108 display: flex; align-items: center; gap: 0.85rem;
109 padding: 0.7rem 0.9rem;
110 background: var(--paper-2); border: 1px solid var(--rule);
111 border-left: 3px solid var(--rule); border-radius: 10px;
112}
113.decision-card--approved { border-left-color: #2a9d5e; }
114.decision-card--rejected { border-left-color: #c33; }
115.decision-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
116.decision-author { font-weight: 600; }
117.decision-post { color: var(--accent); text-decoration: none; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
118.decision-post:hover { text-decoration: underline; }
119.decision-date { flex: 0 0 auto; color: var(--ink-muted, var(--ink-soft)); font-size: 0.8rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
120@media (max-width: 520px) {
121 .decision-card { flex-wrap: wrap; }
122 .decision-date { width: 100%; }
123}
124
[7bc636b]125.audio-flash { padding: 0.75rem 1rem; border-radius: 6px; margin: 1rem 0; font-size: 0.9rem; }
126.audio-flash--ok { background: rgba(40, 160, 90, 0.15); color: #2a9d5e; border: 1px solid rgba(40, 160, 90, 0.3); }
127.audio-flash--err { background: rgba(200, 60, 60, 0.15); color: #c33; border: 1px solid rgba(200, 60, 60, 0.3); }
128</style>
Note: See TracBrowser for help on using the repository browser.