Add admin menu drawer and poll cloning, drop participant screen tools
CI / Deploy / PHP 8.5 (push) Successful in 1m51s
CI / Deploy / PHP 8.4 (push) Successful in 1m51s
CI / Deploy / test (push) Successful in 2s
CI / Deploy / deploy (push) Skipped

- Remove fullscreen and wake lock buttons from the participant view.
- Turn the admin sidebar into a drawer below 900px, opened from a header
  menu button next to the theme switch (progressive enhancement).
- Add "Umfrage kopieren": clone a poll with all slides, options and images
  but without responses, with its own join code and admin link.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Sonnet 5.5 committed 2026-11-20 10:57:33 +01:00
1 parent 0f91377de3
commit bd57f23be6
15 files changed
+374 -138

No files matched your search

+38
View File
@@ -20,6 +20,7 @@ use Cake\Routing\Router;
use chillerlan\QRCode\Output\QRMarkupSVG;
use chillerlan\QRCode\QRCode;
use chillerlan\QRCode\QROptions;
use Throwable;
/**
* Poll level admin actions: dashboard, settings, presenter mode, export.
@@ -141,6 +142,43 @@ class AdminController extends AdminAppController
return $this->redirect($this->adminUrl());
}
/**
* Clones the whole presentation (slides, settings, images) without any responses into a new poll with
* its own admin link, which is mailed to the owner like after creating a poll.
*
* @return \Cake\Http\Response|null
*/
public function cloneAll(): ?Response
{
$this->request->allowMethod(['post']);
if (!$this->throttle('create', 'Plenario.throttle.createPerHour')) {
$this->Flash->error(__('Zu viele Umfragen in kurzer Zeit. Bitte versuche es später noch einmal.'));
return $this->redirect($this->adminUrl());
}
try {
[$copy, $token] = $this->Polls->clonePoll($this->poll, $this->Slides->listForPoll($this->poll->id));
} catch (Throwable) {
$token = null;
}
if ($token === null) {
$this->Flash->error(__('Die Umfrage konnte nicht kopiert werden.'));
return $this->redirect($this->adminUrl());
}
$adminUrl = $this->adminUrlFor($token);
$sent = (new PollMailer())->sendSafely('adminLink', [$copy, $adminUrl, $this->joinUrl($copy)]);
if ($sent) {
$this->Flash->success(__('Kopie angelegt, ohne Antworten. Der Admin-Link der Kopie wurde per E-Mail verschickt – speichere dir diese Seite als Lesezeichen.'));
} else {
$this->Flash->warning(__('Kopie angelegt, ohne Antworten. Die E-Mail mit dem Admin-Link konnte nicht verschickt werden – speichere dir diese Seite unbedingt als Lesezeichen!'));
}
return $this->redirect($this->adminUrlFor($token));
}
/**
* Deletes the whole poll incl. slides and responses.
*