source: Klonkt/src/views/pages/admin-shows.ejs@ cf7c2d9

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

feat(nav): Agenda link in the view-switcher + "shows" → "events"

Left of the Timeline/Grid bar there is now a 📅 Agenda link to the agenda
page (/shows), visible for premium instances. Visible labels on the agenda
and in Admin renamed from "show(s)" to "event(s)" (routes stay /shows).

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

  • Property mode set to 100644
File size: 4.0 KB
RevLine 
[8d32dcf]1<%
2 var ss = (typeof shows !== 'undefined') ? shows : [];
3 var msg = (typeof msg !== 'undefined') ? msg : '';
4 var smtp = (typeof smtp !== 'undefined') ? smtp : false;
5 var nc = (typeof notifyCount !== 'undefined') ? notifyCount : 0;
6%>
7<section class="ash">
8 <p><a href="/admin" class="btn">&larr; Beheer</a></p>
9 <h1>Agenda</h1>
10
11 <% if (msg) { %><div class="ash-msg ash-<%= (typeof msgKind!=='undefined')?msgKind:'' %>"><%= msg %></div><% } %>
12
[cf7c2d9]13 <p class="ash-note"><strong><%= nc %></strong> abonnee(s) voor evenement-aankondigingen.
14 <% if (!smtp) { %><br>⚠ SMTP niet ingesteld — evenementen worden opgeslagen, maar notify-mails kunnen pas verstuurd worden zodra je SMTP invult.<% } %></p>
[8d32dcf]15
16 <form method="POST" action="<%= siteUrlBase %>/admin/shows" class="ash-form">
17 <div class="ash-grid">
18 <label>Datum<input type="date" name="date" required></label>
19 <label>Tijd (optioneel)<input type="time" name="time"></label>
20 <label>Plaats<input type="text" name="city" required placeholder="Amsterdam"></label>
21 <label>Land (optioneel)<input type="text" name="country" placeholder="NL"></label>
22 <label class="ash-wide">Locatie/zaal (optioneel)<input type="text" name="venue" placeholder="Paradiso"></label>
23 <label class="ash-wide">Ticket-URL (optioneel)<input type="url" name="ticket_url" placeholder="https://..."></label>
24 <label class="ash-wide">Notitie (optioneel)<input type="text" name="notes" placeholder="Support: ..."></label>
25 </div>
26 <label class="ash-check"><input type="checkbox" name="notify" value="1" <%= smtp ? '' : 'disabled' %>> Abonnees per e-mail op de hoogte brengen<%= smtp ? '' : ' (SMTP vereist)' %></label>
[cf7c2d9]27 <button type="submit" class="ash-add">+ Evenement toevoegen</button>
[8d32dcf]28 </form>
29
30 <% if (ss.length) { %>
31 <ul class="ash-list">
32 <% ss.forEach(function(s){ %>
33 <li class="ash-item">
34 <span class="ash-when"><%= s.date %><% if (s.time) { %> <%= s.time %><% } %></span>
35 <span class="ash-where"><%= s.city %><% if (s.venue) { %> — <%= s.venue %><% } %></span>
[cf7c2d9]36 <form method="POST" action="<%= siteUrlBase %>/admin/shows/<%= s.id %>/delete" onsubmit="return confirm('Evenement verwijderen??')" style="margin:0">
[8d32dcf]37 <button type="submit" class="ash-del">🗑</button>
38 </form>
39 </li>
40 <% }); %>
41 </ul>
42 <% } else { %>
[cf7c2d9]43 <p class="ash-empty">Nog geen evenementen.</p>
[8d32dcf]44 <% } %>
45</section>
46
47<style>
48 .ash { max-width: 680px; margin: 0 auto; padding: 24px 18px 64px; }
49 .ash h1 { margin: .4rem 0 14px; }
50 .ash-msg { padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; }
51 .ash-ok { background: rgba(60,160,90,.15); } .ash-bad { background: rgba(200,60,60,.15); }
52 .ash-note { font-size: 13px; opacity: .8; margin: 0 0 18px; }
53 .ash-form { border: 1px solid rgba(128,128,128,.2); border-radius: 14px; padding: 16px; margin-bottom: 24px; }
54 .ash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
55 .ash-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; }
56 .ash-grid .ash-wide { grid-column: 1 / -1; }
57 .ash-grid input { padding: 9px 11px; border-radius: 8px; border: 1px solid rgba(128,128,128,.4); background: transparent; color: inherit; font: inherit; font-weight: 400; }
58 .ash-check { display: flex; align-items: center; gap: 8px; margin: 12px 0; font-size: 13.5px; }
59 .ash-add { padding: 10px 18px; border-radius: 10px; border: none; background: var(--accent,#6b8f71); color: #fff; font-weight: 600; cursor: pointer; }
60 .ash-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
61 .ash-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid rgba(128,128,128,.18); border-radius: 10px; }
62 .ash-when { font-variant-numeric: tabular-nums; font-weight: 600; flex: 0 0 auto; }
63 .ash-where { flex: 1 1 auto; opacity: .85; }
64 .ash-del { background: none; border: none; cursor: pointer; font-size: 16px; opacity: .6; }
65 .ash-empty { opacity: .7; }
66</style>
Note: See TracBrowser for help on using the repository browser.