Replace CSV export with PDF export
CI / Deploy / test (push) Successful in 53s
CI / Deploy / deploy (push) Skipped

The results export is now a PDF (Dompdf) with all interactive slides.
By default private slides (anonymous/internal feedback) only show their
number of participants; ?internal=1 creates the complete version incl.
their answers, marked as confidential on every page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Opus 5.5 committed 2026-11-08 19:21:10 +01:00
1 parent 5cd1be1cf8
commit d1facd32a6
21 files changed
+1102 -110

No files matched your search

+29 -1
View File
@@ -15,6 +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()) !== [];
?>
<div class="admin-head">
<div>
@@ -42,7 +43,7 @@ $url = fn(string $name, array $params = []) => ['_name' => $name, 'token' => $ad
'title' => __('Keine Folie zeigen – Teilnehmende sehen eine Pause-Seite'),
]) ?>
<?php endif; ?>
<a class="button" href="<?= $this->Url->build($url('admin:export')) ?>"><?= __('CSV-Export') ?></a>
<a class="button" href="#export"><?= __('PDF-Export') ?></a>
</div>
</div>
@@ -177,6 +178,33 @@ $url = fn(string $name, array $params = []) => ['_name' => $name, 'token' => $ad
</div>
</section>
<section class="card" id="export">
<h2><?= __('Ergebnisse als PDF') ?></h2>
<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) : ?>
<fieldset class="export-choice">
<legend><?= __('Welche Fassung?') ?></legend>
<label>
<input type="radio" name="internal" value="0" checked>
<span>
<strong><?= __('Ohne interne Inhalte') ?></strong>
<span class="hint"><?= __('Zum Weitergeben. Bei anonymem bzw. internem Feedback steht nur, wie viele teilgenommen haben.') ?></span>
</span>
</label>
<label>
<input type="radio" name="internal" value="1">
<span>
<strong><?= __('Vollständig, inkl. interner Inhalte') ?></strong>
<span class="hint"><?= __('Enthält anonyme Antworten und interne Bewertungen samt Kommentaren. Nur für dich, nicht weitergeben.') ?></span>
</span>
</label>
</fieldset>
<?php endif; ?>
<?= $this->Form->button(__('PDF herunterladen'), ['class' => 'button']) ?>
<?= $this->Form->end() ?>
</section>
<section class="card" id="embed">
<h2><?= __('In Präsentation einbetten') ?></h2>
<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>