summaryrefslogtreecommitdiff
path: root/includes/navigation.inc
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2023-02-23 14:20:13 +0100
committerMinteck <contact@minteck.org>2023-02-23 14:20:13 +0100
commit8cc1f13c17fa2fb5a4410542d39e650e02945634 (patch)
treee3f668e635253310b97fb379d71318dc96d1dd2d /includes/navigation.inc
parent6563d542af0930ebb6b2f9b71f2b7538d7467665 (diff)
downloadpluralconnect-8cc1f13c17fa2fb5a4410542d39e650e02945634.tar.gz
pluralconnect-8cc1f13c17fa2fb5a4410542d39e650e02945634.tar.bz2
pluralconnect-8cc1f13c17fa2fb5a4410542d39e650e02945634.zip
Updated 27 files, added assets/uploads/pt-twilightsparkle.png and deleted 3 files (automated)
Diffstat (limited to 'includes/navigation.inc')
-rw-r--r--includes/navigation.inc84
1 files changed, 82 insertions, 2 deletions
diff --git a/includes/navigation.inc b/includes/navigation.inc
index ac40ae6..b888fed 100644
--- a/includes/navigation.inc
+++ b/includes/navigation.inc
@@ -319,6 +319,75 @@ $navigation_cloudburst = [
]
]
];
+$navigation_other = [
+ "admin" => true,
+ "name" => $app["other"]["name"],
+ "icon" => getAsset($app["other"]["id"]),
+ "invert" => false,
+ "items" => [
+ "header" => [
+ "name" => null,
+ "minimal" => false,
+ "items" => [
+ [
+ "name" => $lang["navigation"]["about"],
+ "icon" => "/assets/icons/about.svg",
+ "invert" => true,
+ "link" => "/" . $app["other"]["slug"],
+ "stepped" => null,
+ "private" => false
+ ],
+ [
+ "name" => $pages["s:history"]["name"][$lang["_name"]],
+ "icon" => "/assets/icons/history.svg",
+ "invert" => true,
+ "link" => "/" . $app["other"]["slug"] . "/-/history",
+ "stepped" => null,
+ "private" => false
+ ],
+ [
+ "name" => $pages["s:compare"]["name"][$lang["_name"]],
+ "icon" => "/assets/icons/compare.svg",
+ "invert" => true,
+ "link" => "/" . $app["other"]["slug"] . "/-/compare",
+ "stepped" => null,
+ "private" => false
+ ]
+ ]
+ ],
+ /*"subsystems" => [
+ "name" => $lang["navigation"]["subsystems"],
+ "minimal" => false,
+ "items" => array_map(function ($subsystem) {
+ $ssData = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/subsystems/ynmuc-" . $subsystem['source'] . ".json"), true);
+
+ return [
+ "name" => $ssData['name'] ?? $subsystem['source'],
+ "icon" => "/assets/uploads/ss-$subsystem[source].png",
+ "invert" => false,
+ "link" => "/cloudburst/-/subsystem/$subsystem[source]",
+ "stepped" => null
+ ];
+ }, $cloudburst_subsystemsNotMember)
+ ],*/
+ "members" => [
+ "name" => $lang["navigation"]["members"],
+ "minimal" => false,
+ "items" => array_map(function ($member) {
+ return [
+ "name" => $member['display_name'] ?? $member['name'],
+ "icon" => getAsset($member["system"], $member["id"], "heads"),
+ "invert" => false,
+ "link" => "/$member[name]",
+ "stepped" => null,
+ "private" => false
+ ];
+ }, array_filter(scoreOrder(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/other/members.json"), true), $app["other"]["id"]), function ($member) {
+ return $member['name'] !== "unknown" && $member['name'] !== "fusion" && $member['name'] !== "new";
+ }))
+ ]
+ ]
+];
$navigation_raindrops = [
"admin" => false,
"name" => "Raindrops System",
@@ -391,10 +460,19 @@ $navigation_raindrops = [
global $parts;
-if (isset($parts) && isset($parts[0]) && $parts[0] === "cloudburst") {
+if (isset($parts) && isset($parts[0]) && $parts[0] === $app["other"]["slug"]) {
+ $navigation = [
+ "other" => $navigation_other,
+ "cloudburst" => $navigation_cloudburst,
+ "raindrops" => $navigation_raindrops,
+ "admin" => $navigation_admin,
+ "global" => $navigation_global
+ ];
+} elseif (isset($parts) && isset($parts[0]) && $parts[0] === "cloudburst") {
$navigation = [
"cloudburst" => $navigation_cloudburst,
"raindrops" => $navigation_raindrops,
+ "other" => $navigation_other,
"admin" => $navigation_admin,
"global" => $navigation_global
];
@@ -402,6 +480,7 @@ if (isset($parts) && isset($parts[0]) && $parts[0] === "cloudburst") {
$navigation = [
"raindrops" => $navigation_raindrops,
"cloudburst" => $navigation_cloudburst,
+ "other" => $navigation_other,
"admin" => $navigation_admin,
"global" => $navigation_global
];
@@ -410,6 +489,7 @@ if (isset($parts) && isset($parts[0]) && $parts[0] === "cloudburst") {
"admin" => $navigation_admin,
"global" => $navigation_global,
"cloudburst" => $navigation_cloudburst,
- "raindrops" => $navigation_raindrops
+ "raindrops" => $navigation_raindrops,
+ "other" => $navigation_other,
];
} \ No newline at end of file