v1.3.1 - siehe Release Notes
This commit is contained in:
27
backup.php
27
backup.php
@@ -25,8 +25,31 @@ if ($handle = opendir($backup_dir)) {
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
// Sortieren: neueste zuerst
|
||||
usort($files, fn($a, $b) => $b['mtime'] <=> $a['mtime']);
|
||||
|
||||
// 🔸 Sortieren nach Datum im Dateinamen: DoMiLi_Backup_YYYY-MM[_x].pdf
|
||||
usort($files, function ($a, $b) {
|
||||
// Extrahiere YYYY-MM aus dem Dateinamen (ohne .pdf)
|
||||
$nameA = pathinfo($a['name'], PATHINFO_FILENAME);
|
||||
$nameB = pathinfo($b['name'], PATHINFO_FILENAME);
|
||||
|
||||
// Regex: Suche nach 4 Ziffern, Bindestrich, 2 Ziffern
|
||||
$dateA = null;
|
||||
$dateB = null;
|
||||
if (preg_match('/(\d{4}-\d{2})/', $nameA, $matchesA)) {
|
||||
$dateA = $matchesA[1];
|
||||
}
|
||||
if (preg_match('/(\d{4}-\d{2})/', $nameB, $matchesB)) {
|
||||
$dateB = $matchesB[1];
|
||||
}
|
||||
|
||||
// Wenn kein Datum gefunden: ans Ende schieben
|
||||
if ($dateA === null && $dateB === null) return 0;
|
||||
if ($dateA === null) return 1; // A hinter B
|
||||
if ($dateB === null) return -1; // B hinter A
|
||||
|
||||
// Absteigend sortieren: neuestes zuerst → "2025-07" > "2025-02"
|
||||
return $dateB <=> $dateA;
|
||||
});
|
||||
}
|
||||
|
||||
require_once 'inc/header.php';
|
||||
|
||||
BIN
backups/DoMiLi_Backup_2025-07.pdf
Executable file
BIN
backups/DoMiLi_Backup_2025-07.pdf
Executable file
Binary file not shown.
BIN
backups/DoMiLi_Backup_2025-08.pdf
Executable file
BIN
backups/DoMiLi_Backup_2025-08.pdf
Executable file
Binary file not shown.
BIN
backups/DoMiLi_Backup_2025-09.pdf
Executable file
BIN
backups/DoMiLi_Backup_2025-09.pdf
Executable file
Binary file not shown.
59
colors.php
59
colors.php
@@ -1,10 +1,5 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (!isset($_SESSION['user_id'])) {
|
||||
header("Location: login.php");
|
||||
exit();
|
||||
}
|
||||
|
||||
include('inc/check_login.php');
|
||||
require_once 'inc/db.php';
|
||||
|
||||
$is_admin = ($_SESSION['role'] === 'admin');
|
||||
@@ -80,6 +75,18 @@ if ($is_admin && $_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
}
|
||||
}
|
||||
|
||||
// --- Sortierung mit Richtung (asc/desc) ---
|
||||
$sort = $_GET['sort'] ?? 'name';
|
||||
$dir = $_GET['dir'] ?? 'asc';
|
||||
$sort = in_array($sort, ['name', 'usage']) ? $sort : 'name';
|
||||
$dir = in_array($dir, ['asc', 'desc']) ? $dir : 'asc';
|
||||
|
||||
if ($sort === 'usage') {
|
||||
$order_by = "usage_count $dir, c.name ASC";
|
||||
} else {
|
||||
$order_by = "c.name $dir";
|
||||
}
|
||||
|
||||
// --- Farben mit Nutzungszähler laden ---
|
||||
$colors = [];
|
||||
$result = mysqli_query($conn, "
|
||||
@@ -92,7 +99,7 @@ $result = mysqli_query($conn, "
|
||||
FROM colors c
|
||||
LEFT JOIN meetings m ON c.id = m.color_id
|
||||
GROUP BY c.id, c.name, c.hex_code, c.is_special
|
||||
ORDER BY c.name
|
||||
ORDER BY $order_by
|
||||
");
|
||||
while ($row = mysqli_fetch_assoc($result)) {
|
||||
$colors[] = $row;
|
||||
@@ -174,27 +181,49 @@ require_once 'inc/header.php';
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Farbe</th>
|
||||
<th>Anz</th>
|
||||
<th>
|
||||
<?php
|
||||
$name_dir = ($sort === 'name' && $dir === 'asc') ? 'desc' : 'asc';
|
||||
$name_arrow = '';
|
||||
if ($sort === 'name') {
|
||||
$name_arrow = $dir === 'asc' ? 'arrow_upward' : 'arrow_downward';
|
||||
}
|
||||
?>
|
||||
<a href="?sort=name&dir=<?= $name_dir ?>" class="link-secondary text-decoration-none">
|
||||
Name <?php if ($name_arrow): ?><span class="material-symbols-outlined" style="font-size:1em;"><?= $name_arrow ?></span><?php endif; ?>
|
||||
</a>
|
||||
</th>
|
||||
<th>
|
||||
<?php
|
||||
$usage_dir = ($sort === 'usage' && $dir === 'asc') ? 'desc' : 'asc';
|
||||
$usage_arrow = '';
|
||||
if ($sort === 'usage') {
|
||||
$usage_arrow = $dir === 'asc' ? 'arrow_upward' : 'arrow_downward';
|
||||
}
|
||||
?>
|
||||
<a href="?sort=usage&dir=<?= $usage_dir ?>" class="link-secondary text-decoration-none">
|
||||
Anzahl <?php if ($usage_arrow): ?><span class="material-symbols-outlined" style="font-size:1em;"><?= $usage_arrow ?></span><?php endif; ?>
|
||||
</a>
|
||||
</th>
|
||||
<?php if ($is_admin): ?>
|
||||
<th>Aktionen</th>
|
||||
<th></th>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($colors as $color): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<td class="align-middle">
|
||||
<div style="background-color: <?= htmlspecialchars($color['hex_code']); ?>; width: 40px; height: 20px; border: 1px solid #ccc;"></div>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= htmlspecialchars($color['name']); ?>
|
||||
<?php if ($color['is_special']): ?>
|
||||
<span class="badge bg-info ms-1" title="Sonderfarbe – nicht im Zufallsmodus">★</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<div style="background-color: <?= htmlspecialchars($color['hex_code']); ?>; width: 40px; height: 20px; border: 1px solid #ccc;"></div>
|
||||
</td>
|
||||
<td>
|
||||
<td class="align-middle">
|
||||
<?= (int)$color['usage_count']; ?>
|
||||
</td>
|
||||
<?php if ($is_admin): ?>
|
||||
|
||||
18
export.php
18
export.php
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// define('DOMILI_ALLOW_WEB', true); // Zum Testen im Browser einkommentieren
|
||||
//define('DOMILI_ALLOW_WEB', true); // Zum Testen im Browser einkommentieren
|
||||
|
||||
if (php_sapi_name() !== 'cli' && !defined('DOMILI_ALLOW_WEB')) {
|
||||
die('Zugriff verweigert.');
|
||||
@@ -14,11 +14,17 @@ use Dompdf\Options;
|
||||
date_default_timezone_set('Europe/Berlin');
|
||||
|
||||
// === 1. Berichtsmonat ===
|
||||
$berichtsMonatEnde = new DateTime('last day of last month');
|
||||
$berichtsMonatBeginn = new DateTime('first day of last month');
|
||||
$berichtsMonatEnde = new DateTime('last day of last month');
|
||||
$berichtsMonatEnde->setTime(23, 59, 59);
|
||||
|
||||
// Backup für manuelles erzeugen eines PDF in einem anderen Zeitabschnitt
|
||||
//$berichtsMonatBeginn = new DateTime('2025-09-01 00:00:00');
|
||||
//$berichtsMonatEnde = new DateTime('2025-09-30 23:59:59');
|
||||
|
||||
|
||||
// === 2. Letzter Jahresabschluss ===
|
||||
$last_closing = '2020-01-01';
|
||||
$last_closing = '2025-01-01';
|
||||
$res = mysqli_query($conn, "SELECT MAX(closing_date) AS last_date FROM penalty_closings");
|
||||
if ($res && ($row = mysqli_fetch_assoc($res)) && !is_null($row['last_date'])) {
|
||||
$last_closing = $row['last_date'];
|
||||
@@ -33,7 +39,7 @@ while ($row = mysqli_fetch_assoc($resUsers)) {
|
||||
$userIds = array_keys($alleBenutzer);
|
||||
|
||||
// === 4. Alle relevanten Daten (nur completed + attended=1) ===
|
||||
$bisDatum = $berichtsMonatEnde->format('Y-m-d');
|
||||
$bisDatum = $berichtsMonatEnde->format('Y-m-d H:i:s');
|
||||
$stmt = mysqli_prepare($conn, "
|
||||
SELECT m.id AS meeting_id, m.meeting_date,
|
||||
mt.user_id, mt.wore_color, mt.paid, mt.birthday_pay
|
||||
@@ -59,8 +65,8 @@ $stmtMeta = mysqli_prepare($conn, "
|
||||
WHERE meeting_date >= ? AND meeting_date <= ? AND is_completed = 1
|
||||
ORDER BY meeting_date
|
||||
");
|
||||
$startDate = $berichtsMonatBeginn->format('Y-m-d');
|
||||
$endDate = $berichtsMonatEnde->format('Y-m-d');
|
||||
$startDate = $berichtsMonatBeginn->format('Y-m-d H:i:s');
|
||||
$endDate = $berichtsMonatEnde->format('Y-m-d H:i:s');
|
||||
mysqli_stmt_bind_param($stmtMeta, 'ss', $startDate, $endDate);
|
||||
mysqli_stmt_execute($stmtMeta);
|
||||
$resultMeta = mysqli_stmt_get_result($stmtMeta);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
// KEIN LEERZEICHEN ODER ZEILENUMBRUCH VOR DIESEM <?php!
|
||||
include('inc/check_login.php');
|
||||
require_once('inc/db.php');
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ function get_weighted_random_color($conn)
|
||||
$color_pool = [];
|
||||
|
||||
foreach ($colors as $color) {
|
||||
$weight = $max_usage - $color['usage'] + 1; // Mindestgewicht = 1
|
||||
$weight = ($max_usage - $color['usage'] + 1) ** 2;
|
||||
for ($i = 0; $i < $weight; $i++) {
|
||||
$color_pool[] = $color['id'];
|
||||
}
|
||||
|
||||
29
profil.php
29
profil.php
@@ -8,7 +8,7 @@ $message_type = '';
|
||||
$user_id = (int)$_SESSION['user_id'];
|
||||
|
||||
// Aktuelle Benutzerdaten laden
|
||||
$stmt_fetch = mysqli_prepare($conn, "SELECT username, email, role, birthday, last_birthday_year FROM users WHERE id = ?");
|
||||
$stmt_fetch = mysqli_prepare($conn, "SELECT username, email, role, birthday FROM users WHERE id = ?");
|
||||
mysqli_stmt_bind_param($stmt_fetch, "i", $user_id);
|
||||
mysqli_stmt_execute($stmt_fetch);
|
||||
$result = mysqli_stmt_get_result($stmt_fetch);
|
||||
@@ -23,7 +23,6 @@ $current_username = $user_data['username'];
|
||||
$current_email = $user_data['email'] ?? '';
|
||||
$current_role = $user_data['role'];
|
||||
$current_birthday = $user_data['birthday'] ?? '';
|
||||
$current_last_bday_year = $user_data['last_birthday_year'];
|
||||
|
||||
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
$new_username = trim($_POST['username'] ?? '');
|
||||
@@ -76,27 +75,13 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
$success = false;
|
||||
}
|
||||
|
||||
// 2. Optional: last_birthday_year aktualisieren
|
||||
if ($success && $update_last_bday_year) {
|
||||
$stmt2 = mysqli_prepare($conn, "UPDATE users SET last_birthday_year = ? WHERE id = ?");
|
||||
if ($stmt2) {
|
||||
mysqli_stmt_bind_param($stmt2, "ii", $new_last_bday_year, $user_id);
|
||||
if (!mysqli_stmt_execute($stmt2)) {
|
||||
$success = false;
|
||||
}
|
||||
mysqli_stmt_close($stmt2);
|
||||
} else {
|
||||
$success = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($success) {
|
||||
mysqli_commit($conn);
|
||||
$_SESSION['username'] = $new_username;
|
||||
$_SESSION['email'] = $new_email;
|
||||
|
||||
// Neu laden
|
||||
$stmt_reload = mysqli_prepare($conn, "SELECT username, email, role, birthday, last_birthday_year FROM users WHERE id = ?");
|
||||
$stmt_reload = mysqli_prepare($conn, "SELECT username, email, role, birthday FROM users WHERE id = ?");
|
||||
mysqli_stmt_bind_param($stmt_reload, "i", $user_id);
|
||||
mysqli_stmt_execute($stmt_reload);
|
||||
$user_data = mysqli_fetch_assoc(mysqli_stmt_get_result($stmt_reload));
|
||||
@@ -106,7 +91,6 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
$current_email = $user_data['email'] ?? '';
|
||||
$current_role = $user_data['role'];
|
||||
$current_birthday = $user_data['birthday'] ?? '';
|
||||
$current_last_bday_year = $user_data['last_birthday_year'];
|
||||
|
||||
$message = "Profil erfolgreich aktualisiert!";
|
||||
$message_type = 'success';
|
||||
@@ -152,15 +136,6 @@ require_once 'inc/header.php';
|
||||
<div class="mb-3">
|
||||
<label for="birthday" class="form-label fw-bold">Geburtstag</label>
|
||||
<input type="date" class="form-control" id="birthday" name="birthday" value="<?= htmlspecialchars($current_birthday ?? '') ?>">
|
||||
<small class="form-text text-muted">
|
||||
<?php if (!empty($current_birthday) && $current_last_bday_year == date('Y')): ?>
|
||||
<span class="text-success">✓ In diesem Jahr bereits als Geburtstagszahler markiert.</span>
|
||||
<?php elseif (!empty($current_birthday)): ?>
|
||||
Geburtstag steht noch an – du kannst als Sonderzahler vorgeschlagen werden.
|
||||
<?php else: ?>
|
||||
Für automatische Sonderzahlung.
|
||||
<?php endif; ?>
|
||||
</small>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="role" class="form-label fw-bold">Rolle</label>
|
||||
|
||||
253
version.php
253
version.php
@@ -287,6 +287,7 @@ foreach ($releases as $rel) {
|
||||
require_once('inc/header.php');
|
||||
?>
|
||||
|
||||
<!-- 🔸 ANGEPASST: Kein row/col-Wrapper – direkter container wie auf anderen Seiten -->
|
||||
<div class="container mt-5 mb-4">
|
||||
<?php if ($message): ?>
|
||||
<div class="alert alert-<?= htmlspecialchars($message_type) ?> alert-dismissible fade show" role="alert">
|
||||
@@ -295,140 +296,136 @@ require_once('inc/header.php');
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-8">
|
||||
<h2 class="mb-4">📋 Versionsübersicht</h2>
|
||||
<h2 class="mb-4">📋 Versionsübersicht</h2>
|
||||
|
||||
<div class="card shadow">
|
||||
<div class="card-header bg-primary-subtle text-secondary d-flex justify-content-between align-items-center">
|
||||
<h4 class="mb-0">Release Notes</h4>
|
||||
<?php if ($is_admin): ?>
|
||||
<a class="btn btn-sm d-flex align-items-center justify-content-center" data-bs-toggle="collapse" href="#releaseFormCollapse" role="button" aria-expanded="false" aria-controls="releaseFormCollapse">Add
|
||||
<span class="material-symbols-outlined">add</span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="card shadow">
|
||||
<div class="card-header bg-primary-subtle text-secondary d-flex justify-content-between align-items-center">
|
||||
<h4 class="mb-0">Release Notes</h4>
|
||||
<?php if ($is_admin): ?>
|
||||
<a class="btn btn-sm d-flex align-items-center justify-content-center" data-bs-toggle="collapse" href="#releaseFormCollapse" role="button" aria-expanded="false" aria-controls="releaseFormCollapse">Add
|
||||
<span class="material-symbols-outlined">add</span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<?php if ($is_admin): ?>
|
||||
<div class="collapse <?= $edit_mode ? 'show' : '' ?>" id="releaseFormCollapse">
|
||||
<div class="card card-body bg-light mb-4">
|
||||
<h5><?= $edit_mode ? 'Version bearbeiten' : 'Neuen Entwurf anlegen'; ?></h5>
|
||||
<form method="POST">
|
||||
<?php if ($edit_mode): ?>
|
||||
<input type="hidden" name="id" value="<?= htmlspecialchars($edit_release['id']); ?>">
|
||||
<?php endif; ?>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Versionsnummer</label>
|
||||
<input type="text" class="form-control" name="version" value="<?= htmlspecialchars($edit_release['version'] ?? ''); ?>" placeholder="z. B. v1.5.0" required>
|
||||
<div class="form-text">Format: v1.4.2</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Veröffentlichungsdatum</label>
|
||||
<input type="date" class="form-control" name="date" value="<?= htmlspecialchars($edit_release['release_date'] ?? date('Y-m-d')); ?>" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Neue Features (ein Punkt pro Zeile)<br>
|
||||
<small class="text-muted">Verwende [b]fett[/b] oder [i]kursiv[/i] für Hervorhebungen.</small>
|
||||
</label>
|
||||
<textarea class="form-control" name="features" rows="4"><?= htmlspecialchars($edit_release['features'] ?? '') ?></textarea>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Verbesserungen (ein Punkt pro Zeile)<br>
|
||||
<small class="text-muted">Verwende [b]fett[/b] oder [i]kursiv[/i] für Hervorhebungen.</small>
|
||||
</label>
|
||||
<textarea class="form-control" name="improvements" rows="4"><?= htmlspecialchars($edit_release['improvements'] ?? '') ?></textarea>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Behobene Fehler (ein Punkt pro Zeile)<br>
|
||||
<small class="text-muted">Verwende [b]fett[/b] oder [i]kursiv[/i] für Hervorhebungen.</small>
|
||||
</label>
|
||||
<textarea class="form-control" name="bugfixes" rows="4"><?= htmlspecialchars($edit_release['bugfixes'] ?? '') ?></textarea>
|
||||
</div>
|
||||
<div class="d-flex gap-2">
|
||||
<button type="submit" class="btn btn-sm btn-outline-<?= $edit_mode ? 'success' : 'primary'; ?>"><?= $edit_mode ? 'Speichern' : 'Entwurf speichern'; ?></button>
|
||||
<a href="version.php" class="btn btn-sm btn-outline-secondary">Abbrechen</a>
|
||||
</div>
|
||||
</form>
|
||||
<?php if ($is_admin): ?>
|
||||
<div class="collapse <?= $edit_mode ? 'show' : '' ?>" id="releaseFormCollapse">
|
||||
<div class="card card-body bg-light mb-4">
|
||||
<h5><?= $edit_mode ? 'Version bearbeiten' : 'Neuen Entwurf anlegen'; ?></h5>
|
||||
<form method="POST">
|
||||
<?php if ($edit_mode): ?>
|
||||
<input type="hidden" name="id" value="<?= htmlspecialchars($edit_release['id']); ?>">
|
||||
<?php endif; ?>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Versionsnummer</label>
|
||||
<input type="text" class="form-control" name="version" value="<?= htmlspecialchars($edit_release['version'] ?? ''); ?>" placeholder="z. B. v1.5.0" required>
|
||||
<div class="form-text">Format: v1.4.2</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Veröffentlichungsdatum</label>
|
||||
<input type="date" class="form-control" name="date" value="<?= htmlspecialchars($edit_release['release_date'] ?? date('Y-m-d')); ?>" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Neue Features (ein Punkt pro Zeile)<br>
|
||||
<small class="text-muted">Verwende [b]fett[/b] oder [i]kursiv[/i] für Hervorhebungen.</small>
|
||||
</label>
|
||||
<textarea class="form-control" name="features" rows="4"><?= htmlspecialchars($edit_release['features'] ?? '') ?></textarea>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Verbesserungen (ein Punkt pro Zeile)<br>
|
||||
<small class="text-muted">Verwende [b]fett[/b] oder [i]kursiv[/i] für Hervorhebungen.</small>
|
||||
</label>
|
||||
<textarea class="form-control" name="improvements" rows="4"><?= htmlspecialchars($edit_release['improvements'] ?? '') ?></textarea>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Behobene Fehler (ein Punkt pro Zeile)<br>
|
||||
<small class="text-muted">Verwende [b]fett[/b] oder [i]kursiv[/i] für Hervorhebungen.</small>
|
||||
</label>
|
||||
<textarea class="form-control" name="bugfixes" rows="4"><?= htmlspecialchars($edit_release['bugfixes'] ?? '') ?></textarea>
|
||||
</div>
|
||||
<div class="d-flex gap-2">
|
||||
<button type="submit" class="btn btn-sm btn-outline-<?= $edit_mode ? 'success' : 'primary'; ?>"><?= $edit_mode ? 'Speichern' : 'Entwurf speichern'; ?></button>
|
||||
<a href="version.php" class="btn btn-sm btn-outline-secondary">Abbrechen</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (empty($releases)): ?>
|
||||
<p class="text-muted">Keine veröffentlichten Release Notes vorhanden.</p>
|
||||
<?php else: ?>
|
||||
<?php foreach ($releases as $release): ?>
|
||||
<div class="d-flex align-items-start">
|
||||
<div class="flex-grow-1">
|
||||
<h5 class="mt-4 mb-1">
|
||||
<?= htmlspecialchars($release['version']) ?>
|
||||
<?php if (($release['is_draft'] ?? 0) == 1): ?>
|
||||
<span class="badge bg-warning text-dark ms-1" style="font-size: 0.65em; font-weight: normal; padding: 0.2em 0.4em;">Entwurf</span>
|
||||
<?php elseif ($release['version'] === $latest_published_version): ?>
|
||||
<span class="badge bg-white text-primary border border-primary ms-1" style="font-size: 0.65em; font-weight: normal; padding: 0.15em 0.3em; position: relative; top: -0.7px;">aktuelle Version</span>
|
||||
<?php endif; ?>
|
||||
</h5>
|
||||
<p class="text-muted small mb-3">Veröffentlicht am: <?= date('d.m.Y', strtotime($release['release_date'])) ?></p>
|
||||
|
||||
<?php if (!empty($release['features_list'])): ?>
|
||||
<p class="small text-success mb-1"><strong>Neue Features:</strong></p>
|
||||
<ul class="mb-3">
|
||||
<?php foreach ($release['features_list'] as $f): ?>
|
||||
<li><?= parse_formatting($f) ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($release['improvements_list'])): ?>
|
||||
<p class="small text-info mb-1"><strong>Verbesserungen:</strong></p>
|
||||
<ul class="mb-3">
|
||||
<?php foreach ($release['improvements_list'] as $i): ?>
|
||||
<li><?= parse_formatting($i) ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($release['bugfixes_list'])): ?>
|
||||
<p class="small text-danger mb-1"><strong>Behobene Fehler:</strong></p>
|
||||
<ul class="mb-3">
|
||||
<?php foreach ($release['bugfixes_list'] as $b): ?>
|
||||
<li><?= parse_formatting($b) ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php if ($is_admin): ?>
|
||||
<div class="dropdown ms-3 mt-4">
|
||||
<a href="#" class="text-secondary" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="material-icons">more_vert</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<?php if (($release['is_draft'] ?? 0) == 1): ?>
|
||||
<li>
|
||||
<a class="dropdown-item d-flex align-items-center text-success" href="version.php?action=publish&id=<?= $release['id'] ?>" onclick="return confirm('Wirklich veröffentlichen?')">
|
||||
<span class="material-icons me-2">check</span> Veröffentlichen
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<li>
|
||||
<a class="dropdown-item d-flex align-items-center" href="version.php?action=edit&id=<?= $release['id'] ?>">
|
||||
<span class="material-icons me-2">mode_edit_outline</span> Bearbeiten
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="dropdown-item d-flex align-items-center text-danger" href="version.php?action=delete&id=<?= $release['id'] ?>" onclick="return confirm('Wirklich löschen?')">
|
||||
<span class="material-icons me-2">delete_outline</span> Löschen
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php if (empty($releases)): ?>
|
||||
<p class="text-muted">Keine veröffentlichten Release Notes vorhanden.</p>
|
||||
<?php else: ?>
|
||||
<?php foreach ($releases as $release): ?>
|
||||
<div class="d-flex align-items-start">
|
||||
<div class="flex-grow-1">
|
||||
<h5 class="mt-4 mb-1">
|
||||
<?= htmlspecialchars($release['version']) ?>
|
||||
<?php if (($release['is_draft'] ?? 0) == 1): ?>
|
||||
<span class="badge bg-warning text-dark ms-1" style="font-size: 0.65em; font-weight: normal; padding: 0.2em 0.4em;">Entwurf</span>
|
||||
<?php elseif ($release['version'] === $latest_published_version): ?>
|
||||
<span class="badge bg-white text-primary border border-primary ms-1" style="font-size: 0.65em; font-weight: normal; padding: 0.15em 0.3em; position: relative; top: -0.7px;">aktuelle Version</span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</h5>
|
||||
<p class="text-muted small mb-3">Veröffentlicht am: <?= date('d.m.Y', strtotime($release['release_date'])) ?></p>
|
||||
|
||||
<?php if (!empty($release['features_list'])): ?>
|
||||
<p class="small text-success mb-1"><strong>Neue Features:</strong></p>
|
||||
<ul class="mb-3">
|
||||
<?php foreach ($release['features_list'] as $f): ?>
|
||||
<li><?= parse_formatting($f) ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($release['improvements_list'])): ?>
|
||||
<p class="small text-info mb-1"><strong>Verbesserungen:</strong></p>
|
||||
<ul class="mb-3">
|
||||
<?php foreach ($release['improvements_list'] as $i): ?>
|
||||
<li><?= parse_formatting($i) ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($release['bugfixes_list'])): ?>
|
||||
<p class="small text-danger mb-1"><strong>Behobene Fehler:</strong></p>
|
||||
<ul class="mb-3">
|
||||
<?php foreach ($release['bugfixes_list'] as $b): ?>
|
||||
<li><?= parse_formatting($b) ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php if ($is_admin): ?>
|
||||
<div class="dropdown ms-3 mt-4">
|
||||
<a href="#" class="text-secondary" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="material-icons">more_vert</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<?php if (($release['is_draft'] ?? 0) == 1): ?>
|
||||
<li>
|
||||
<a class="dropdown-item d-flex align-items-center text-success" href="version.php?action=publish&id=<?= $release['id'] ?>" onclick="return confirm('Wirklich veröffentlichen?')">
|
||||
<span class="material-icons me-2">check</span> Veröffentlichen
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<li>
|
||||
<a class="dropdown-item d-flex align-items-center" href="version.php?action=edit&id=<?= $release['id'] ?>">
|
||||
<span class="material-icons me-2">mode_edit_outline</span> Bearbeiten
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="dropdown-item d-flex align-items-center text-danger" href="version.php?action=delete&id=<?= $release['id'] ?>" onclick="return confirm('Wirklich löschen?')">
|
||||
<span class="material-icons me-2">delete_outline</span> Löschen
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user