Files
Plenario/templates/Admin/present.php
T
gnilebeinandClaude Opus 5.5 eb319f8c1e
CI / Deploy / test (push) Successful in 49s
CI / Deploy / deploy (push) Failing after 5s
Add initial Plenario live polling app
CakePHP 5.4 app for live polls: create via email without login, manage
via secret admin link, join via code. Includes slide types (choice,
wordcloud, open, scale, content), presenter mode, CSV export, captcha,
throttling, tests and Gitea CI/deploy workflow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 13:24:29 +01:00

57 lines
2.7 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
/**
* Presenter screen. Rendered empty and filled by webroot/js/plenario.js
* (Plenario.presenter) from /admin/{token}/state.
*
* Keyboard: ←/→ slides, V voting on/off, H hide results, F fullscreen, Q QR code.
*
* @var \App\View\AppView $this
* @var \App\Model\Entity\Poll $poll
* @var string $adminToken
* @var string $joinUrl
* @var string $joinBaseUrl
* @var int $pollIntervalMs
*/
$this->assign('title', $poll->title);
$host = preg_replace('#^https?://#', '', $joinBaseUrl);
?>
<div class="stage"
data-presenter
data-state-url="<?= $this->Url->build(['_name' => 'admin:state', 'token' => $adminToken]) ?>"
data-control-url="<?= $this->Url->build(['_name' => 'admin:control', 'token' => $adminToken]) ?>"
data-interval="<?= (int)$pollIntervalMs ?>">
<header class="stage__top">
<div class="stage__join">
<?= __('Mitmachen auf') ?> <strong><?= h($host) ?></strong>
<?= __('mit Code') ?> <strong class="stage__code"><?= h($poll->formattedJoinCode()) ?></strong>
</div>
<button type="button" class="stage__qr" data-qr-toggle title="<?= __('QR-Code vergrößern (Q)') ?>">
<img src="<?= $this->Url->build(['_name' => 'admin:qr', 'token' => $adminToken]) ?>" alt="<?= __('QR-Code') ?>">
</button>
</header>
<main class="stage__main">
<p class="stage__type" data-type></p>
<h1 class="stage__question" data-question><?= __('Lade …') ?></h1>
<p class="stage__description" data-description></p>
<div class="stage__results" data-results></div>
</main>
<footer class="stage__controls">
<a class="ctrl" href="<?= $this->Url->build(['_name' => 'admin', 'token' => $adminToken]) ?>" title="<?= __('Zur Verwaltung') ?>">✎</a>
<button type="button" class="ctrl" data-action="prev" title="<?= __('Vorherige Folie (←)') ?>">←</button>
<span class="ctrl-counter" data-counter>–</span>
<button type="button" class="ctrl" data-action="next" title="<?= __('Nächste Folie (→)') ?>">→</button>
<button type="button" class="ctrl ctrl--wide" data-action="toggle" data-voting title="<?= __('Abstimmung öffnen/schließen (V)') ?>"></button>
<button type="button" class="ctrl ctrl--wide" data-hide-results title="<?= __('Ergebnisse ein-/ausblenden (H)') ?>"><?= __('Ergebnisse verbergen') ?></button>
<span class="ctrl-counter" data-participants></span>
<button type="button" class="ctrl" data-fullscreen title="<?= __('Vollbild (F)') ?>">⛶</button>
</footer>
<div class="qr-overlay" data-qr-overlay hidden>
<img src="<?= $this->Url->build(['_name' => 'admin:qr', 'token' => $adminToken]) ?>" alt="<?= __('QR-Code') ?>">
<p><?= h($joinUrl) ?></p>
</div>
</div>