b14f4c1796
New licensed lake, picnic, dining, server, burger, and food photography. Rebuilt homepage gallery, logo, colors, copy, menu, specials, and exports. Added dashboard-configurable branding in [settings.php (line 18)](/Users/tyemeclifford/Documents/GH/fatbottomgrille/views/admin/settings.php:18). Added a public attribution page and full [image credits](/Users/tyemeclifford/Documents/GH/fatbottomgrille/public/assets/images/CREDITS.md). Migrated existing SQLite menu data and admin email to admin@lakesideorders.test. Verified 51 PHP files, JSON/JavaScript, storefront pages, database migration, admin settings, and menu PDF. All passed.
30 lines
2.0 KiB
PHP
30 lines
2.0 KiB
PHP
<div class="admin-page-actions">
|
|
<p><strong><?= (int) $recipientCount ?></strong> active users are currently opted in.</p>
|
|
</div>
|
|
|
|
<div class="admin-detail-grid newsletter-grid">
|
|
<section class="admin-panel">
|
|
<div class="admin-panel-heading"><div><span class="eyebrow">Send an update</span><h2>New Newsletter</h2></div></div>
|
|
<form class="form-stack" action="<?= e(url('/admin/newsletters/send')) ?>" method="post">
|
|
<?= csrf_field() ?>
|
|
<label>Subject line<input type="text" name="subject" maxlength="140" required placeholder="This weekend at <?= e($config->get('business.name')) ?>"></label>
|
|
<label>Message<textarea name="content" rows="12" required placeholder="Share a new special, schedule update, or note from the kitchen..."></textarea></label>
|
|
<div class="notice">Every email includes an unsubscribe link. Users can also opt out from My Account.</div>
|
|
<button class="button button-large button-block" type="submit" data-confirm="Send this newsletter to every opted-in user?">Send to <?= (int) $recipientCount ?> Subscribers</button>
|
|
</form>
|
|
</section>
|
|
<section class="admin-panel">
|
|
<div class="admin-panel-heading"><div><span class="eyebrow">Delivery history</span><h2>Past Sends</h2></div></div>
|
|
<div class="newsletter-history">
|
|
<?php if (!$newsletters): ?><p class="muted">No newsletters have been sent yet.</p><?php endif; ?>
|
|
<?php foreach ($newsletters as $newsletter): ?>
|
|
<article>
|
|
<div><strong><?= e($newsletter['subject']) ?></strong><span><?= e(store_datetime((string) ($newsletter['sent_at'] ?: $newsletter['created_at']))) ?></span></div>
|
|
<span class="role-badge"><?= (int) $newsletter['recipient_count'] ?> sent</span>
|
|
<small>by <?= e($newsletter['author'] ?: 'System') ?></small>
|
|
</article>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
</section>
|
|
</div>
|