summaryrefslogtreecommitdiff
path: root/admin
diff options
context:
space:
mode:
authorRaindropsSys <contact@minteck.org>2023-05-22 19:49:39 +0200
committerRaindropsSys <contact@minteck.org>2023-05-22 19:49:39 +0200
commite1745b20f663de215c9c7e2e15532da0d04d9d1a (patch)
treebf9353741159c05a459cb44ce7660d8a34db6731 /admin
parent8d9ea8fa0c5b6f24880418cd6e78d45a08d5d10a (diff)
downloaddelta-e1745b20f663de215c9c7e2e15532da0d04d9d1a.tar.gz
delta-e1745b20f663de215c9c7e2e15532da0d04d9d1a.tar.bz2
delta-e1745b20f663de215c9c7e2e15532da0d04d9d1a.zip
Updated 4 files (automated)
Diffstat (limited to 'admin')
-rw-r--r--admin/objects/index.php31
1 files changed, 23 insertions, 8 deletions
diff --git a/admin/objects/index.php b/admin/objects/index.php
index efe400b..e910025 100644
--- a/admin/objects/index.php
+++ b/admin/objects/index.php
@@ -54,11 +54,26 @@ foreach (array_filter(scandir($_SERVER["DOCUMENT_ROOT"] . "/includes/data/reques
}
usort($keys, function ($a, $b) {
- return strcmp($a["id"], $b["id"]);
+ return strcmp(getNameFromId($a["id"]), getNameFromId($b["id"]));
})
?>
+<style>
+ .search-result span {
+ white-space: nowrap;
+ overflow: hidden !important;
+ text-overflow: ellipsis;
+ display: inline-block;
+ }
+
+ @media (max-width: 1250px) {
+ .search-result {
+ grid-template-columns: 1fr 2fr 0 !important;
+ }
+ }
+</style>
+
<div class="container">
<br><br>
<a href="/admin">← <?= l("lang_admin_title") ?></a>
@@ -69,14 +84,14 @@ usort($keys, function ($a, $b) {
<div class="list-group" id="all-items">
<?php $entries = []; foreach ($keys as $item): $entries[] = ["id" => $item["id"], "name" => $item["name"] ?? null]; ?>
- <a id="search-result-<?= $item["id"] ?>" class="search-result list-group-item list-group-item-action" href="/admin/edit/?id=<?= $item["id"] ?>">
+ <a id="search-result-<?= $item["id"] ?>" class="search-result list-group-item list-group-item-action" href="/admin/edit/?id=<?= $item["id"] ?>" style="display: grid; grid-template-columns: 1fr 2fr 2fr; grid-gap: 10px;">
<?= match ($item["type"]) {
- "articles" => "<span class='badge bg-success rounded-pill'>" . l("lang_admin_types_articles") . "</span>",
- "gallery" => "<span class='badge bg-success rounded-pill'>" . l("lang_admin_types_gallery") . "</span>",
- "people" => "<span class='badge bg-success rounded-pill'>" . l("lang_admin_types_people") . "</span>",
- "profiles" => "<span class='badge bg-success rounded-pill'>" . l("lang_admin_types_profiles") . "</span>",
- "requests" => "<span class='badge bg-success rounded-pill'>" . l("lang_admin_types_requests") . "</span>",
- } ?> <?= isset($item["name"]) ? $item["name"] . " <span class='text-muted'>($item[id])</span>" : $item["id"] ?>
+ "articles" => "<span style='width: max-content; display: flex; height: max-content; align-self: center;' class='badge bg-success rounded-pill'>" . l("lang_admin_types_articles") . "</span>",
+ "gallery" => "<span style='width: max-content; display: flex; height: max-content; align-self: center;' class='badge bg-success rounded-pill'>" . l("lang_admin_types_gallery") . "</span>",
+ "people" => "<span style='width: max-content; display: flex; height: max-content; align-self: center;' class='badge bg-success rounded-pill'>" . l("lang_admin_types_people") . "</span>",
+ "profiles" => "<span style='width: max-content; display: flex; height: max-content; align-self: center;' class='badge bg-success rounded-pill'>" . l("lang_admin_types_profiles") . "</span>",
+ "requests" => "<span style='width: max-content; display: flex; height: max-content; align-self: center;' class='badge bg-success rounded-pill'>" . l("lang_admin_types_requests") . "</span>",
+ } ?> <?= isset($item["name"]) ? "<span>" . $item["name"] . "</span><span class='text-muted' style='font-family: monospace;'>$item[id]</span>" : "<span style='font-family: monospace;'>" . $item["id"] . "</span>" ?>
</a>
<?php endforeach; ?>
</div>