Loheide-eu-mitarbeiterplatt.../resources/views/filament/pages/role-view.blade.php
Friederich Loheide b967c16b6d
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Failing after 8m49s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Failing after 8m47s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Failing after 8m40s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Failing after 9m24s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 11m32s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 12m4s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 10m37s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 45s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m12s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 10m41s
Einfache Ansicht für Klienten (0.57.0)
Rollen-Schalter simple_ui: größere Schrift, Leichte Sprache automatisch,
Startseite mit großen Kacheln; Hinweis in „Was sieht wer?“.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-30 16:34:14 +00:00

122 lines
8.2 KiB
PHP
Raw Permalink 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.

<x-filament-panels::page>
<style>
.ih-roles { display: flex; flex-wrap: wrap; gap: .5rem; }
.ih-role { padding: .375rem .75rem; border-radius: 999px; font-size: .875rem; border: 1px solid rgb(229 231 235); background: white; }
.ih-role[aria-pressed="true"] { background: var(--primary-600, #0f4c5c); border-color: transparent; color: white; }
.ih-role small { opacity: .7; }
.ih-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); align-items: start; }
.ih-list { display: grid; gap: .125rem; }
.ih-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-top: 1px solid rgb(243 244 246); font-size: .875rem; }
.ih-row:first-child { border-top: 0; }
.ih-state { font-size: .75rem; font-weight: 600; border-radius: 999px; padding: .125rem .5rem; white-space: nowrap; }
.ih-on { background: rgb(220 252 231); color: rgb(22 101 52); }
.ih-off { background: rgb(243 244 246); color: rgb(107 114 128); }
.ih-muted { color: rgb(107 114 128); font-size: .875rem; }
.ih-switch { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; background: none; border: 0; padding: 0; font: inherit; }
.dark .ih-role { background: rgb(17 24 39); border-color: rgb(55 65 81); }
.dark .ih-row { border-color: rgb(55 65 81); }
.dark .ih-off { background: rgb(31 41 55); color: rgb(156 163 175); }
.dark .ih-on { background: rgb(20 83 45); color: rgb(187 247 208); }
.dark .ih-muted { color: rgb(156 163 175); }
</style>
<x-filament::section heading="Rolle wählen" description="Was sieht eine Person mit dieser Rolle im Portal? Bereiche lassen sich hier direkt ein- und ausblenden.">
<div class="ih-roles">
@foreach ($roles as $item)
<button type="button" class="ih-role" aria-pressed="{{ $role && $role->id === $item->id ? 'true' : 'false' }}" wire:click="selectRole({{ $item->id }})">
{{ $item->name }} <small>· {{ $item->users_count }}</small>
</button>
@endforeach
</div>
</x-filament::section>
@if ($role)
@unless ($isAdministration)
<x-filament::section compact>
<p class="ih-muted">Einfache Ansicht (große Schrift, Leichte Sprache, einfache Startseite):
<strong>{{ $role->simple_ui ? 'an' : 'aus' }}</strong> –
<a href="{{ \App\Filament\Resources\Roles\RoleResource::getUrl('edit', ['record' => $role]) }}" style="text-decoration: underline">in der Rolle ändern</a></p>
</x-filament::section>
@endunless
@if ($isAdministration)
<x-filament::section>
<p class="ih-muted">„{{ $role->name }}“ hat Vollzugriff und sieht alles – Bereiche lassen sich für diese Rolle nicht ausblenden.</p>
</x-filament::section>
@else
<x-filament::section :heading="'Portal ansehen als „'.$role->name.'“'" compact>
@if ($preview)
<form method="POST" action="{{ url('/anmelden-als/'.$preview->id) }}" style="display: flex; align-items: center; gap: 1rem; flex-wrap: wrap">
@csrf
<x-filament::button type="submit" icon="heroicon-o-eye">Als {{ $preview->name }} ansehen</x-filament::button>
<span class="ih-muted">Sie sehen das Portal genau so wie diese Person – oben erscheint „Zurück zu meinem Konto“.</span>
</form>
@else
<p class="ih-muted">Niemand mit dieser Rolle, als den Sie das Portal ansehen dürfen. Weisen Sie die Rolle z. B. einem Testkonto zu.</p>
@endif
</x-filament::section>
@endif
<div class="ih-grid">
<x-filament::section heading="Bereiche" :description="$canToggle ? 'Ausgeblendete Bereiche verschwinden ganz: Menüpunkt, Seiten, Kacheln, Suche, Feed und Aufgaben.' : null">
<div class="ih-list">
@foreach ($areas as $area)
<div class="ih-row">
<span>{{ $area['name'] }}</span>
@if ($canToggle)
<button type="button" class="ih-switch" wire:click="toggleArea('{{ $area['slug'] }}')" wire:loading.attr="disabled"
aria-label="{{ $area['name'] }} {{ $area['visible'] ? 'ausblenden' : 'einblenden' }}">
<span class="ih-state {{ $area['visible'] ? 'ih-on' : 'ih-off' }}">{{ $area['visible'] ? 'sichtbar' : 'ausgeblendet' }}</span>
<x-filament::icon :icon="$area['visible'] ? 'heroicon-o-eye-slash' : 'heroicon-o-eye'" style="width: 1.1rem; height: 1.1rem; color: rgb(107 114 128)" />
</button>
@else
<span class="ih-state {{ $area['visible'] ? 'ih-on' : 'ih-off' }}">{{ $area['visible'] ? 'sichtbar' : 'ausgeblendet' }}</span>
@endif
</div>
@endforeach
</div>
</x-filament::section>
<div style="display: grid; gap: 1.5rem">
<x-filament::section heading="Menü">
@if ($menu === null)
<p class="ih-muted">Automatisches Menü – es folgt den sichtbaren Bereichen.</p>
@else
<div class="ih-list">
@foreach ($menu as $item)
<div class="ih-row">
<span>{{ $item['label'] }} @if ($item['restricted'])<span class="ih-muted">· eingeschränkt</span>@endif</span>
<span class="ih-state {{ $item['visible'] ? 'ih-on' : 'ih-off' }}">{{ $item['visible'] ? 'sichtbar' : 'ausgeblendet' }}</span>
</div>
@endforeach
</div>
@endif
<p class="ih-muted" style="margin-top: .75rem"><a href="{{ \App\Filament\Pages\MenuSettings::getUrl() }}" style="text-decoration: underline">Menü bearbeiten</a> – dort je Punkt „Sichtbar für“.</p>
</x-filament::section>
<x-filament::section heading="Schnellzugriffe">
<div class="ih-list">
@forelse ($quickLinks as $link)
<div class="ih-row">
<span>{{ $link['label'] }} @if ($link['restricted'])<span class="ih-muted">· eingeschränkt</span>@endif</span>
<span class="ih-state {{ $link['visible'] ? 'ih-on' : 'ih-off' }}">{{ $link['visible'] ? 'sichtbar' : 'ausgeblendet' }}</span>
</div>
@empty
<p class="ih-muted">Keine Schnellzugriffe angelegt.</p>
@endforelse
</div>
<p class="ih-muted" style="margin-top: .75rem"><a href="{{ \App\Filament\Pages\QuickLinksSettings::getUrl() }}" style="text-decoration: underline">Schnellzugriffe bearbeiten</a> – dort je Eintrag „Sichtbar für“.</p>
</x-filament::section>
<x-filament::section heading="Rechte der Rolle">
@forelse ($grants as $grant)
<x-filament::badge color="gray" style="margin: 0 .375rem .375rem 0; display: inline-flex">{{ $grant['label'] }}@if ($grant['scope']) · {{ $grant['scope'] }}@endif</x-filament::badge>
@empty
<p class="ih-muted">Keine besonderen Rechte – lesen, was für alle freigegeben ist.</p>
@endforelse
<p class="ih-muted" style="margin-top: .75rem"><a href="{{ \App\Filament\Resources\Roles\RoleResource::getUrl('edit', ['record' => $role]) }}" style="text-decoration: underline">Rolle bearbeiten</a></p>
</x-filament::section>
</div>
</div>
@endif
</x-filament-panels::page>