Show the answers page in the modal dialog #98
No files matched your search
+1
-1
@@ -13,7 +13,7 @@ Dashboard-Fragmente, Farbschema, Textformatierung, Vollbild. CSP-Regeln stehen i
|
|||||||
und das Folienformular im `<dialog>` laufen per `fetch` mit Header `X-Fragment`; `AdminAppController::beforeRender()` nimmt dann
|
und das Folienformular im `<dialog>` laufen per `fetch` mit Header `X-Fragment`; `AdminAppController::beforeRender()` nimmt dann
|
||||||
das Layout `fragment` (nur Inhalt + Flash). Die Server-Aktionen bleiben normale POST + Redirect, das JS tauscht die Bereiche
|
das Layout `fragment` (nur Inhalt + Flash). Die Server-Aktionen bleiben normale POST + Redirect, das JS tauscht die Bereiche
|
||||||
`[data-refresh="head|slides|flash"]` (als DOM-Knoten, nie `innerHTML`) und stellt den Fokus wieder her. Bearbeiten/Anlegen:
|
`[data-refresh="head|slides|flash"]` (als DOM-Knoten, nie `innerHTML`) und stellt den Fokus wieder her. Bearbeiten/Anlegen:
|
||||||
Links mit `data-modal` laden das Formular (`[data-modal-content]`) in den Dialog; Validierungsfehler kommen als Formular
|
Links mit `data-modal` laden das Formular (`[data-modal-content]`) in den Dialog (ebenso die Antworten-/Auswertungsseite `slides:answers`); Validierungsfehler kommen als Formular
|
||||||
zurück (Dialog bleibt offen), Erfolg als Dashboard-Fragment (Dialog schließt). Ohne JS funktioniert alles als normale Seite.
|
zurück (Dialog bleibt offen), Erfolg als Dashboard-Fragment (Dialog schließt). Ohne JS funktioniert alles als normale Seite.
|
||||||
Die Liste folgt auch dem Presenter (Live-Markierung, Status): `initAdminDashboard()` pollt `admin:live` (`AdminController::live()`,
|
Die Liste folgt auch dem Presenter (Live-Markierung, Status): `initAdminDashboard()` pollt `admin:live` (`AdminController::live()`,
|
||||||
nur `{version}` aus `PollStateService::dashboardVersion()`, billiger als der Presenter-State) und lädt `head`/`slides` nur bei geänderter Version
|
nur `{version}` aus `PollStateService::dashboardVersion()`, billiger als der Presenter-State) und lädt `head`/`slides` nur bei geänderter Version
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ $hasInternal = array_filter($slides, fn($slide) => !$slide->is_hidden && $slide-
|
|||||||
'choice' => __('Kommentare'),
|
'choice' => __('Kommentare'),
|
||||||
default => __('Antworten'),
|
default => __('Antworten'),
|
||||||
}; ?>
|
}; ?>
|
||||||
<a class="button button--small button--icon" href="<?= $this->Url->build($url('slides:answers', ['id' => $slide->id])) ?>"
|
<a class="button button--small button--icon" data-modal 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>
|
title="<?= h($answersLabel) ?>" aria-label="<?= h(__('{0} der Folie „{1}“ ansehen', $answersLabel, $slide->question)) ?>">📊</a>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<a class="button button--small button--icon" data-modal href="<?= $this->Url->build($url('slides:edit', ['id' => $slide->id])) ?>"
|
<a class="button button--small button--icon" data-modal href="<?= $this->Url->build($url('slides:edit', ['id' => $slide->id])) ?>"
|
||||||
|
|||||||
@@ -24,12 +24,12 @@ $count = match (true) {
|
|||||||
?>
|
?>
|
||||||
<p><a href="<?= $this->Url->build(['_name' => 'admin', 'token' => $adminToken]) ?>">← <?= __('Zurück zur Verwaltung') ?></a></p>
|
<p><a href="<?= $this->Url->build(['_name' => 'admin', 'token' => $adminToken]) ?>">← <?= __('Zurück zur Verwaltung') ?></a></p>
|
||||||
|
|
||||||
<section class="card">
|
<section class="card" data-modal-content>
|
||||||
<p class="eyebrow">
|
<p class="eyebrow">
|
||||||
<?= h($slide->typeLabel()) ?>
|
<?= h($slide->typeLabel()) ?>
|
||||||
<?php if ($slide->isPrivate()) : ?>· 🔒 <?= $scale !== null ? __('Internes Feedback') : __('Anonymes Feedback') ?><?php endif; ?>
|
<?php if ($slide->isPrivate()) : ?>· 🔒 <?= $scale !== null ? __('Internes Feedback') : __('Anonymes Feedback') ?><?php endif; ?>
|
||||||
</p>
|
</p>
|
||||||
<h1><?= h($slide->question) ?></h1>
|
<h1 id="modal-title"><?= h($slide->question) ?></h1>
|
||||||
<?php if ($scale !== null) : ?>
|
<?php if ($scale !== null) : ?>
|
||||||
<p class="muted"><?= __n('{0} Bewertung', '{0} Bewertungen', $count, $count) ?></p>
|
<p class="muted"><?= __n('{0} Bewertung', '{0} Bewertungen', $count, $count) ?></p>
|
||||||
<?php elseif ($isChoice) : ?>
|
<?php elseif ($isChoice) : ?>
|
||||||
|
|||||||
Reference in new issue
Block a user