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>
This commit is contained in:
commit
eb319f8c1e
120 files changed
+15572
No files matched your search
@@ -0,0 +1,163 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin dashboard of a poll.
|
||||
*
|
||||
* @var \App\View\AppView $this
|
||||
* @var \App\Model\Entity\Poll $poll
|
||||
* @var string $adminToken
|
||||
* @var list<\App\Model\Entity\Slide> $slides
|
||||
* @var array<int, int> $responseCounts
|
||||
* @var array<string, string> $typeLabels
|
||||
* @var array<string, string> $typeDescriptions
|
||||
* @var string $joinUrl
|
||||
*/
|
||||
$this->assign('title', $poll->title);
|
||||
$this->assign('noindex', '1');
|
||||
$url = fn(string $name, array $params = []) => ['_name' => $name, 'token' => $adminToken] + $params;
|
||||
?>
|
||||
<div class="admin-head">
|
||||
<div>
|
||||
<p class="eyebrow"><?= __('Verwaltung') ?></p>
|
||||
<h1><?= h($poll->title) ?></h1>
|
||||
<p class="muted">
|
||||
<?php if ($poll->is_active) : ?>
|
||||
<span class="badge badge--ok"><?= __('aktiv') ?></span>
|
||||
<?php else : ?>
|
||||
<span class="badge badge--off"><?= __('geschlossen') ?></span>
|
||||
<?php endif; ?>
|
||||
<?= __('{0} Folien', count($slides)) ?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="admin-head__actions">
|
||||
<a class="button button--primary" target="_blank" rel="noopener"
|
||||
href="<?= $this->Url->build($url('admin:present')) ?>">▶ <?= __('Präsentieren') ?></a>
|
||||
<a class="button" href="<?= $this->Url->build($url('admin:export')) ?>"><?= __('CSV-Export') ?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="notice">
|
||||
<strong><?= __('Bookmark diese Seite!') ?></strong>
|
||||
<?= __('Diese URL ist dein Zugang zur Umfrage. Wer sie kennt, kann alles bearbeiten.') ?>
|
||||
</div>
|
||||
|
||||
<div class="grid grid--sidebar">
|
||||
<section>
|
||||
<div class="section-head">
|
||||
<h2><?= __('Folien') ?></h2>
|
||||
</div>
|
||||
|
||||
<?php if ($slides === []) : ?>
|
||||
<div class="empty">
|
||||
<p><?= __('Noch keine Folien. Wähle unten einen Typ, um die erste Frage anzulegen.') ?></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<ol class="slide-list">
|
||||
<?php foreach ($slides as $i => $slide) :
|
||||
$isCurrent = $poll->current_slide_id === $slide->id;
|
||||
$count = $responseCounts[$slide->id] ?? 0;
|
||||
?>
|
||||
<li class="slide-item<?= $isCurrent ? ' slide-item--current' : '' ?>">
|
||||
<div class="slide-item__pos"><?= $i + 1 ?></div>
|
||||
<div class="slide-item__body">
|
||||
<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->isInteractive()) : ?>
|
||||
<span class="muted"><?= __n('{0} Antwort', '{0} Antworten', $count, $count) ?></span>
|
||||
<?php if (!$slide->is_voting_open) : ?><span class="muted">· <?= __('Abstimmung geschlossen') ?></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>
|
||||
<?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 endif; ?>
|
||||
</div>
|
||||
<div class="slide-item__actions">
|
||||
<?php if (!$isCurrent) : ?>
|
||||
<?= $this->Form->postLink(__('Live'), $url('admin:control'), [
|
||||
'data' => ['action' => 'goto', 'slide_id' => $slide->id],
|
||||
'class' => 'button button--small',
|
||||
'title' => __('Diese Folie jetzt den Teilnehmenden zeigen'),
|
||||
]) ?>
|
||||
<?php endif; ?>
|
||||
<a class="button button--small" href="<?= $this->Url->build($url('slides:edit', ['id' => $slide->id])) ?>"><?= __('Bearbeiten') ?></a>
|
||||
<?= $this->Form->postLink('↑', $url('slides:move', ['id' => $slide->id, 'direction' => 'up']), [
|
||||
'class' => 'button button--small button--icon', 'title' => __('Nach oben'),
|
||||
]) ?>
|
||||
<?= $this->Form->postLink('↓', $url('slides:move', ['id' => $slide->id, 'direction' => 'down']), [
|
||||
'class' => 'button button--small button--icon', 'title' => __('Nach unten'),
|
||||
]) ?>
|
||||
<?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),
|
||||
]) ?>
|
||||
<?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),
|
||||
]) ?>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ol>
|
||||
|
||||
<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]])) ?>">
|
||||
<strong><?= h($label) ?></strong>
|
||||
<span><?= h($typeDescriptions[$type]) ?></span>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<aside class="sidebar">
|
||||
<section class="card">
|
||||
<h2><?= __('Teilnahme') ?></h2>
|
||||
<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>
|
||||
|
||||
<section class="card">
|
||||
<h2><?= __('Einstellungen') ?></h2>
|
||||
<?= $this->Form->create($poll, ['url' => $url('admin:settings')]) ?>
|
||||
<?= $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('show_results_to_participants', [
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Teilnehmende sehen Ergebnisse nach ihrer Antwort'),
|
||||
]) ?>
|
||||
<?= $this->Form->button(__('Speichern'), ['class' => 'button']) ?>
|
||||
<?= $this->Form->end() ?>
|
||||
</section>
|
||||
|
||||
<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'), [
|
||||
'class' => 'button button--small',
|
||||
'confirm' => __('Neuen Admin-Link erzeugen? Der aktuelle Link funktioniert danach nicht mehr.'),
|
||||
]) ?>
|
||||
|
||||
<h3><?= __('Umfrage löschen') ?></h3>
|
||||
<?= $this->Form->create(null, ['url' => $url('admin:delete')]) ?>
|
||||
<?= $this->Form->control('confirm_code', [
|
||||
'label' => __('Zum Bestätigen Code {0} eingeben', $poll->join_code),
|
||||
'autocomplete' => 'off',
|
||||
'required' => true,
|
||||
]) ?>
|
||||
<?= $this->Form->button(__('Endgültig löschen'), ['class' => 'button button--danger']) ?>
|
||||
<?= $this->Form->end() ?>
|
||||
</section>
|
||||
</aside>
|
||||
</div>
|
||||
@@ -0,0 +1,56 @@
|
||||
<?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>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string $message
|
||||
* @var string $url
|
||||
*/
|
||||
use Cake\Core\Configure;
|
||||
|
||||
$this->setLayout('error');
|
||||
|
||||
if (Configure::read('debug')) :
|
||||
$this->setLayout('dev_error');
|
||||
|
||||
$this->assign('title', $message);
|
||||
$this->assign('templateName', 'error400.php');
|
||||
|
||||
$this->start('file');
|
||||
echo $this->element('auto_table_warning');
|
||||
$this->end();
|
||||
endif;
|
||||
$this->assign('title', __('Nicht gefunden'));
|
||||
?>
|
||||
<h1><?= __('Nicht gefunden') ?></h1>
|
||||
<p class="lead"><?= h($message) ?></p>
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var \Cake\Database\StatementInterface $error
|
||||
* @var string $message
|
||||
* @var string $url
|
||||
*/
|
||||
use Cake\Core\Configure;
|
||||
use Cake\Error\Debugger;
|
||||
|
||||
$this->setLayout('error');
|
||||
|
||||
if (Configure::read('debug')) :
|
||||
$this->setLayout('dev_error');
|
||||
|
||||
$this->assign('title', $message);
|
||||
$this->assign('templateName', 'error500.php');
|
||||
|
||||
$this->start('file');
|
||||
if (!empty($error->queryString)) : ?>
|
||||
<p class="notice"><strong>SQL Query: </strong><?= h($error->queryString) ?></p>
|
||||
<?php endif;
|
||||
if (!empty($error->params)) : ?>
|
||||
<strong>SQL Query Params: </strong>
|
||||
<?php Debugger::dump($error->params) ?>
|
||||
<?php endif;
|
||||
if ($error instanceof Error) :
|
||||
$file = $error->getFile();
|
||||
$line = $error->getLine(); ?>
|
||||
<strong>Error in: </strong>
|
||||
<?= $this->Html->link(sprintf('%s, line %s', Debugger::trimPath($file), $line), Debugger::editorUrl($file, $line)); ?>
|
||||
<?php endif;
|
||||
echo $this->element('auto_table_warning');
|
||||
$this->end();
|
||||
endif;
|
||||
$this->assign('title', __('Fehler'));
|
||||
?>
|
||||
<h1><?= __('Da ist etwas schiefgelaufen') ?></h1>
|
||||
<p class="lead"><?= __('Bitte versuche es in einem Moment noch einmal.') ?></p>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* Confirmation after creating a poll.
|
||||
*
|
||||
* @var \App\View\AppView $this
|
||||
* @var array{email: string, title: string, mailSent: bool, adminUrl: string|null} $created
|
||||
*/
|
||||
$this->assign('title', __('Umfrage erstellt'));
|
||||
$this->assign('noindex', '1');
|
||||
?>
|
||||
<section class="card card--narrow center">
|
||||
<div class="icon-circle" aria-hidden="true">✉</div>
|
||||
<h1><?= __('Fast geschafft!') ?></h1>
|
||||
<?php if ($created['mailSent']) : ?>
|
||||
<p class="lead"><?= __('Wir haben den Admin-Link für „{0}“ an <strong>{1}</strong> geschickt.', h($created['title']), h($created['email'])) ?></p>
|
||||
<p><?= __('Öffne die E-Mail und klicke auf den Link, um Fragen anzulegen. Schau ggf. auch im Spam-Ordner nach.') ?></p>
|
||||
<?php else : ?>
|
||||
<p class="lead"><?= __('Die Umfrage wurde angelegt, aber die E-Mail an {0} konnte nicht verschickt werden.', h($created['email'])) ?></p>
|
||||
<p><?= __('Versuche es später über „Admin-Link verloren?“ erneut.') ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($created['adminUrl'])) : ?>
|
||||
<div class="devnote">
|
||||
<strong><?= __('Entwicklungsmodus') ?></strong>
|
||||
<p><?= __('Admin-Link direkt (nur sichtbar, weil showAdminLinkAfterCreate aktiv ist):') ?></p>
|
||||
<a class="button button--primary" href="<?= h($created['adminUrl']) ?>"><?= __('Zur Verwaltung') ?></a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
* Start page: create a poll (e-mail, no login) or join one by code.
|
||||
*
|
||||
* @var \App\View\AppView $this
|
||||
* @var \App\Model\Entity\Poll $poll
|
||||
* @var array<string, mixed> $captcha
|
||||
*/
|
||||
$this->assign('title', __('Live-Umfragen ohne Login'));
|
||||
?>
|
||||
<section class="hero">
|
||||
<h1><?= __('Live-Umfragen für Vorträge, Workshops und Meetings') ?></h1>
|
||||
<p class="lead"><?= __('Fragen anlegen, Code zeigen, Ergebnisse live sehen. Ohne Konto – der Verwaltungslink kommt per E-Mail.') ?></p>
|
||||
</section>
|
||||
|
||||
<div class="grid grid--2">
|
||||
<section class="card">
|
||||
<h2><?= __('Neue Umfrage erstellen') ?></h2>
|
||||
<?= $this->Form->create($poll, ['url' => ['_name' => 'create'], 'novalidate' => false]) ?>
|
||||
<?= $this->Form->control('title', [
|
||||
'label' => __('Titel'),
|
||||
'placeholder' => __('z. B. Team-Retro Oktober'),
|
||||
'maxlength' => 200,
|
||||
'required' => true,
|
||||
]) ?>
|
||||
<?= $this->Form->control('email', [
|
||||
'label' => __('Deine E-Mail-Adresse'),
|
||||
'type' => 'email',
|
||||
'placeholder' => 'name@example.org',
|
||||
'required' => true,
|
||||
'autocomplete' => 'email',
|
||||
]) ?>
|
||||
<?= $this->element('captcha', ['captcha' => $captcha]) ?>
|
||||
<p class="hint"><?= __('Wir schicken dir einen geheimen Admin-Link. Die Adresse wird nur dafür verwendet.') ?></p>
|
||||
<?= $this->Form->button(__('Umfrage erstellen'), ['class' => 'button button--primary']) ?>
|
||||
<?= $this->Form->end() ?>
|
||||
</section>
|
||||
|
||||
<section class="card card--accent">
|
||||
<h2><?= __('An einer Umfrage teilnehmen') ?></h2>
|
||||
<?= $this->Form->create(null, ['url' => ['_name' => 'join'], 'type' => 'get']) ?>
|
||||
<?= $this->Form->control('code', [
|
||||
'label' => __('Teilnahme-Code'),
|
||||
'placeholder' => 'K7P 2QX',
|
||||
'class' => 'input-code',
|
||||
'autocomplete' => 'off',
|
||||
'autocapitalize' => 'characters',
|
||||
'required' => true,
|
||||
]) ?>
|
||||
<?= $this->Form->button(__('Teilnehmen'), ['class' => 'button']) ?>
|
||||
<?= $this->Form->end() ?>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<section class="features">
|
||||
<div><strong><?= __('Multiple Choice') ?></strong><span><?= __('Balkendiagramm in Echtzeit') ?></span></div>
|
||||
<div><strong><?= __('Wortwolke') ?></strong><span><?= __('Begriffe sammeln und gewichten') ?></span></div>
|
||||
<div><strong><?= __('Offene Fragen') ?></strong><span><?= __('Freitext-Antworten live') ?></span></div>
|
||||
<div><strong><?= __('Skala') ?></strong><span><?= __('Bewertungen mit Durchschnitt') ?></span></div>
|
||||
</section>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Join form (/join, /p).
|
||||
*
|
||||
* @var \App\View\AppView $this
|
||||
* @var string $code
|
||||
*/
|
||||
$this->assign('title', __('Teilnehmen'));
|
||||
?>
|
||||
<section class="card card--narrow center">
|
||||
<h1><?= __('Teilnehmen') ?></h1>
|
||||
<p class="lead"><?= __('Gib den Code ein, der in der Präsentation angezeigt wird.') ?></p>
|
||||
<?= $this->Form->create(null, ['url' => ['_name' => 'join'], 'type' => 'get']) ?>
|
||||
<?= $this->Form->control('code', [
|
||||
'label' => ['text' => __('Teilnahme-Code'), 'class' => 'sr-only'],
|
||||
'value' => $code,
|
||||
'placeholder' => 'K7P 2QX',
|
||||
'class' => 'input-code input-code--big',
|
||||
'autocomplete' => 'off',
|
||||
'autocapitalize' => 'characters',
|
||||
'autofocus' => true,
|
||||
'required' => true,
|
||||
]) ?>
|
||||
<?= $this->Form->button(__('Los geht’s'), ['class' => 'button button--primary button--block']) ?>
|
||||
<?= $this->Form->end() ?>
|
||||
</section>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* Re-send admin links.
|
||||
*
|
||||
* @var \App\View\AppView $this
|
||||
* @var array<string, mixed> $captcha
|
||||
*/
|
||||
$this->assign('title', __('Admin-Link verloren?'));
|
||||
?>
|
||||
<section class="card card--narrow">
|
||||
<h1><?= __('Admin-Link verloren?') ?></h1>
|
||||
<p><?= __('Gib die E-Mail-Adresse ein, mit der du deine Umfragen erstellt hast. Wir schicken dir alle zugehörigen Admin-Links erneut zu.') ?></p>
|
||||
<?= $this->Form->create(null, ['url' => ['_name' => 'recover']]) ?>
|
||||
<?= $this->Form->control('email', [
|
||||
'label' => __('E-Mail-Adresse'),
|
||||
'type' => 'email',
|
||||
'required' => true,
|
||||
'autocomplete' => 'email',
|
||||
]) ?>
|
||||
<?= $this->element('captcha', ['captcha' => $captcha]) ?>
|
||||
<?= $this->Form->button(__('Links zuschicken'), ['class' => 'button button--primary']) ?>
|
||||
<?= $this->Form->end() ?>
|
||||
</section>
|
||||
@@ -0,0 +1,130 @@
|
||||
<?php
|
||||
/**
|
||||
* Participant page. Server rendered; webroot/js/plenario.js (Plenario.participant)
|
||||
* polls /p/{code}/state, reloads when the slide changes and updates results live.
|
||||
*
|
||||
* @var \App\View\AppView $this
|
||||
* @var \App\Model\Entity\Poll $poll
|
||||
* @var \App\Model\Entity\Slide|null $slide
|
||||
* @var array<string, mixed> $state
|
||||
* @var int $pollIntervalMs
|
||||
*/
|
||||
$this->assign('title', $poll->title);
|
||||
$this->assign('bodyClass', 'participant');
|
||||
$voteUrl = ['_name' => 'participate:vote', 'code' => $poll->join_code];
|
||||
$words = $state['words'] ?? null;
|
||||
?>
|
||||
<div class="participant-view"
|
||||
data-participant
|
||||
data-state-url="<?= $this->Url->build(['_name' => 'participate:state', 'code' => $poll->join_code]) ?>"
|
||||
data-version="<?= h($state['version']) ?>"
|
||||
data-vote-url="<?= $this->Url->build($voteUrl) ?>"
|
||||
data-interval="<?= (int)$pollIntervalMs ?>">
|
||||
|
||||
<p class="eyebrow center"><?= h($poll->title) ?></p>
|
||||
|
||||
<?php if (!$poll->is_active) : ?>
|
||||
<section class="card center">
|
||||
<h1><?= __('Diese Umfrage ist geschlossen.') ?></h1>
|
||||
<p class="muted"><?= __('Danke fürs Vorbeischauen!') ?></p>
|
||||
</section>
|
||||
|
||||
<?php elseif ($slide === null) : ?>
|
||||
<section class="card center waiting">
|
||||
<div class="pulse" aria-hidden="true"></div>
|
||||
<h1><?= __('Gleich geht’s los …') ?></h1>
|
||||
<p class="muted"><?= __('Warte, bis die erste Frage gestartet wird. Die Seite aktualisiert sich automatisch.') ?></p>
|
||||
</section>
|
||||
|
||||
<?php elseif (!$slide->isInteractive()) : ?>
|
||||
<section class="card">
|
||||
<h1><?= h($slide->question) ?></h1>
|
||||
<?php if ($slide->description) : ?>
|
||||
<div class="prose"><?= nl2br(h($slide->description)) ?></div>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
|
||||
<?php else : ?>
|
||||
<section class="card">
|
||||
<h1 class="question"><?= h($slide->question) ?></h1>
|
||||
<?php if ($slide->description) : ?>
|
||||
<p class="muted"><?= nl2br(h($slide->description)) ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($words !== null && $slide->is_voting_open && !$words['limitReached']) : ?>
|
||||
<?= $this->Form->create(null, ['url' => $voteUrl, 'class' => 'vote-form word-form', 'data-word-form' => true]) ?>
|
||||
<?= $this->Form->hidden('slide_id', ['value' => $slide->id]) ?>
|
||||
<p class="hint" data-words-remaining>
|
||||
<?= $words['remaining'] === null
|
||||
? __('Du kannst beliebig viele Begriffe abgeben.')
|
||||
: __n('Du kannst noch einen Begriff abgeben.', 'Du kannst noch {0} Begriffe abgeben.', $words['remaining'], $words['remaining']) ?>
|
||||
</p>
|
||||
<div class="word-entry">
|
||||
<input type="text" name="word" maxlength="40" class="word-input" required autofocus
|
||||
autocomplete="off" autocapitalize="off" spellcheck="false"
|
||||
placeholder="<?= __('Begriff eingeben …') ?>"
|
||||
role="combobox" aria-autocomplete="list" aria-expanded="false"
|
||||
aria-controls="word-suggestions" data-word-input>
|
||||
<ul class="suggestions" id="word-suggestions" role="listbox" hidden data-suggestions></ul>
|
||||
</div>
|
||||
<p class="word-message" data-word-message aria-live="polite"></p>
|
||||
<?= $this->Form->button(__('Begriff senden'), ['class' => 'button button--primary button--block']) ?>
|
||||
<?= $this->Form->end() ?>
|
||||
<?php elseif ($state['hasResponded']) : ?>
|
||||
<p class="done">✓ <?= __('Deine Antwort ist angekommen.') ?></p>
|
||||
<?php elseif (!$slide->is_voting_open) : ?>
|
||||
<p class="muted"><?= __('Die Abstimmung zu dieser Frage ist geschlossen.') ?></p>
|
||||
<?php else : ?>
|
||||
<?= $this->Form->create(null, ['url' => $voteUrl, 'class' => 'vote-form']) ?>
|
||||
<?= $this->Form->hidden('slide_id', ['value' => $slide->id]) ?>
|
||||
|
||||
<?php if ($slide->type === 'choice') :
|
||||
$multiple = (bool)$slide->setting('multiple'); ?>
|
||||
<?php if ($multiple) : ?><p class="hint"><?= __('Mehrfachauswahl möglich') ?></p><?php endif; ?>
|
||||
<div class="choices">
|
||||
<?php foreach ($slide->slide_options as $option) : ?>
|
||||
<label class="choice">
|
||||
<input type="<?= $multiple ? 'checkbox' : 'radio' ?>"
|
||||
name="<?= $multiple ? 'option_ids[]' : 'option_id' ?>"
|
||||
value="<?= (int)$option->id ?>" <?= $multiple ? '' : 'required' ?>>
|
||||
<span><?= h($option->label) ?></span>
|
||||
</label>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<?php elseif ($slide->type === 'open') : ?>
|
||||
<textarea name="text" rows="4" maxlength="500" required
|
||||
placeholder="<?= __('Deine Antwort …') ?>"></textarea>
|
||||
|
||||
<?php elseif ($slide->type === 'scale') : ?>
|
||||
<div class="scale">
|
||||
<?php for ($v = (int)$slide->setting('scale_min'); $v <= (int)$slide->setting('scale_max'); $v++) : ?>
|
||||
<label class="scale__step">
|
||||
<input type="radio" name="value" value="<?= $v ?>" required>
|
||||
<span><?= $v ?></span>
|
||||
</label>
|
||||
<?php endfor; ?>
|
||||
</div>
|
||||
<div class="scale__labels">
|
||||
<span><?= h((string)$slide->setting('min_label')) ?></span>
|
||||
<span><?= h((string)$slide->setting('max_label')) ?></span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?= $this->Form->button(__('Absenden'), ['class' => 'button button--primary button--block']) ?>
|
||||
<?= $this->Form->end() ?>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
|
||||
<section class="card results-card" data-results-card <?= $state['results'] ? '' : 'hidden' ?>>
|
||||
<h2><?= $words !== null ? __('Wortwolke') : __('Ergebnisse') ?></h2>
|
||||
<?php if ($words !== null && $words['allowUpvotes'] && $slide->is_voting_open && !$words['limitReached']) : ?>
|
||||
<p class="hint" data-upvote-hint><?= $words['allowDownvotes']
|
||||
? __('Tippe auf einen Begriff, um ihn zu unterstützen, oder auf „−“, um ihn abzulehnen.')
|
||||
: __('Tippe auf einen Begriff, um ihn zu unterstützen.') ?></p>
|
||||
<?php endif; ?>
|
||||
<div data-results></div>
|
||||
</section>
|
||||
<script type="application/json" data-initial-state><?= json_encode($state, JSON_HEX_TAG | JSON_HEX_AMP | JSON_UNESCAPED_UNICODE) ?></script>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
@@ -0,0 +1,109 @@
|
||||
<?php
|
||||
/**
|
||||
* Add / edit form for slides. Type specific fields are rendered per type;
|
||||
* the type itself cannot be changed after creation.
|
||||
*
|
||||
* @var \App\View\AppView $this
|
||||
* @var \App\Model\Entity\Poll $poll
|
||||
* @var string $adminToken
|
||||
* @var \App\Model\Entity\Slide $slide
|
||||
* @var string $optionsText
|
||||
* @var bool|null $hasResponses
|
||||
*/
|
||||
$isNew = $slide->isNew();
|
||||
$settings = $slide->getSettings();
|
||||
$this->assign('title', $isNew ? __('Neue Folie') : __('Folie bearbeiten'));
|
||||
$this->assign('noindex', '1');
|
||||
$formUrl = $isNew
|
||||
? ['_name' => 'slides:add', 'token' => $adminToken, '?' => ['type' => $slide->type]]
|
||||
: ['_name' => 'slides:edit', 'token' => $adminToken, 'id' => $slide->id];
|
||||
$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">
|
||||
<p class="eyebrow"><?= h($slide->typeLabel()) ?></p>
|
||||
<h1><?= $isNew ? __('Neue Folie') : __('Folie bearbeiten') ?></h1>
|
||||
|
||||
<?= $this->Form->create($slide, ['url' => $formUrl]) ?>
|
||||
<?= $this->Form->hidden('type') ?>
|
||||
<?= $this->Form->control('question', [
|
||||
'label' => $slide->type === 'content' ? __('Überschrift') : __('Frage'),
|
||||
'maxlength' => 500,
|
||||
'required' => true,
|
||||
'autofocus' => $isNew,
|
||||
]) ?>
|
||||
<?= $this->Form->control('description', [
|
||||
'type' => 'textarea',
|
||||
'rows' => $slide->type === 'content' ? 6 : 2,
|
||||
'label' => $slide->type === 'content' ? __('Text') : __('Beschreibung (optional)'),
|
||||
]) ?>
|
||||
|
||||
<?php if ($slide->type === 'choice') : ?>
|
||||
<div class="input textarea<?= $optionsError ? ' error' : '' ?>">
|
||||
<label for="options-text"><?= __('Antwortoptionen (eine pro Zeile, max. 20)') ?></label>
|
||||
<textarea id="options-text" name="options_text" rows="6" required><?= h($optionsText) ?></textarea>
|
||||
<?php if ($optionsError) : ?>
|
||||
<div class="error-message"><?= h(implode(' ', (array)$optionsError)) ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($hasResponses)) : ?>
|
||||
<p class="hint"><?= __('Achtung: Entfernte oder umbenannte Optionen verlieren ihre bisherigen Stimmen.') ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?= $this->Form->control('settings.multiple', [
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Mehrfachauswahl erlauben'),
|
||||
'checked' => (bool)$settings['multiple'],
|
||||
]) ?>
|
||||
<?php elseif ($slide->type === 'wordcloud') : ?>
|
||||
<?= $this->Form->control('settings.max_words', [
|
||||
'type' => 'number', 'min' => 0, 'max' => 50,
|
||||
'label' => __('Begriffe pro Person (0 = unbegrenzt)'),
|
||||
'value' => $settings['max_words'],
|
||||
]) ?>
|
||||
<p class="hint"><?= __('Upvotes zählen mit: Wer einen vorhandenen Begriff unterstützt oder erneut eingibt, verbraucht einen Begriff.') ?></p>
|
||||
<?= $this->Form->control('settings.allow_upvotes', [
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Upvotes erlauben (Teilnehmende sehen die Wortwolke live und können Begriffe per Klick unterstützen)'),
|
||||
'checked' => (bool)$settings['allow_upvotes'],
|
||||
]) ?>
|
||||
<?= $this->Form->control('settings.allow_downvotes', [
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Downvotes erlauben (nur zusammen mit Upvotes: Teilnehmende können Begriffe anderer ablehnen)'),
|
||||
'checked' => (bool)$settings['allow_downvotes'],
|
||||
]) ?>
|
||||
<?php elseif ($slide->type === 'scale') : ?>
|
||||
<div class="grid grid--2 grid--tight">
|
||||
<?= $this->Form->control('settings.scale_min', [
|
||||
'type' => 'select', 'options' => [0 => '0', 1 => '1'],
|
||||
'label' => __('Von'), 'value' => $settings['scale_min'],
|
||||
]) ?>
|
||||
<?= $this->Form->control('settings.scale_max', [
|
||||
'type' => 'select', 'options' => array_combine(range(2, 10), range(2, 10)),
|
||||
'label' => __('Bis'), 'value' => $settings['scale_max'],
|
||||
]) ?>
|
||||
<?= $this->Form->control('settings.min_label', [
|
||||
'label' => __('Beschriftung links (optional)'), 'maxlength' => 60,
|
||||
'placeholder' => __('z. B. gar nicht'), 'value' => $settings['min_label'],
|
||||
]) ?>
|
||||
<?= $this->Form->control('settings.max_label', [
|
||||
'label' => __('Beschriftung rechts (optional)'), 'maxlength' => 60,
|
||||
'placeholder' => __('z. B. sehr'), 'value' => $settings['max_label'],
|
||||
]) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($slide->isInteractive()) : ?>
|
||||
<?= $this->Form->control('is_voting_open', [
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Abstimmung geöffnet'),
|
||||
'checked' => $isNew ? true : $slide->is_voting_open,
|
||||
]) ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<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>
|
||||
</div>
|
||||
<?= $this->Form->end() ?>
|
||||
</section>
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Renders the configured captcha inside a form.
|
||||
*
|
||||
* @var \App\View\AppView $this
|
||||
* @var array<string, mixed> $captcha Result of CaptchaInterface::challenge()
|
||||
*/
|
||||
$type = $captcha['type'] ?? 'none';
|
||||
?>
|
||||
<?php if ($type === 'math') : ?>
|
||||
<div class="input text">
|
||||
<label for="captcha-answer"><?= __('Sicherheitsfrage: Was ist {0}?', h($captcha['question'])) ?></label>
|
||||
<input type="text" inputmode="numeric" pattern="-?[0-9]*" autocomplete="off" required
|
||||
id="captcha-answer" name="<?= h($captcha['field']) ?>" class="input-short">
|
||||
</div>
|
||||
<?php elseif ($type === 'recaptcha') : ?>
|
||||
<div class="input text">
|
||||
<?php if (empty($captcha['siteKey'])) : ?>
|
||||
<p class="hint hint--error"><?= __('reCAPTCHA ist aktiviert, aber nicht konfiguriert (RECAPTCHA_SITE_KEY fehlt).') ?></p>
|
||||
<?php else : ?>
|
||||
<div class="g-recaptcha" data-sitekey="<?= h($captcha['siteKey']) ?>"></div>
|
||||
<?php $this->Html->script('https://www.google.com/recaptcha/api.js', ['block' => 'script', 'async' => true, 'defer' => true, 'once' => true]) ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var array $params
|
||||
* @var string $message
|
||||
*/
|
||||
$class = 'message';
|
||||
if (!empty($params['class'])) {
|
||||
$class .= ' ' . $params['class'];
|
||||
}
|
||||
if (!isset($params['escape']) || $params['escape'] !== false) {
|
||||
$message = h($message);
|
||||
}
|
||||
?>
|
||||
<div class="<?= h($class) ?>" onclick="this.classList.add('hidden');"><?= $message ?></div>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var array $params
|
||||
* @var string $message
|
||||
*/
|
||||
if (!isset($params['escape']) || $params['escape'] !== false) {
|
||||
$message = h($message);
|
||||
}
|
||||
?>
|
||||
<div class="message error" onclick="this.classList.add('hidden');"><?= $message ?></div>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var array $params
|
||||
* @var string $message
|
||||
*/
|
||||
if (!isset($params['escape']) || $params['escape'] !== false) {
|
||||
$message = h($message);
|
||||
}
|
||||
?>
|
||||
<div class="message" onclick="this.classList.add('hidden');"><?= $message ?></div>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var array $params
|
||||
* @var string $message
|
||||
*/
|
||||
if (!isset($params['escape']) || $params['escape'] !== false) {
|
||||
$message = h($message);
|
||||
}
|
||||
?>
|
||||
<div class="message success" onclick="this.classList.add('hidden')"><?= $message ?></div>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var array $params
|
||||
* @var string $message
|
||||
*/
|
||||
if (!isset($params['escape']) || $params['escape'] !== false) {
|
||||
$message = h($message);
|
||||
}
|
||||
?>
|
||||
<div class="message warning" onclick="this.classList.add('hidden');"><?= $message ?></div>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var \App\Model\Entity\Poll $poll
|
||||
* @var string $adminUrl
|
||||
* @var string $joinUrl
|
||||
*/
|
||||
?>
|
||||
<p><?= __('Hallo,') ?></p>
|
||||
<p><?= __('deine Umfrage <strong>{0}</strong> wurde angelegt. Über den folgenden Link kannst du Fragen anlegen, die Präsentation starten und Ergebnisse ansehen:', h($poll->title)) ?></p>
|
||||
<p style="margin:24px 0;">
|
||||
<a href="<?= h($adminUrl) ?>" style="display:inline-block;background:#4b3fe0;color:#ffffff;text-decoration:none;padding:12px 20px;border-radius:8px;font-weight:600;"><?= __('Umfrage verwalten') ?></a>
|
||||
</p>
|
||||
<p style="font-size:13px;color:#5b5f7a;word-break:break-all;"><?= h($adminUrl) ?></p>
|
||||
<p><strong><?= __('Wichtig:') ?></strong> <?= __('Wer diesen Link kennt, kann die Umfrage bearbeiten. Gib ihn nicht weiter.') ?></p>
|
||||
<p><?= __('Teilnehmende erreichen die Umfrage unter {0} mit dem Code <strong>{1}</strong>.', '<a href="' . h($joinUrl) . '">' . h($joinUrl) . '</a>', h($poll->formattedJoinCode())) ?></p>
|
||||
<p style="font-size:13px;color:#5b5f7a;"><?= __('Du hast diese Umfrage nicht angelegt? Dann kannst du diese E-Mail ignorieren.') ?></p>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 0.10.0
|
||||
* @license https://opensource.org/licenses/mit-license.php MIT License
|
||||
* @var \Cake\View\View $this
|
||||
* @var string $content
|
||||
*/
|
||||
|
||||
$lines = explode("\n", $content);
|
||||
|
||||
foreach ($lines as $line) :
|
||||
echo '<p> ' . $line . "</p>\n";
|
||||
endforeach;
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var list<array{title: string, url: string, created: string}> $links
|
||||
*/
|
||||
?>
|
||||
<p><?= __('Hallo,') ?></p>
|
||||
<p><?= __('du hast deine Admin-Links angefordert. Zu dieser E-Mail-Adresse gehören folgende Umfragen:') ?></p>
|
||||
<ul style="padding-left:18px;">
|
||||
<?php foreach ($links as $link) : ?>
|
||||
<li style="margin-bottom:12px;">
|
||||
<a href="<?= h($link['url']) ?>" style="color:#4b3fe0;font-weight:600;"><?= h($link['title']) ?></a><br>
|
||||
<span style="font-size:13px;color:#5b5f7a;"><?= __('angelegt am {0}', h($link['created'])) ?></span>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<p style="font-size:13px;color:#5b5f7a;"><?= __('Du hast diese E-Mail nicht angefordert? Dann kannst du sie ignorieren – deine Links bleiben unverändert gültig.') ?></p>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var \App\Model\Entity\Poll $poll
|
||||
* @var string $adminUrl
|
||||
* @var string $joinUrl
|
||||
*/
|
||||
?>
|
||||
<?= __('Hallo,') ?>
|
||||
|
||||
|
||||
<?= __('deine Umfrage "{0}" wurde angelegt. Über den folgenden Link kannst du Fragen anlegen, die Präsentation starten und Ergebnisse ansehen:', $poll->title) ?>
|
||||
|
||||
|
||||
<?= $adminUrl ?>
|
||||
|
||||
|
||||
<?= __('Wichtig: Wer diesen Link kennt, kann die Umfrage bearbeiten. Gib ihn nicht weiter.') ?>
|
||||
|
||||
|
||||
<?= __('Teilnehmende erreichen die Umfrage unter {0} mit dem Code {1}.', $joinUrl, $poll->formattedJoinCode()) ?>
|
||||
|
||||
|
||||
<?= __('Du hast diese Umfrage nicht angelegt? Dann kannst du diese E-Mail ignorieren.') ?>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 0.10.0
|
||||
* @license https://opensource.org/licenses/mit-license.php MIT License
|
||||
* @var \Cake\View\View $this
|
||||
* @var string $content
|
||||
*/
|
||||
|
||||
echo $content;
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var list<array{title: string, url: string, created: string}> $links
|
||||
*/
|
||||
?>
|
||||
<?= __('Hallo,') ?>
|
||||
|
||||
|
||||
<?= __('du hast deine Admin-Links angefordert. Zu dieser E-Mail-Adresse gehören folgende Umfragen:') ?>
|
||||
|
||||
|
||||
<?php foreach ($links as $link) : ?>
|
||||
- <?= $link['title'] ?> (<?= __('angelegt am {0}', $link['created']) ?>)
|
||||
<?= $link['url'] ?>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?= __('Du hast diese E-Mail nicht angefordert? Dann kannst du sie ignorieren – deine Links bleiben unverändert gültig.') ?>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 0.10.0
|
||||
* @license https://opensource.org/licenses/mit-license.php MIT License
|
||||
* @var \App\View\AppView $this
|
||||
*/
|
||||
|
||||
echo $this->fetch('content');
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* Default layout for public, participant and admin pages.
|
||||
*
|
||||
* @var \App\View\AppView $this
|
||||
*/
|
||||
$title = $this->fetch('title');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<?= $this->Html->charset() ?>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="csrf-token" content="<?= h((string)$this->request->getAttribute('csrfToken')) ?>">
|
||||
<?php if ($this->fetch('noindex')) : ?>
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<?php endif; ?>
|
||||
<title><?= $title ? h($title) . ' · ' : '' ?>Plenario</title>
|
||||
<?= $this->Html->meta('icon') ?>
|
||||
<?= $this->Html->css(['normalize.min', 'plenario']) ?>
|
||||
<?= $this->fetch('meta') ?>
|
||||
<?= $this->fetch('css') ?>
|
||||
</head>
|
||||
<body class="<?= h($this->fetch('bodyClass')) ?>">
|
||||
<header class="site-header">
|
||||
<div class="container site-header__inner">
|
||||
<a class="brand" href="<?= $this->Url->build(['_name' => 'home']) ?>">
|
||||
<span class="brand__mark" aria-hidden="true"></span>Plenario
|
||||
</a>
|
||||
<nav class="site-nav">
|
||||
<a href="<?= $this->Url->build(['_name' => 'join']) ?>"><?= __('Teilnehmen') ?></a>
|
||||
<a href="<?= $this->Url->build(['_name' => 'recover']) ?>"><?= __('Admin-Link verloren?') ?></a>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
<main class="container main">
|
||||
<?= $this->Flash->render() ?>
|
||||
<?= $this->fetch('content') ?>
|
||||
</main>
|
||||
<footer class="site-footer container">
|
||||
<span>Plenario – <?= __('Live-Umfragen ohne Login') ?></span>
|
||||
</footer>
|
||||
<?= $this->Html->script('plenario') ?>
|
||||
<?= $this->fetch('script') ?>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
*/
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><?= $this->fetch('title') ?></title>
|
||||
</head>
|
||||
<body style="margin:0;padding:24px;background:#f4f5fb;font-family:Segoe UI,Helvetica,Arial,sans-serif;color:#1d1f33;">
|
||||
<div style="max-width:560px;margin:0 auto;background:#ffffff;border-radius:12px;padding:32px;">
|
||||
<p style="margin:0 0 24px;font-size:20px;font-weight:700;color:#4b3fe0;">Plenario</p>
|
||||
<?= $this->fetch('content') ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 0.10.0
|
||||
* @license https://opensource.org/licenses/mit-license.php MIT License
|
||||
* @var \App\View\AppView $this
|
||||
*/
|
||||
|
||||
echo $this->fetch('content');
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* Layout for production error pages (debug = false).
|
||||
*
|
||||
* @var \App\View\AppView $this
|
||||
*/
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<?= $this->Html->charset() ?>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="robots" content="noindex">
|
||||
<title><?= h($this->fetch('title')) ?> · Plenario</title>
|
||||
<?= $this->Html->meta('icon') ?>
|
||||
<?= $this->Html->css(['normalize.min', 'plenario']) ?>
|
||||
</head>
|
||||
<body>
|
||||
<header class="site-header">
|
||||
<div class="container site-header__inner">
|
||||
<a class="brand" href="<?= $this->Url->build('/') ?>"><span class="brand__mark" aria-hidden="true"></span>Plenario</a>
|
||||
</div>
|
||||
</header>
|
||||
<main class="container main">
|
||||
<section class="card card--narrow center">
|
||||
<?= $this->fetch('content') ?>
|
||||
<p><a class="button" href="<?= $this->Url->build('/') ?>"><?= __('Zur Startseite') ?></a></p>
|
||||
</section>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* Full screen presenter layout (dark, no navigation).
|
||||
*
|
||||
* @var \App\View\AppView $this
|
||||
*/
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<?= $this->Html->charset() ?>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<meta name="csrf-token" content="<?= h((string)$this->request->getAttribute('csrfToken')) ?>">
|
||||
<title><?= h($this->fetch('title')) ?> · Plenario</title>
|
||||
<?= $this->Html->meta('icon') ?>
|
||||
<?= $this->Html->css(['normalize.min', 'plenario']) ?>
|
||||
</head>
|
||||
<body class="present">
|
||||
<?= $this->fetch('content') ?>
|
||||
<?= $this->Html->script('plenario') ?>
|
||||
<?= $this->fetch('script') ?>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user