summaryrefslogtreecommitdiff
path: root/includes/components
diff options
context:
space:
mode:
Diffstat (limited to 'includes/components')
-rw-r--r--includes/components/details.inc13
-rw-r--r--includes/components/planner.inc6
2 files changed, 6 insertions, 13 deletions
diff --git a/includes/components/details.inc b/includes/components/details.inc
index 6a9f241..7b02808 100644
--- a/includes/components/details.inc
+++ b/includes/components/details.inc
@@ -1,5 +1,5 @@
<?php global $isLoggedIn; global $metadata; global $memberData; global $isLowerLoggedIn; global $systemID; global $app; global $lang; global $pages; $pronouns = getMemberPronouns($memberData['pronouns']); ?>
-<div id="member-details" class="<?= (($isLoggedIn || $isLowerLoggedIn) && $systemID !== $app["other"]["id"]) ? 'member-details-loggedIn' : 'member-details-loggedIn2' ?>" style="<?php if (!$isLoggedIn && !$isLowerLoggedIn): ?>grid-template-columns: repeat(4, 1fr);<?php endif; ?> background-color: <?= isset($memberData["color"]) ? '#' . $memberData["color"] . "33" : "transparent" ?>; margin-left: -20px; margin-right: -20px;">
+<div id="member-details" class="<?= (($isLoggedIn || $isLowerLoggedIn) && $systemID !== $app["other"]["id"]) ? 'member-details-loggedIn' : 'member-details-loggedIn2' ?>" style="<?php if (!$isLoggedIn && !$isLowerLoggedIn): ?>grid-template-columns: repeat(3, 1fr);<?php endif; ?> background-color: <?= isset($memberData["color"]) ? '#' . $memberData["color"] . "33" : "transparent" ?>; margin-left: -20px; margin-right: -20px;">
<div>
<b><?= $lang["details"]["food"] ?></b><span class="member-small-separator"><br></span>
<?= match ($metadata["food"]) {
@@ -53,16 +53,7 @@
<?php endif; ?>
<?php endif; ?>
</div>
- <?php if ($systemID !== $app["other"]["id"]): if ($isLoggedIn || $isLowerLoggedIn): ?>
- <div>
- <b><?= $lang["details"]["code"] ?></b><span class="member-small-separator"><br></span>
- <?php if (isset($metadata["code"]) && trim($metadata["code"]) !== ""): ?>
- <code style="color: white;"><?= strtoupper(substr($metadata["code"], 0, 3)) ?></code>
- <?php else: ?>
- -
- <?php endif; ?>
- </div>
- <?php endif; ?>
+ <?php if ($systemID !== $app["other"]["id"]): ?>
<div>
<b>Primary interest:</b><span class="member-small-separator"><br></span>
<?php if (isset($metadata["interest"]) && trim($metadata["interest"]) !== ""): ?>
diff --git a/includes/components/planner.inc b/includes/components/planner.inc
index 9be9cb7..aed4e56 100644
--- a/includes/components/planner.inc
+++ b/includes/components/planner.inc
@@ -520,7 +520,9 @@ function day($display, $diff): void { if ($diff < 0) $disabled = true; else $dis
document.getElementById("associated-results").innerHTML = "";
for (let pony of availablePonies) {
- document.getElementById("associated-results").innerHTML += document.getElementById("list-pony-" + pony).outerHTML;
+ if (document.getElementById("list-pony-" + pony)) {
+ document.getElementById("associated-results").innerHTML += document.getElementById("list-pony-" + pony).outerHTML;
+ }
}
document.getElementById("list").style.display = "none";
@@ -970,7 +972,7 @@ function day($display, $diff): void { if ($diff < 0) $disabled = true; else $dis
document.getElementById("search-results").innerHTML = "";
for (let result of results) {
- document.getElementById("search-results").innerHTML += document.getElementById("list-pony-" + result.id).outerHTML;
+ if (document.getElementById("list-pony-" + result.id)) document.getElementById("search-results").innerHTML += document.getElementById("list-pony-" + result.id).outerHTML;
}
console.log(results);