adasd
This commit is contained in:
@@ -71,8 +71,13 @@ Modulspezifische Assets:
|
|||||||
- zuerst Seitenheader-Box
|
- zuerst Seitenheader-Box
|
||||||
- danach Submenü-Box
|
- danach Submenü-Box
|
||||||
- danach Bereichs-Boxen und/oder Karten-Boxen je nach Modul
|
- danach Bereichs-Boxen und/oder Karten-Boxen je nach Modul
|
||||||
|
- Vertikale Abstände zwischen `main-header-box`, `submenu-box` und den ersten Folge-Boxen muessen aus der globalen Shell kommen.
|
||||||
|
- Maßgeblich sind `module-page-bg` und `module-page-stack` in `public/assets/css/app.css`.
|
||||||
|
- Top-Level-Wrapper wie Grids, Kartencontainer oder Modul-Listen duerfen keinen eigenen zusaetzlichen `margin-top` oder Sonder-Gap erzeugen, der den Abstand nach dem Submenue veraendert.
|
||||||
|
- Bei Layout-Reviews ist explizit zu pruefen, ob `Main-Header -> Submenue -> erste Section/Card` optisch denselben Rhythmus hat wie auf Referenzseiten wie dem Boersenchecker.
|
||||||
- `Setup` gehört in Modulen grundsätzlich in die Submenü-Box.
|
- `Setup` gehört in Modulen grundsätzlich in die Submenü-Box.
|
||||||
- In Verwaltungsseiten soll `Nexus Übersicht` als fester Button in den Submenü-Aktionen vorhanden sein.
|
- In Verwaltungsseiten soll `Nexus Übersicht` als fester Button in den Submenü-Aktionen vorhanden sein.
|
||||||
|
- Die Optik der Submenü-Aktionsbuttons kommt ausschließlich aus dem globalen CSS. Module sollen dort keine eigenen Farb- oder Variantenlogiken einschleusen.
|
||||||
- Beispielstruktur:
|
- Beispielstruktur:
|
||||||
- Börsenchecker: Seitenheader-Box, Submenü-Box, Bereichs-Box, Karten-Boxen, Bereichs-Box
|
- Börsenchecker: Seitenheader-Box, Submenü-Box, Bereichs-Box, Karten-Boxen, Bereichs-Box
|
||||||
- FX-Rates: Seitenheader-Box, Submenü-Box, danach Bereichs-Boxen
|
- FX-Rates: Seitenheader-Box, Submenü-Box, danach Bereichs-Boxen
|
||||||
|
|||||||
@@ -30,6 +30,9 @@ Technisch:
|
|||||||
|
|
||||||
- globale Shell und Header in `partials/structure/` und `public/assets/css/app.css`
|
- globale Shell und Header in `partials/structure/` und `public/assets/css/app.css`
|
||||||
- modulbezogene Inhalte und Assets ausschließlich unter `modules/<modul>/`
|
- modulbezogene Inhalte und Assets ausschließlich unter `modules/<modul>/`
|
||||||
|
- vertikale Abstände zwischen `main-header-box`, `submenu-box` und den ersten Folge-Boxen müssen aus der globalen Shell kommen; Top-Level-Grids oder Wrapper dürfen dort keinen zusätzlichen `margin-top` oder Sonderabstand einführen
|
||||||
|
- bei Layout-Checks ist ausdrücklich zu prüfen, ob `Main-Header -> Submenü -> erste Section/Card` denselben Rhythmus hat wie auf Referenzseiten
|
||||||
|
- die Optik von Submenü-Aktionen kommt ausschließlich aus dem globalen CSS; Module sollen dort keine eigenen Farbvarianten definieren
|
||||||
|
|
||||||
|
|
||||||
## Getting started
|
## Getting started
|
||||||
|
|||||||
@@ -74,85 +74,87 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="module-admin-grid">
|
<section class="section-box">
|
||||||
<?php foreach ($modules as $module): ?>
|
<div class="module-admin-grid">
|
||||||
<?php if (empty($module['enabled'])) { continue; } ?>
|
<?php foreach ($modules as $module): ?>
|
||||||
<?php
|
<?php if (empty($module['enabled'])) { continue; } ?>
|
||||||
$auth = is_array($module['auth'] ?? null) ? $module['auth'] : [];
|
<?php
|
||||||
$authRequired = !empty($auth['required']);
|
$auth = is_array($module['auth'] ?? null) ? $module['auth'] : [];
|
||||||
$authUsers = is_array($auth['users'] ?? null) ? array_filter($auth['users']) : [];
|
$authRequired = !empty($auth['required']);
|
||||||
$authGroups = is_array($auth['groups'] ?? null) ? array_filter($auth['groups']) : [];
|
$authUsers = is_array($auth['users'] ?? null) ? array_filter($auth['users']) : [];
|
||||||
$hasSpecificAccess = $authRequired && ($authUsers !== [] || $authGroups !== []);
|
$authGroups = is_array($auth['groups'] ?? null) ? array_filter($auth['groups']) : [];
|
||||||
if ($hasSpecificAccess) {
|
$hasSpecificAccess = $authRequired && ($authUsers !== [] || $authGroups !== []);
|
||||||
$accessParts = [];
|
if ($hasSpecificAccess) {
|
||||||
if ($authGroups !== []) {
|
$accessParts = [];
|
||||||
$accessParts[] = 'Gruppen: ' . implode(', ', $authGroups);
|
if ($authGroups !== []) {
|
||||||
}
|
$accessParts[] = 'Gruppen: ' . implode(', ', $authGroups);
|
||||||
if ($authUsers !== []) {
|
}
|
||||||
$userLabels = array_map(
|
if ($authUsers !== []) {
|
||||||
static fn (string $user): string => $authUserLabels[$user] ?? $user,
|
$userLabels = array_map(
|
||||||
$authUsers
|
static fn (string $user): string => $authUserLabels[$user] ?? $user,
|
||||||
);
|
$authUsers
|
||||||
$accessParts[] = 'Nutzer: ' . implode(', ', $userLabels);
|
);
|
||||||
}
|
$accessParts[] = 'Nutzer: ' . implode(', ', $userLabels);
|
||||||
$accessLabel = implode(' · ', $accessParts);
|
}
|
||||||
$accessClass = ' module-admin-badge--success';
|
$accessLabel = implode(' · ', $accessParts);
|
||||||
} elseif ($authRequired) {
|
$accessClass = ' module-admin-badge--success';
|
||||||
$accessLabel = 'Login erforderlich';
|
} elseif ($authRequired) {
|
||||||
$accessClass = ' module-admin-badge--warning';
|
$accessLabel = 'Login erforderlich';
|
||||||
} else {
|
$accessClass = ' module-admin-badge--warning';
|
||||||
$accessLabel = 'Offen ohne Modulschutz';
|
} else {
|
||||||
$accessClass = ' module-admin-badge--danger';
|
$accessLabel = 'Offen ohne Modulschutz';
|
||||||
}
|
$accessClass = ' module-admin-badge--danger';
|
||||||
$migrationStatus = modules()->migrationStatus($module['name']);
|
}
|
||||||
$pendingMigrations = $migrationStatus['pending'] ?? [];
|
$migrationStatus = modules()->migrationStatus($module['name']);
|
||||||
$changedMigrations = $migrationStatus['changed'] ?? [];
|
$pendingMigrations = $migrationStatus['pending'] ?? [];
|
||||||
$migrationLabel = $pendingMigrations !== []
|
$changedMigrations = $migrationStatus['changed'] ?? [];
|
||||||
? count($pendingMigrations) . ' ausstehend'
|
$migrationLabel = $pendingMigrations !== []
|
||||||
: (($migrationStatus['available'] ?? 0) > 0 ? 'Schema aktuell' : 'Keine Migrationen');
|
? count($pendingMigrations) . ' ausstehend'
|
||||||
?>
|
: (($migrationStatus['available'] ?? 0) > 0 ? 'Schema aktuell' : 'Keine Migrationen');
|
||||||
<article class="card-box module-admin-card">
|
?>
|
||||||
<div class="module-admin-card__head">
|
<article class="card-box module-admin-card">
|
||||||
<div class="module-admin-card__title">
|
<div class="module-admin-card__head">
|
||||||
<h2><?= e($module['title']) ?></h2>
|
<div class="module-admin-card__title">
|
||||||
<p><?= e($module['description'] ?? '') ?></p>
|
<h2><?= e($module['title']) ?></h2>
|
||||||
|
<p><?= e($module['description'] ?? '') ?></p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="module-admin-meta">
|
||||||
<div class="module-admin-meta">
|
<div class="module-admin-meta__item">
|
||||||
<div class="module-admin-meta__item">
|
<span class="module-admin-meta__label">Status</span>
|
||||||
<span class="module-admin-meta__label">Status</span>
|
<strong class="module-admin-badge module-admin-badge--success">Aktiv</strong>
|
||||||
<strong class="module-admin-badge module-admin-badge--success">Aktiv</strong>
|
</div>
|
||||||
|
<div class="module-admin-meta__item">
|
||||||
|
<span class="module-admin-meta__label">Zugriff</span>
|
||||||
|
<strong class="module-admin-badge<?= e($accessClass) ?>"><?= e($accessLabel) ?></strong>
|
||||||
|
</div>
|
||||||
|
<div class="module-admin-meta__item">
|
||||||
|
<span class="module-admin-meta__label">Migrationen</span>
|
||||||
|
<strong class="module-admin-badge<?= $pendingMigrations !== [] ? ' module-admin-badge--accent' : (($migrationStatus['available'] ?? 0) > 0 ? ' module-admin-badge--success' : '') ?>"><?= e($migrationLabel) ?></strong>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="module-admin-meta__item">
|
<?php if ($changedMigrations !== []): ?>
|
||||||
<span class="module-admin-meta__label">Zugriff</span>
|
<div class="module-admin-warning">
|
||||||
<strong class="module-admin-badge<?= e($accessClass) ?>"><?= e($accessLabel) ?></strong>
|
Achtung: <?= e((string)count($changedMigrations)) ?> bereits angewendete Migration(en) wurden verändert.
|
||||||
</div>
|
</div>
|
||||||
<div class="module-admin-meta__item">
|
<?php endif; ?>
|
||||||
<span class="module-admin-meta__label">Migrationen</span>
|
<div class="module-admin-actions">
|
||||||
<strong class="module-admin-badge<?= $pendingMigrations !== [] ? ' module-admin-badge--accent' : (($migrationStatus['available'] ?? 0) > 0 ? ' module-admin-badge--success' : '') ?>"><?= e($migrationLabel) ?></strong>
|
<a class="nav-link" href="/module/<?= e($module['name']) ?>">Öffnen</a>
|
||||||
</div>
|
<a class="nav-link" href="/modules/setup/<?= e($module['name']) ?>">Setup</a>
|
||||||
</div>
|
<a class="nav-link" href="/modules/access/<?= e($module['name']) ?>">Zugriff</a>
|
||||||
<?php if ($changedMigrations !== []): ?>
|
<?php if ($pendingMigrations !== []): ?>
|
||||||
<div class="module-admin-warning">
|
<form method="post" style="margin:0;">
|
||||||
Achtung: <?= e((string)count($changedMigrations)) ?> bereits angewendete Migration(en) wurden verändert.
|
<input type="hidden" name="module" value="<?= e($module['name']) ?>">
|
||||||
</div>
|
<button class="cta-button" name="action" value="migrate">Migrationen anwenden</button>
|
||||||
<?php endif; ?>
|
</form>
|
||||||
<div class="module-admin-actions">
|
<?php endif; ?>
|
||||||
<a class="nav-link" href="/module/<?= e($module['name']) ?>">Öffnen</a>
|
|
||||||
<a class="nav-link" href="/modules/setup/<?= e($module['name']) ?>">Setup</a>
|
|
||||||
<a class="nav-link" href="/modules/access/<?= e($module['name']) ?>">Zugriff</a>
|
|
||||||
<?php if ($pendingMigrations !== []): ?>
|
|
||||||
<form method="post" style="margin:0;">
|
<form method="post" style="margin:0;">
|
||||||
<input type="hidden" name="module" value="<?= e($module['name']) ?>">
|
<input type="hidden" name="module" value="<?= e($module['name']) ?>">
|
||||||
<button class="cta-button" name="action" value="migrate">Migrationen anwenden</button>
|
<button class="cta-button" name="action" value="disable" style="background:var(--panel); color:var(--text);">Deaktivieren</button>
|
||||||
</form>
|
</form>
|
||||||
<?php endif; ?>
|
</div>
|
||||||
<form method="post" style="margin:0;">
|
</article>
|
||||||
<input type="hidden" name="module" value="<?= e($module['name']) ?>">
|
<?php endforeach; ?>
|
||||||
<button class="cta-button" name="action" value="disable" style="background:var(--panel); color:var(--text);">Deaktivieren</button>
|
</div>
|
||||||
</form>
|
</section>
|
||||||
</div>
|
|
||||||
</article>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</div>
|
|
||||||
</div></div></div>
|
</div></div></div>
|
||||||
|
|||||||
@@ -654,7 +654,6 @@ body.has-modal-open {
|
|||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
|
grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
|
||||||
gap: 20px;
|
gap: 20px;
|
||||||
margin-top: 1rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.module-admin-grid--compact {
|
.module-admin-grid--compact {
|
||||||
|
|||||||
Reference in New Issue
Block a user