feat(#190 Phase 10.3): Vote-Mehrheits-Bar im Antrag-Detail

Stacked Bar (Ja gruen / Enth grau / Nein rot) zeigt die Fraktions-
Mehrheit pro Plenum-Vote. Caveat-Tooltip ⓘ stellt klar: Anzahl
Fraktionen, nicht Sitz-/Stimm-Anteile (Plenarprotokoll liefert
keine Sitz-Counts).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dotty Dotter 2026-05-06 17:12:39 +02:00
parent 1dfdb59954
commit f660c89a63

View File

@ -298,6 +298,25 @@
</span>
</div>
{% if v.fraktionen_ja or v.fraktionen_nein or v.fraktionen_enthaltung %}
{# Mehrheits-Bar: Fraktions-Anzahlen pro Lager als Stacked Bar #}
{% set _n_ja = v.fraktionen_ja | length %}
{% set _n_nein = v.fraktionen_nein | length %}
{% set _n_enth = v.fraktionen_enthaltung | length %}
{% set _n_total = _n_ja + _n_nein + _n_enth %}
{% if _n_total > 0 %}
<div style="margin:6px 0 10px;">
<div style="display:flex;height:10px;border-radius:3px;overflow:hidden;border:1px solid var(--hairline);"
title="Fraktions-Mehrheit: {{ _n_ja }} Ja · {{ _n_nein }} Nein · {{ _n_enth }} Enth. (kein Sitz-/Stimm-Anteil)">
{% if _n_ja %}<div style="width:{{ (100 * _n_ja / _n_total) }}%;background:#2da44e;"></div>{% endif %}
{% if _n_enth %}<div style="width:{{ (100 * _n_enth / _n_total) }}%;background:#6e7781;"></div>{% endif %}
{% if _n_nein %}<div style="width:{{ (100 * _n_nein / _n_total) }}%;background:#cf222e;"></div>{% endif %}
</div>
<div style="font-family:var(--font-mono);font-size:9px;opacity:0.5;margin-top:3px;">
{{ _n_ja }}/{{ _n_total }} Fraktionen Ja · {{ _n_nein }} Nein · {{ _n_enth }} Enth.
<span style="opacity:0.7;cursor:help;" title="Mehrheit nach Fraktionsanzahl, nicht nach Sitzen — Plenarprotokoll liefert keine Sitz-/Stimm-Counts."></span>
</div>
</div>
{% endif %}
<div style="display:flex;flex-wrap:wrap;gap:12px;font-family:var(--font-mono);font-size:11px;">
{% if v.fraktionen_ja %}
<div><span style="color:#2da44e;font-weight:700;">Ja:</span>