Add Rosary Builder — custom prayer-sequence sessions
Superuser+ can now build a custom prayer sequence from scratch: - Two-panel builder UI: step sequence (left) + searchable prayer library (right) - 16 standard prayers seeded globally; users can create private custom prayers - Admin can promote private prayers to global and manage the library - Four attribution modes per step: Leader/All, Leader only, All together, None - Optional subject name/pronoun for variable substitution in prayers - Custom sessions fully presented via the existing presenter (auto-split works) - migrate_v4.php creates custom_prayers + builder_steps tables Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+15
-2
@@ -94,6 +94,7 @@ $occasion_labels = [
|
||||
'divine_mercy_novena' => 'Divine Mercy Novena',
|
||||
'general_rosary' => 'General Rosary',
|
||||
'memorial' => 'Memorial',
|
||||
'custom' => 'Custom Sequence',
|
||||
];
|
||||
$mystery_labels = [
|
||||
'sorrowful' => 'Sorrowful',
|
||||
@@ -121,7 +122,11 @@ $novena_created = isset($_GET['novena_created']) ? (int)$_GET['novena_created']
|
||||
<h1>✝ <?= htmlspecialchars($site_name) ?></h1>
|
||||
<div class="header-actions">
|
||||
<a href="<?= BASE_URL ?>/" class="btn btn-ghost" style="font-size:13px">← View Site</a>
|
||||
<?php if (has_role('superuser')): ?>
|
||||
<a href="<?= BASE_URL ?>/admin/builder.php" class="btn btn-ghost">✒ Builder</a>
|
||||
<?php endif; ?>
|
||||
<?php if (has_role('admin')): ?>
|
||||
<a href="<?= BASE_URL ?>/admin/prayers.php" class="btn btn-ghost">Prayers</a>
|
||||
<a href="<?= BASE_URL ?>/admin/users.php" class="btn btn-ghost">Users</a>
|
||||
<a href="<?= BASE_URL ?>/admin/audio.php" class="btn btn-ghost">Audio</a>
|
||||
<?php endif; ?>
|
||||
@@ -142,7 +147,12 @@ $novena_created = isset($_GET['novena_created']) ? (int)$_GET['novena_created']
|
||||
|
||||
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:20px">
|
||||
<h2 style="margin:0"><?= $is_admin ? 'All Sessions' : 'My Sessions' ?></h2>
|
||||
<a href="<?= BASE_URL ?>/admin/setup.php" class="btn btn-primary">+ New Session</a>
|
||||
<div style="display:flex;gap:8px">
|
||||
<?php if (has_role('superuser')): ?>
|
||||
<a href="<?= BASE_URL ?>/admin/builder.php" class="btn btn-secondary">✒ Build Custom</a>
|
||||
<?php endif; ?>
|
||||
<a href="<?= BASE_URL ?>/admin/setup.php" class="btn btn-primary">+ New Session</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (empty($all_rows)): ?>
|
||||
@@ -224,7 +234,10 @@ $novena_created = isset($_GET['novena_created']) ? (int)$_GET['novena_created']
|
||||
target="_blank"
|
||||
class="btn btn-sm btn-primary">Present</a>
|
||||
<?php if ($is_admin || (int)$row['user_id'] === $uid): ?>
|
||||
<a href="<?= BASE_URL ?>/admin/setup.php?id=<?= $row['id'] ?>"
|
||||
<?php $edit_url = ($row['occasion'] === 'custom')
|
||||
? BASE_URL . '/admin/builder.php?id=' . $row['id']
|
||||
: BASE_URL . '/admin/setup.php?id=' . $row['id']; ?>
|
||||
<a href="<?= htmlspecialchars($edit_url) ?>"
|
||||
class="btn btn-sm btn-secondary">Edit</a>
|
||||
<form method="post" style="display:inline"
|
||||
onsubmit="return confirm('Delete this session?')">
|
||||
|
||||
Reference in New Issue
Block a user