Merge origin/main into feature/participant-screen-tools
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
30 files changed
+1161
-91
No files matched your search
@@ -213,7 +213,7 @@ $bar = function (float $percent, bool $ok = false): string {
|
||||
<?php if ($r['questions'] === []) : ?>
|
||||
<p class="empty"><?= __('Keine Fragen eingereicht.') ?></p>
|
||||
<?php else : ?>
|
||||
<?php $withUpvotes = $r['maxUpvotes'] > 0; ?>
|
||||
<?php $withUpvotes = $r['maxUpvotes'] > 0 && $r['stage'] !== 'vote'; ?>
|
||||
<table>
|
||||
<thead><tr><th class="num">#</th><th><?= __('Frage') ?></th><?php if ($withUpvotes) : ?><th class="num"><?= __('Upvotes') ?></th><?php endif; ?></tr></thead>
|
||||
<tbody>
|
||||
|
||||
+66
-25
@@ -15,9 +15,9 @@
|
||||
$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 class="admin-head" data-refresh="head" data-live>
|
||||
<div>
|
||||
<p class="eyebrow"><?= __('Verwaltung') ?></p>
|
||||
<h1><?= h($poll->title) ?></h1>
|
||||
@@ -37,7 +37,7 @@ $hasInternal = array_filter($slides, fn($slide) => $slide->isInteractive() && $s
|
||||
<a class="button button--primary" target="_blank" rel="noopener"
|
||||
href="<?= $this->Url->build($url('admin:present')) ?>">▶ <?= __('Präsentieren') ?></a>
|
||||
<?php if ($poll->current_slide_id !== null) : ?>
|
||||
<?= $this->Form->postLink('⏸ ' . __('Pause'), $url('admin:control'), [
|
||||
<?= $this->Form->postButton('⏸ ' . __('Pause'), $url('admin:control'), [
|
||||
'data' => ['action' => 'stop'],
|
||||
'class' => 'button',
|
||||
'title' => __('Keine Folie zeigen – Teilnehmende sehen eine Pause-Seite'),
|
||||
@@ -64,6 +64,7 @@ $hasInternal = array_filter($slides, fn($slide) => $slide->isInteractive() && $s
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div data-refresh="slides" data-live>
|
||||
<?php if (count($slides) > 1) : ?>
|
||||
<p class="muted slide-list__hint" data-sortable-hint hidden><?= __('Tipp: Folien am Griff ⠿ ziehen, um die Reihenfolge zu ändern (oder Griff fokussieren und Pfeiltasten nutzen).') ?></p>
|
||||
<?php endif; ?>
|
||||
@@ -72,7 +73,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 +84,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()) : ?>
|
||||
@@ -108,7 +110,7 @@ $hasInternal = array_filter($slides, fn($slide) => $slide->isInteractive() && $s
|
||||
<?php if ($slide->isPrivate()) : ?><span class="badge" title="<?= __('In der Präsentation zunächst verborgen, für Teilnehmende nie sichtbar') ?>">🔒 <?= $slide->type === 'scale' ? __('intern') : __('anonym') ?></span><?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<a class="slide-item__title" href="<?= $this->Url->build($url('slides:edit', ['id' => $slide->id])) ?>"><?= h($slide->question) ?></a>
|
||||
<a class="slide-item__title" data-modal href="<?= $this->Url->build($url('slides:edit', ['id' => $slide->id])) ?>"><?= h($slide->question) ?></a>
|
||||
<?php if ($slide->type === 'choice' && $slide->slide_options) : ?>
|
||||
<p class="slide-item__options muted"><?= h(implode(' · ', array_map(fn($o) => $o->label, $slide->slide_options))) ?></p>
|
||||
<?php elseif ($slide->isQuiz() && $slide->slide_options) : ?>
|
||||
@@ -133,37 +135,67 @@ $hasInternal = array_filter($slides, fn($slide) => $slide->isInteractive() && $s
|
||||
</details>
|
||||
</div>
|
||||
<div class="slide-item__actions">
|
||||
<?php if (!$isCurrent) : ?>
|
||||
<?= $this->Form->postLink(__('Live'), $url('admin:control'), [
|
||||
<?php if (!$isCurrent && !$slide->is_hidden) : ?>
|
||||
<?= $this->Form->postButton('▶', $url('admin:control'), [
|
||||
'data' => ['action' => 'goto', 'slide_id' => $slide->id],
|
||||
'class' => 'button button--small',
|
||||
'title' => __('Diese Folie jetzt den Teilnehmenden zeigen'),
|
||||
'class' => 'button button--small button--icon',
|
||||
'title' => __('Live: diese Folie jetzt den Teilnehmenden zeigen'),
|
||||
'aria-label' => __('Folie „{0}“ live schalten', $slide->question),
|
||||
]) ?>
|
||||
<?php endif; ?>
|
||||
<?php if (($slide->type === 'open' || $slide->isPrivate() || $slide->hasComments()) && $count > 0) : ?>
|
||||
<a class="button button--small" href="<?= $this->Url->build($url('slides:answers', ['id' => $slide->id])) ?>"><?= $slide->type === 'scale' ? __('Auswertung') : __('Antworten') ?></a>
|
||||
<?php if (($slide->type === 'open' || $slide->isPrivate() || $slide->hasComments()) && $count > 0) :
|
||||
$answersLabel = $slide->type === 'scale' ? __('Auswertung') : __('Antworten'); ?>
|
||||
<a class="button button--small button--icon" href="<?= $this->Url->build($url('slides:answers', ['id' => $slide->id])) ?>"
|
||||
title="<?= h($answersLabel) ?>" aria-label="<?= h(__('{0} der Folie „{1}“ ansehen', $answersLabel, $slide->question)) ?>">📊</a>
|
||||
<?php endif; ?>
|
||||
<a class="button button--small button--icon" data-modal href="<?= $this->Url->build($url('slides:edit', ['id' => $slide->id])) ?>"
|
||||
title="<?= __('Bearbeiten') ?>" aria-label="<?= h(__('Folie „{0}“ bearbeiten', $slide->question)) ?>">✎</a>
|
||||
<?= $this->Form->postButton('⧉', $url('slides:duplicate', ['id' => $slide->id]), [
|
||||
'class' => 'button button--small button--icon',
|
||||
'title' => __('Duplizieren: Kopie direkt dahinter anlegen (ohne Antworten)'),
|
||||
'aria-label' => __('Folie „{0}“ duplizieren', $slide->question),
|
||||
]) ?>
|
||||
<?php if ($slide->is_hidden) : ?>
|
||||
<?= $this->Form->postButton('👁', $url('slides:visibility', ['id' => $slide->id]), [
|
||||
'data' => ['hidden' => 0],
|
||||
'class' => 'button button--small button--icon',
|
||||
'title' => __('Einblenden: Folie wieder in die Präsentation aufnehmen'),
|
||||
'aria-label' => __('Folie „{0}“ einblenden', $slide->question),
|
||||
]) ?>
|
||||
<?php else : ?>
|
||||
<?= $this->Form->postButton('⊘', $url('slides:visibility', ['id' => $slide->id]), [
|
||||
'data' => ['hidden' => 1],
|
||||
'class' => 'button button--small button--icon',
|
||||
'title' => __('Ausblenden: Folie behalten, aber beim Präsentieren überspringen'),
|
||||
'aria-label' => __('Folie „{0}“ ausblenden', $slide->question),
|
||||
'data-confirm' => $isCurrent ? __('Diese Folie ist gerade live. Ausblenden und die Umfrage pausieren?') : null,
|
||||
]) ?>
|
||||
<?php endif; ?>
|
||||
<a class="button button--small" href="<?= $this->Url->build($url('slides:edit', ['id' => $slide->id])) ?>"><?= __('Bearbeiten') ?></a>
|
||||
<?php if ($count > 0) : ?>
|
||||
<?= $this->Form->postLink(__('Zurücksetzen'), $url('slides:reset', ['id' => $slide->id]), [
|
||||
'class' => 'button button--small',
|
||||
'confirm' => __('Alle {0} Antworten dieser Folie löschen?', $count),
|
||||
<?= $this->Form->postButton('↺', $url('slides:reset', ['id' => $slide->id]), [
|
||||
'class' => 'button button--small button--icon',
|
||||
'title' => __('Zurücksetzen: alle Antworten dieser Folie löschen'),
|
||||
'aria-label' => __('Antworten der Folie „{0}“ zurücksetzen', $slide->question),
|
||||
'data-confirm' => __('Alle {0} Antworten dieser Folie löschen?', $count),
|
||||
]) ?>
|
||||
<?php endif; ?>
|
||||
<?= $this->Form->postLink(__('Löschen'), $url('slides:delete', ['id' => $slide->id]), [
|
||||
'class' => 'button button--small button--danger',
|
||||
'confirm' => __('Folie „{0}“ inkl. aller Antworten löschen?', $slide->question),
|
||||
<?= $this->Form->postButton('🗑', $url('slides:delete', ['id' => $slide->id]), [
|
||||
'class' => 'button button--small button--icon button--danger',
|
||||
'title' => __('Löschen'),
|
||||
'aria-label' => __('Folie „{0}“ löschen', $slide->question),
|
||||
'data-confirm' => __('Folie „{0}“ inkl. aller Antworten löschen?', $slide->question),
|
||||
]) ?>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ol>
|
||||
<p class="sr-only" role="status" aria-live="polite" data-sortable-status></p>
|
||||
</div>
|
||||
|
||||
<h3><?= __('Neue Folie') ?></h3>
|
||||
<div class="type-picker">
|
||||
<?php foreach ($typeLabels as $type => $label) : ?>
|
||||
<a class="type-card type-card--<?= h($type) ?>" href="<?= $this->Url->build($url('slides:add', ['?' => ['type' => $type]])) ?>">
|
||||
<a class="type-card type-card--<?= h($type) ?>" data-modal href="<?= $this->Url->build($url('slides:add', ['?' => ['type' => $type]])) ?>">
|
||||
<strong><?= h($label) ?></strong>
|
||||
<span><?= h($typeDescriptions[$type]) ?></span>
|
||||
</a>
|
||||
@@ -214,9 +246,9 @@ $hasInternal = array_filter($slides, fn($slide) => $slide->isInteractive() && $s
|
||||
<p class="hint"><?= __('Jede Folie hat einen eigenen Einbett-Link (unter „Einbett-Link“ in der Folienliste). Füge ihn z. B. in Canva als Einbettung auf einer Folie ein.') ?></p>
|
||||
<p class="hint"><?= __('Sobald die eingebettete Folie im Vortrag zu sehen ist, wird sie live geschaltet. Bei allen anderen Folien sehen Teilnehmende eine Pause-Seite.') ?></p>
|
||||
<p class="hint"><?= __('Der Link zeigt nur diese Folie und kann sie live schalten – die Umfrage bearbeiten kann damit niemand.') ?></p>
|
||||
<?= $this->Form->postLink(__('Neue Einbett-Links erzeugen'), $url('admin:rotate-embed'), [
|
||||
<?= $this->Form->postButton(__('Neue Einbett-Links erzeugen'), $url('admin:rotate-embed'), [
|
||||
'class' => 'button button--small',
|
||||
'confirm' => __('Neue Einbett-Links erzeugen? Alle bisher eingebetteten Folien funktionieren danach nicht mehr.'),
|
||||
'data-confirm' => __('Neue Einbett-Links erzeugen? Alle bisher eingebetteten Folien funktionieren danach nicht mehr.'),
|
||||
]) ?>
|
||||
</section>
|
||||
|
||||
@@ -249,18 +281,18 @@ $hasInternal = array_filter($slides, fn($slide) => $slide->isInteractive() && $s
|
||||
<section class="card card--danger">
|
||||
<h2><?= __('Sicherheit') ?></h2>
|
||||
<p class="hint"><?= __('Link versehentlich geteilt? Erzeuge einen neuen – der alte wird sofort ungültig.') ?></p>
|
||||
<?= $this->Form->postLink(__('Neuen Admin-Link erzeugen'), $url('admin:rotate'), [
|
||||
<?= $this->Form->postButton(__('Neuen Admin-Link erzeugen'), $url('admin:rotate'), [
|
||||
'class' => 'button button--small',
|
||||
'confirm' => __('Neuen Admin-Link erzeugen? Der aktuelle Link funktioniert danach nicht mehr.'),
|
||||
'data-confirm' => __('Neuen Admin-Link erzeugen? Der aktuelle Link funktioniert danach nicht mehr.'),
|
||||
]) ?>
|
||||
|
||||
<h3><?= __('Umfrage zurücksetzen') ?></h3>
|
||||
<p class="hint"><?= __('Löscht alle Antworten aller Folien, z. B. für eine neue Gruppe. Folien und Einstellungen bleiben erhalten.') ?></p>
|
||||
<?php if ($responseCounts !== []) : ?>
|
||||
<p class="hint"><?= $this->Html->link(__('Ergebnisse vorher als PDF sichern'), '#export') ?></p>
|
||||
<?= $this->Form->postLink(__('Alle Antworten löschen'), $url('admin:reset'), [
|
||||
<?= $this->Form->postButton(__('Alle Antworten löschen'), $url('admin:reset'), [
|
||||
'class' => 'button button--small button--danger',
|
||||
'confirm' => __('Alle Antworten aller Folien unwiderruflich löschen?'),
|
||||
'data-confirm' => __('Alle Antworten aller Folien unwiderruflich löschen?'),
|
||||
]) ?>
|
||||
<?php else : ?>
|
||||
<p class="hint"><em><?= __('Noch nichts zurückzusetzen: Es gibt keine Antworten.') ?></em></p>
|
||||
@@ -278,3 +310,12 @@ $hasInternal = array_filter($slides, fn($slide) => $slide->isInteractive() && $s
|
||||
</section>
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
<?php // Slide form in a dialog (loaded via fetch, see [data-modal] in plenario.js); without JS the links open the full page. ?>
|
||||
<dialog class="modal" data-modal-dialog aria-labelledby="modal-title">
|
||||
<button type="button" class="modal__close" data-modal-close
|
||||
aria-label="<?= h(__('Schließen')) ?>" title="<?= h(__('Schließen (Esc)')) ?>">✕</button>
|
||||
<div class="modal__panel" data-modal-panel>
|
||||
<div data-modal-body></div>
|
||||
</div>
|
||||
</dialog>
|
||||
@@ -26,9 +26,9 @@ $optionsError = $slide->getError('options_text');
|
||||
?>
|
||||
<p><a href="<?= $this->Url->build(['_name' => 'admin', 'token' => $adminToken]) ?>">← <?= __('Zurück zu „{0}“', h($poll->title)) ?></a></p>
|
||||
|
||||
<section class="card card--form">
|
||||
<section class="card card--form" data-modal-content>
|
||||
<p class="eyebrow"><?= h($slide->typeLabel()) ?></p>
|
||||
<h1><?= $isNew ? __('Neue Folie') : __('Folie bearbeiten') ?></h1>
|
||||
<h1 id="modal-title"><?= $isNew ? __('Neue Folie') : __('Folie bearbeiten') ?></h1>
|
||||
|
||||
<?= $this->Form->create($slide, ['url' => $formUrl]) ?>
|
||||
<?= $this->Form->hidden('type') ?>
|
||||
@@ -337,7 +337,7 @@ $optionsError = $slide->getError('options_text');
|
||||
|
||||
<div class="form-actions">
|
||||
<?= $this->Form->button($isNew ? __('Folie anlegen') : __('Speichern'), ['class' => 'button button--primary']) ?>
|
||||
<a class="button button--ghost" href="<?= $this->Url->build(['_name' => 'admin', 'token' => $adminToken]) ?>"><?= __('Abbrechen') ?></a>
|
||||
<a class="button button--ghost" data-modal-close href="<?= $this->Url->build(['_name' => 'admin', 'token' => $adminToken]) ?>"><?= __('Abbrechen') ?></a>
|
||||
</div>
|
||||
<?= $this->Form->end() ?>
|
||||
</section>
|
||||
@@ -36,7 +36,7 @@ $title = $this->fetch('title');
|
||||
</div>
|
||||
</header>
|
||||
<main class="container main">
|
||||
<?= $this->Flash->render() ?>
|
||||
<div data-refresh="flash"><?= $this->Flash->render() ?></div>
|
||||
<?= $this->fetch('content') ?>
|
||||
</main>
|
||||
<footer class="site-footer container">
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
/**
|
||||
* Layout for admin fragments (header "X-Fragment"): only the page content and the flash messages,
|
||||
* which plenario.js merges into the open page (see [data-refresh] regions) or shows in the dialog.
|
||||
*
|
||||
* @var \App\View\AppView $this
|
||||
*/
|
||||
?>
|
||||
<div data-refresh="flash"><?= $this->Flash->render() ?></div>
|
||||
<?= $this->fetch('content') ?>
|
||||
Reference in new issue
Block a user