Changeset 68b27a4 in Klonkt for src/views/pages/admin-shows.ejs


Ignore:
Timestamp:
06/20/2026 07:28:43 AM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
0fcc09c
Parents:
d7b5a6c
Message:

feat(agenda): Agenda opt-in — only shown when enabled + active on /shows

  • New setting agenda_enabled (Admin → Agenda: toggle "Show agenda on the site").
  • Agenda button in the pill only appears when premium AND enabled.
  • /shows (+ /shows/notify) gated: disabled = 404 (not reachable).
  • On the agenda page, the Agenda item in the pill is now marked "active" (the pill stays visible there, as requested).

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/admin-shows.ejs

    rd7b5a6c r68b27a4  
    1010
    1111  <% if (msg) { %><div class="ash-msg ash-<%= (typeof msgKind!=='undefined')?msgKind:'' %>"><%= msg %></div><% } %>
     12
     13  <% var agOn = (typeof agendaEnabled !== 'undefined') && agendaEnabled; %>
     14  <form method="POST" action="<%= siteUrlBase %>/admin/shows/toggle" style="margin:0 0 14px">
     15    <label style="display:flex;align-items:center;gap:10px;cursor:pointer;font-weight:600">
     16      <input type="checkbox" name="enabled" value="1" <%= agOn ? 'checked' : '' %> onchange="this.form.submit()" style="width:18px;height:18px;accent-color:var(--accent)">
     17      <span>Agenda tonen op de site <small style="font-weight:400;opacity:.7">(Agenda-knop in de balk + de agendapagina)</small></span>
     18    </label>
     19    <noscript><button type="submit" class="btn">Opslaan</button></noscript>
     20  </form>
     21  <% if (!agOn) { %><div class="ash-msg">De agenda staat nu <strong>uit</strong> — bezoekers zien geen Agenda-knop en de agendapagina is niet bereikbaar. Zet 'm aan om je evenementen te tonen.</div><% } %>
    1222
    1323  <p class="ash-note"><strong><%= nc %></strong> abonnee(s) voor evenement-aankondigingen.
Note: See TracChangeset for help on using the changeset viewer.