Add duplicating slides

Copies question, description, settings and options (incl. correct quiz
answers) directly behind the original, without responses. The copy starts
like a new slide (Slide::startFresh()) and opens in the edit form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Opus 5.5 committed 2026-11-11 15:18:10 +01:00
1 parent 5b3fccde67
commit e2f24877dd
7 files changed
+214 -5

No files matched your search

+5
View File
@@ -144,6 +144,11 @@ $hasInternal = array_filter($slides, fn($slide) => $slide->isInteractive() && $s
<a class="button button--small" href="<?= $this->Url->build($url('slides:answers', ['id' => $slide->id])) ?>"><?= $slide->type === 'scale' ? __('Auswertung') : __('Antworten') ?></a>
<?php endif; ?>
<a class="button button--small" href="<?= $this->Url->build($url('slides:edit', ['id' => $slide->id])) ?>"><?= __('Bearbeiten') ?></a>
<?= $this->Form->postLink(__('Duplizieren'), $url('slides:duplicate', ['id' => $slide->id]), [
'class' => 'button button--small',
'title' => __('Kopie dieser Folie direkt dahinter anlegen (ohne Antworten)'),
'aria-label' => __('Folie „{0}“ duplizieren', $slide->question),
]) ?>
<?php if ($count > 0) : ?>
<?= $this->Form->postLink(__('Zurücksetzen'), $url('slides:reset', ['id' => $slide->id]), [
'class' => 'button button--small',