Show scale results as average next to a donut chart
CI / Deploy / test (push) Successful in 1m8s
CI / Deploy / deploy (push) Skipped

Average and distribution now sit side by side: a big average figure with
its gauge or stars, and the distribution as a donut (CSS conic-gradient,
shades of one colour, legend with percent and count). A single dropdown
setting scale_view (both, average only, chart only) replaces the two
checkboxes; a single part is centred.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Opus 5.5 committed 2026-11-11 13:38:58 +01:00
1 parent bf16ac0d3b
commit b3c80ab79f
8 files changed
+185 -192

No files matched your search

+11 -14
View File
@@ -180,20 +180,17 @@ $optionsError = $slide->getError('options_text');
'placeholder' => __('z. B. sehr'), 'value' => $settings['max_label'],
]) ?>
</div>
<fieldset class="scale-parts">
<legend><?= __('In der Präsentation zeigen') ?></legend>
<?= $this->Form->control('settings.show_average', [
'type' => 'checkbox',
'label' => __('Durchschnitt'),
'checked' => (bool)$settings['show_average'],
]) ?>
<?= $this->Form->control('settings.show_distribution', [
'type' => 'checkbox',
'label' => __('Verteilung der Stimmen'),
'checked' => (bool)$settings['show_distribution'],
]) ?>
<p class="hint"><?= __('Ohne beides zeigt die Präsentation nur die Anzahl der Bewertungen (und ggf. die Kommentare). Die Auswertung in der Verwaltung und der PDF-Export enthalten immer alles.') ?></p>
</fieldset>
<?= $this->Form->control('settings.scale_view', [
'type' => 'select',
'label' => __('In der Präsentation zeigen'),
'options' => [
\App\Model\Entity\Slide::SCALE_VIEW_BOTH => __('Durchschnitt und Verteilung'),
\App\Model\Entity\Slide::SCALE_VIEW_AVERAGE => __('Nur Durchschnitt'),
\App\Model\Entity\Slide::SCALE_VIEW_CHART => __('Nur Verteilung (Diagramm)'),
],
'value' => $settings['scale_view'],
]) ?>
<p class="hint"><?= __('Die Auswertung in der Verwaltung und der PDF-Export enthalten immer beides.') ?></p>
<?= $this->Form->control('settings.comments', [
'type' => 'checkbox',
'label' => __('Kommentarfeld anzeigen (Teilnehmende können ihre Bewertung optional begründen)'),