Add hiding slides from the presentation
Hidden slides stay prepared in the dashboard but are skipped when presenting (start, next/prev, goto), can not go live via embed and are left out of the PDF export. Hiding the live or paused slide pauses the poll like deleting it and resumes with the next visible slide. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e2f24877dd
commit
3c978e6f22
15 files changed
+333
-35
No files matched your search
@@ -15,7 +15,7 @@
|
||||
$this->assign('title', $poll->title);
|
||||
$this->assign('noindex', '1');
|
||||
$url = fn(string $name, array $params = []) => ['_name' => $name, 'token' => $adminToken] + $params;
|
||||
$hasInternal = array_filter($slides, fn($slide) => $slide->isInteractive() && $slide->isPrivate()) !== [];
|
||||
$hasInternal = array_filter($slides, fn($slide) => !$slide->is_hidden && $slide->isInteractive() && $slide->isPrivate()) !== [];
|
||||
?>
|
||||
<div class="admin-head">
|
||||
<div>
|
||||
@@ -72,7 +72,7 @@ $hasInternal = array_filter($slides, fn($slide) => $slide->isInteractive() && $s
|
||||
$isCurrent = $poll->current_slide_id === $slide->id;
|
||||
$count = $responseCounts[$slide->id] ?? 0;
|
||||
?>
|
||||
<li class="slide-item<?= $isCurrent ? ' slide-item--current' : '' ?>" data-slide-id="<?= $slide->id ?>">
|
||||
<li class="slide-item<?= $isCurrent ? ' slide-item--current' : '' ?><?= $slide->is_hidden ? ' slide-item--hidden' : '' ?>" data-slide-id="<?= $slide->id ?>">
|
||||
<div class="slide-item__lead">
|
||||
<button type="button" class="drag-handle" data-drag-handle hidden
|
||||
aria-label="<?= h(__('Folie „{0}“ verschieben (Pfeiltasten)', $slide->question)) ?>"
|
||||
@@ -83,6 +83,7 @@ $hasInternal = array_filter($slides, fn($slide) => $slide->isInteractive() && $s
|
||||
<div class="slide-item__meta">
|
||||
<span class="badge badge--type-<?= h($slide->type) ?>"><?= h($slide->typeLabel()) ?></span>
|
||||
<?php if ($isCurrent) : ?><span class="badge badge--live"><?= __('live') ?></span><?php endif; ?>
|
||||
<?php if ($slide->is_hidden) : ?><span class="badge badge--off" title="<?= __('Wird beim Präsentieren übersprungen und fehlt im PDF-Export') ?>"><?= __('ausgeblendet') ?></span><?php endif; ?>
|
||||
<?php if ($slide->isInteractive()) : ?>
|
||||
<span class="muted"><?= __n('{0} Antwort', '{0} Antworten', $count, $count) ?></span>
|
||||
<?php if ($slide->isQuiz()) : ?>
|
||||
@@ -133,7 +134,7 @@ $hasInternal = array_filter($slides, fn($slide) => $slide->isInteractive() && $s
|
||||
</details>
|
||||
</div>
|
||||
<div class="slide-item__actions">
|
||||
<?php if (!$isCurrent) : ?>
|
||||
<?php if (!$isCurrent && !$slide->is_hidden) : ?>
|
||||
<?= $this->Form->postLink(__('Live'), $url('admin:control'), [
|
||||
'data' => ['action' => 'goto', 'slide_id' => $slide->id],
|
||||
'class' => 'button button--small',
|
||||
@@ -149,6 +150,22 @@ $hasInternal = array_filter($slides, fn($slide) => $slide->isInteractive() && $s
|
||||
'title' => __('Kopie dieser Folie direkt dahinter anlegen (ohne Antworten)'),
|
||||
'aria-label' => __('Folie „{0}“ duplizieren', $slide->question),
|
||||
]) ?>
|
||||
<?php if ($slide->is_hidden) : ?>
|
||||
<?= $this->Form->postLink(__('Einblenden'), $url('slides:visibility', ['id' => $slide->id]), [
|
||||
'data' => ['hidden' => 0],
|
||||
'class' => 'button button--small',
|
||||
'title' => __('Folie wieder in die Präsentation aufnehmen'),
|
||||
'aria-label' => __('Folie „{0}“ einblenden', $slide->question),
|
||||
]) ?>
|
||||
<?php else : ?>
|
||||
<?= $this->Form->postLink(__('Ausblenden'), $url('slides:visibility', ['id' => $slide->id]), [
|
||||
'data' => ['hidden' => 1],
|
||||
'class' => 'button button--small',
|
||||
'title' => __('Folie behalten, aber beim Präsentieren überspringen'),
|
||||
'aria-label' => __('Folie „{0}“ ausblenden', $slide->question),
|
||||
'confirm' => $isCurrent ? __('Diese Folie ist gerade live. Ausblenden und die Umfrage pausieren?') : null,
|
||||
]) ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($count > 0) : ?>
|
||||
<?= $this->Form->postLink(__('Zurücksetzen'), $url('slides:reset', ['id' => $slide->id]), [
|
||||
'class' => 'button button--small',
|
||||
|
||||
Reference in new issue
Block a user