Upload via GUI (27 Dateien)
This commit is contained in:
@@ -82,6 +82,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
} else {
|
||||
$error = 'Ungültige Installation.';
|
||||
}
|
||||
} elseif ($action === 'feature' || $action === 'unfeature') {
|
||||
$message = site_set_featured((int) ($_POST['id'] ?? 0), $action === 'feature') ? ($action === 'feature' ? 'Als „Empfohlen“ markiert. DeskHub zeigt es nach der nächsten Katalog-Aktualisierung (spätestens in wenigen Minuten).' : 'Empfehlung entfernt.') : null;
|
||||
$error = $message ? null : 'Eintrag nicht gefunden.';
|
||||
} elseif ($action === 'delete') {
|
||||
$message = site_delete_version((int) ($_POST['id'] ?? 0)) ? 'Version entfernt.' : null;
|
||||
$error = $message ? null : 'Version nicht gefunden.';
|
||||
@@ -148,7 +151,8 @@ site_header('Verwaltung');
|
||||
<?php if (!$items): ?><p class="muted">Noch keine.</p><?php endif; ?>
|
||||
<?php foreach ($items as $it): ?>
|
||||
<table class="admin">
|
||||
<caption><?= site_h($it['name']) ?> <span class="muted small"><?= site_h($it['slug']) ?></span></caption>
|
||||
<caption><?= site_h($it['name']) ?> <span class="muted small"><?= site_h($it['slug']) ?></span> <?= !empty($it['featured']) ? '<span class="ok">★ Empfohlen</span>' : '' ?> <?php if (!empty($it['language']) && is_array($__l = json_decode((string) $it['language'], true))): ?><span class="muted small">🌐 Sprachpaket: <?= site_h((string) $__l['name']) ?> (<?= site_h((string) $__l['code']) ?>)</span><?php endif; ?>
|
||||
<form method="post" style="display:inline"><input type="hidden" name="action" value="<?= !empty($it['featured']) ? 'unfeature' : 'feature' ?>"><input type="hidden" name="csrf" value="<?= site_h(admin_csrf()) ?>"><input type="hidden" name="id" value="<?= (int) $it['id'] ?>"><button type="submit" class="link"><?= !empty($it['featured']) ? 'Empfehlung entfernen' : 'Als Empfehlung markieren' ?></button></form></caption>
|
||||
<?php foreach (site_versions((int) $it['id']) as $v): ?>
|
||||
<tr><td><?= site_h($v['version']) ?></td><td><?= site_h(substr($v['created_at'], 0, 16)) ?></td><td><?= (int) $v['downloads'] ?> Downloads</td>
|
||||
<td><?= $v['signature'] !== '' ? '<span class="ok">signiert</span>' : '<span class="warn">nicht signiert</span>' ?></td>
|
||||
|
||||
Reference in New Issue
Block a user