Make the admin sidebar cards collapsible
Participation and settings are open by default, the rest is closed. Anchor links like #export open their card. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
74b69f3c9a
commit
2c0b8d2216
4 files changed
+69
-38
No files matched your search
+38
-38
@@ -225,18 +225,44 @@ $hasInternal = array_filter($slides, fn($slide) => !$slide->is_hidden && $slide-
|
||||
</section>
|
||||
|
||||
<aside class="sidebar">
|
||||
<section class="card">
|
||||
<h2><?= __('Teilnahme') ?></h2>
|
||||
<details class="card collapsible" open>
|
||||
<summary><h2><?= __('Teilnahme') ?></h2></summary>
|
||||
<p class="join-code"><?= h($poll->formattedJoinCode()) ?></p>
|
||||
<img class="qr" src="<?= $this->Url->build($url('admin:qr')) ?>" alt="<?= __('QR-Code zur Teilnahme') ?>" width="160" height="160">
|
||||
<div class="copy-field">
|
||||
<input type="text" readonly value="<?= h($joinUrl) ?>" aria-label="<?= __('Teilnahme-Link') ?>" data-copy-source>
|
||||
<button type="button" class="button button--small" data-copy><?= __('Kopieren') ?></button>
|
||||
</div>
|
||||
</section>
|
||||
</details>
|
||||
|
||||
<section class="card" id="export">
|
||||
<h2><?= __('Ergebnisse als PDF') ?></h2>
|
||||
<details class="card collapsible" open>
|
||||
<summary><h2><?= __('Einstellungen') ?></h2></summary>
|
||||
<?= $this->Form->create($poll, ['url' => $url('admin:settings'), 'type' => 'post']) ?>
|
||||
<?= $this->Form->control('title', ['label' => __('Titel'), 'maxlength' => 200]) ?>
|
||||
<?= $this->Form->control('is_active', [
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Umfrage ist aktiv (Teilnehmende können abstimmen)'),
|
||||
]) ?>
|
||||
<?= $this->Form->control('comment_speed', [
|
||||
'type' => 'select',
|
||||
'label' => __('Tempo der Kommentare in der Präsentation'),
|
||||
'options' => [
|
||||
50 => __('Viel langsamer (doppelt so lange)'),
|
||||
75 => __('Langsamer'),
|
||||
100 => __('Normal'),
|
||||
125 => __('Schneller'),
|
||||
150 => __('Deutlich schneller'),
|
||||
200 => __('Sehr schnell (halb so lange)'),
|
||||
],
|
||||
'aria-describedby' => 'comment-speed-hint',
|
||||
]) ?>
|
||||
<p class="hint" id="comment-speed-hint"><?= __('Gilt für die Kommentare von Skala-Folien, die nacheinander durchlaufen. Die Anzeigedauer richtet sich weiter nach der Textlänge und wird mit diesem Faktor verkürzt oder verlängert.') ?></p>
|
||||
<?= $this->Form->button(__('Speichern'), ['class' => 'button']) ?>
|
||||
<?= $this->Form->end() ?>
|
||||
</details>
|
||||
|
||||
<details class="card collapsible" id="export">
|
||||
<summary><h2><?= __('Ergebnisse als PDF') ?></h2></summary>
|
||||
<p class="hint"><?= __('Alle Folien mit Abstimmung und ihre Ergebnisse in einem Dokument, z. B. fürs Protokoll.') ?></p>
|
||||
<?= $this->Form->create(null, ['url' => $url('admin:export'), 'type' => 'get']) ?>
|
||||
<?php if ($hasInternal) : ?>
|
||||
@@ -260,10 +286,10 @@ $hasInternal = array_filter($slides, fn($slide) => !$slide->is_hidden && $slide-
|
||||
<?php endif; ?>
|
||||
<?= $this->Form->button(__('PDF herunterladen'), ['class' => 'button']) ?>
|
||||
<?= $this->Form->end() ?>
|
||||
</section>
|
||||
</details>
|
||||
|
||||
<section class="card" id="embed">
|
||||
<h2><?= __('In Präsentation einbetten') ?></h2>
|
||||
<details class="card collapsible" id="embed">
|
||||
<summary><h2><?= __('In Präsentation einbetten') ?></h2></summary>
|
||||
<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>
|
||||
@@ -271,36 +297,10 @@ $hasInternal = array_filter($slides, fn($slide) => !$slide->is_hidden && $slide-
|
||||
'class' => 'button button--small',
|
||||
'data-confirm' => __('Neue Einbett-Links erzeugen? Alle bisher eingebetteten Folien funktionieren danach nicht mehr.'),
|
||||
]) ?>
|
||||
</section>
|
||||
</details>
|
||||
|
||||
<section class="card">
|
||||
<h2><?= __('Einstellungen') ?></h2>
|
||||
<?= $this->Form->create($poll, ['url' => $url('admin:settings'), 'type' => 'post']) ?>
|
||||
<?= $this->Form->control('title', ['label' => __('Titel'), 'maxlength' => 200]) ?>
|
||||
<?= $this->Form->control('is_active', [
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Umfrage ist aktiv (Teilnehmende können abstimmen)'),
|
||||
]) ?>
|
||||
<?= $this->Form->control('comment_speed', [
|
||||
'type' => 'select',
|
||||
'label' => __('Tempo der Kommentare in der Präsentation'),
|
||||
'options' => [
|
||||
50 => __('Viel langsamer (doppelt so lange)'),
|
||||
75 => __('Langsamer'),
|
||||
100 => __('Normal'),
|
||||
125 => __('Schneller'),
|
||||
150 => __('Deutlich schneller'),
|
||||
200 => __('Sehr schnell (halb so lange)'),
|
||||
],
|
||||
'aria-describedby' => 'comment-speed-hint',
|
||||
]) ?>
|
||||
<p class="hint" id="comment-speed-hint"><?= __('Gilt für die Kommentare von Skala-Folien, die nacheinander durchlaufen. Die Anzeigedauer richtet sich weiter nach der Textlänge und wird mit diesem Faktor verkürzt oder verlängert.') ?></p>
|
||||
<?= $this->Form->button(__('Speichern'), ['class' => 'button']) ?>
|
||||
<?= $this->Form->end() ?>
|
||||
</section>
|
||||
|
||||
<section class="card card--danger">
|
||||
<h2><?= __('Sicherheit') ?></h2>
|
||||
<details class="card card--danger collapsible">
|
||||
<summary><h2><?= __('Sicherheit') ?></h2></summary>
|
||||
<?php if ($poll->expiresAt() !== null) : ?>
|
||||
<p class="hint"><?= __('Diese Umfrage wird am {0} automatisch gelöscht. Sichere die Ergebnisse vorher als PDF.', h($poll->expiresAt()->i18nFormat('dd.MM.yyyy'))) ?></p>
|
||||
<?php endif; ?>
|
||||
@@ -344,7 +344,7 @@ $hasInternal = array_filter($slides, fn($slide) => !$slide->is_hidden && $slide-
|
||||
]) ?>
|
||||
<?= $this->Form->button(__('Endgültig löschen'), ['class' => 'button button--danger']) ?>
|
||||
<?= $this->Form->end() ?>
|
||||
</section>
|
||||
</details>
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in new issue
Block a user