Add poll expiry, reminder mail and polls admin CLI
CI / Deploy / PHP 8.4 (push) Successful in 1m57s
CI / Deploy / PHP 8.5 (push) Successful in 2m9s
CI / Deploy / test (push) Successful in 1s
CI / Deploy / deploy (push) Skipped

Polls are deleted POLL_RETENTION_DAYS (default 90) after creation by the
cron job `bin/cake polls cleanup`. POLL_REMINDER_DAYS (default 14) before
that the owner gets a one-time reminder mail (expiry_reminded_at).

New commands: polls list, show (admin link only with --link), delete,
remind, cleanup. The expiry date is shown in the creation mail and the
dashboard. Docs: README, AGENTS.md, .env.example.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Sonnet 5.5 committed 2026-11-16 12:46:12 +01:00
1 parent 4caff47a09
commit a19cd8339e
20 files changed
+976 -1

No files matched your search

+3
View File
@@ -14,4 +14,7 @@
<p style="font-size:13px;color:#5b5f7a;word-break:break-all;"><?= h($adminUrl) ?></p>
<p><strong><?= __('Wichtig:') ?></strong> <?= __('Wer diesen Link kennt, kann die Umfrage bearbeiten. Gib ihn nicht weiter.') ?></p>
<p><?= __('Teilnehmende erreichen die Umfrage unter {0} mit dem Code <strong>{1}</strong>.', '<a href="' . h($joinUrl) . '">' . h($joinUrl) . '</a>', h($poll->formattedJoinCode())) ?></p>
<?php if ($poll->expiresAt() !== null) : ?>
<p><?= __('Hinweis: Die Umfrage wird am {0} automatisch gelöscht. Vorher erinnern wir dich per E-Mail.', h($poll->expiresAt()->format('d.m.Y'))) ?></p>
<?php endif; ?>
<p style="font-size:13px;color:#5b5f7a;"><?= __('Du hast diese Umfrage nicht angelegt? Dann kannst du diese E-Mail ignorieren.') ?></p>
+17
View File
@@ -0,0 +1,17 @@
<?php
/**
* @var \App\View\AppView $this
* @var \App\Model\Entity\Poll $poll
* @var string $adminUrl
* @var \Cake\I18n\DateTime $expires
*/
?>
<p><?= __('Hallo,') ?></p>
<p><?= __('deine Umfrage <strong>{0}</strong> wird am <strong>{1}</strong> automatisch gelöscht, einschließlich aller Folien, Antworten und Bilder.', h($poll->title), h($expires->format('d.m.Y'))) ?></p>
<p><?= __('Möchtest du die Ergebnisse behalten, sichere sie vorher in der Verwaltung als PDF:') ?></p>
<p style="margin:24px 0;">
<a href="<?= h($adminUrl) ?>" style="display:inline-block;background:#4b3fe0;color:#ffffff;text-decoration:none;padding:12px 20px;border-radius:8px;font-weight:600;"><?= __('Umfrage öffnen') ?></a>
</p>
<p style="font-size:13px;color:#5b5f7a;word-break:break-all;"><?= h($adminUrl) ?></p>
<p><strong><?= __('Wichtig:') ?></strong> <?= __('Wer diesen Link kennt, kann die Umfrage bearbeiten. Gib ihn nicht weiter.') ?></p>
<p style="font-size:13px;color:#5b5f7a;"><?= __('Du brauchst die Umfrage nicht mehr? Dann musst du nichts tun.') ?></p>
+5
View File
@@ -21,4 +21,9 @@
<?= __('Teilnehmende erreichen die Umfrage unter {0} mit dem Code {1}.', $joinUrl, $poll->formattedJoinCode()) ?>
<?php if ($poll->expiresAt() !== null) : ?>
<?= __('Hinweis: Die Umfrage wird am {0} automatisch gelöscht. Vorher erinnern wir dich per E-Mail.', $poll->expiresAt()->format('d.m.Y')) ?>
<?php endif; ?>
<?= __('Du hast diese Umfrage nicht angelegt? Dann kannst du diese E-Mail ignorieren.') ?>
+24
View File
@@ -0,0 +1,24 @@
<?php
/**
* @var \App\View\AppView $this
* @var \App\Model\Entity\Poll $poll
* @var string $adminUrl
* @var \Cake\I18n\DateTime $expires
*/
?>
<?= __('Hallo,') ?>
<?= __('deine Umfrage "{0}" wird am {1} automatisch gelöscht, einschließlich aller Folien, Antworten und Bilder.', $poll->title, $expires->format('d.m.Y')) ?>
<?= __('Möchtest du die Ergebnisse behalten, sichere sie vorher in der Verwaltung als PDF:') ?>
<?= $adminUrl ?>
<?= __('Wichtig: Wer diesen Link kennt, kann die Umfrage bearbeiten. Gib ihn nicht weiter.') ?>
<?= __('Du brauchst die Umfrage nicht mehr? Dann musst du nichts tun.') ?>