Gear-Planer Pets: Gattungs-Einsicht steht vor der Pet-Liste, die eine eigene Ueberschrift bekommt

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Maaxxs 2026-10-21 00:43:34 +02:00
parent fd32d03006
commit 0e5e988a62

View file

@ -456,7 +456,7 @@ function gear_render_pets(array $set, array $plan, bool $isOwn): void
<p class="gear-hint text-muted gear-skills-legend">
Jedes Pet, das du auf Stufe 1–<?= $maxLevel ?> bringst, gibt dauerhaft einen Besitz-Effekt – je nach Gattung (Cogni, Fera, Natura,
Varian). Besondere Pets hat man oder nicht, sie zählen immer mit Stufe <?= $maxLevel ?>. Die Gattungs-Einsicht würfelt je Gattung
zusätzliche Werte (unten).
zusätzliche Werte (oben).
</p>
<?php if ($isOwn): ?>
<form method="post" action="/gear_action.php" class="gear-pets-form" data-plan-form>
@ -475,32 +475,6 @@ function gear_render_pets(array $set, array $plan, bool $isOwn): void
}
}
?>
<div class="gear-plan-filter" data-plan-filter="pet" role="group" aria-label="Gattung">
<button type="button" class="gear-tab is-active" data-filter-value="">Alle <span class="gear-tab-count" data-filter-count=""><?= count(array_filter($owned)) ?>/<?= count($data['pets']) ?></span></button>
<?php foreach ($families as $family): ?>
<button type="button" class="gear-tab" data-filter-value="<?= e($family) ?>"><?= e(GEAR_PET_FAMILIES[$family]) ?> <span class="gear-tab-count" data-filter-count="<?= e($family) ?>"><?= $counts[$family][0] ?>/<?= $counts[$family][1] ?></span></button>
<?php endforeach; ?>
</div>
<div class="gear-plan-tools" data-plan-tools hidden>
<input type="search" placeholder="Pet suchen …" aria-label="Pet suchen" data-filter-search>
<?php if ($isOwn): ?>
<button type="button" class="button button-secondary button-small" data-pets-bulk="max">Gezeigte auf Max</button>
<button type="button" class="button button-secondary button-small" data-pets-bulk="0">Gezeigte leeren</button>
<?php endif; ?>
</div>
<div class="gear-pet-grid">
<?php
// Ueber 200 Pets: als kompakte Zeilen (gear_pet_card_html), sonst waere die Seite zur Haelfte Einrueckung
foreach ($data['pets'] as $pet) {
$level = (int) ($owned[$pet['id']] ?? 0);
if ($isOwn || $level > 0) {
echo gear_pet_card_html($pet, $level, $maxLevel, $isOwn), "\n";
}
}
?>
</div>
<?php if (!$isOwn && !$owned): ?><p class="text-muted">Keine Pets geplant.</p><?php endif; ?>
<?php if ($genus): ?>
<h4 class="gear-skills-kind">Gattungs-Einsicht</h4>
<p class="gear-hint text-muted">
@ -557,6 +531,33 @@ function gear_render_pets(array $set, array $plan, bool $isOwn): void
<?php endforeach; ?>
</div>
<?php endif; ?>
<h4 class="gear-skills-kind">Pets</h4>
<div class="gear-plan-filter" data-plan-filter="pet" role="group" aria-label="Gattung">
<button type="button" class="gear-tab is-active" data-filter-value="">Alle <span class="gear-tab-count" data-filter-count=""><?= count(array_filter($owned)) ?>/<?= count($data['pets']) ?></span></button>
<?php foreach ($families as $family): ?>
<button type="button" class="gear-tab" data-filter-value="<?= e($family) ?>"><?= e(GEAR_PET_FAMILIES[$family]) ?> <span class="gear-tab-count" data-filter-count="<?= e($family) ?>"><?= $counts[$family][0] ?>/<?= $counts[$family][1] ?></span></button>
<?php endforeach; ?>
</div>
<div class="gear-plan-tools" data-plan-tools hidden>
<input type="search" placeholder="Pet suchen …" aria-label="Pet suchen" data-filter-search>
<?php if ($isOwn): ?>
<button type="button" class="button button-secondary button-small" data-pets-bulk="max">Gezeigte auf Max</button>
<button type="button" class="button button-secondary button-small" data-pets-bulk="0">Gezeigte leeren</button>
<?php endif; ?>
</div>
<div class="gear-pet-grid">
<?php
// Ueber 200 Pets: als kompakte Zeilen (gear_pet_card_html), sonst waere die Seite zur Haelfte Einrueckung
foreach ($data['pets'] as $pet) {
$level = (int) ($owned[$pet['id']] ?? 0);
if ($isOwn || $level > 0) {
echo gear_pet_card_html($pet, $level, $maxLevel, $isOwn), "\n";
}
}
?>
</div>
<?php if (!$isOwn && !$owned): ?><p class="text-muted">Keine Pets geplant.</p><?php endif; ?>
<?php if ($isOwn): ?><?= gear_plan_submit_html() ?><?php endif; ?>
</div>
<aside class="gear-plan-summary" data-plan-fragment="pets-summary"><?= $fragments['pets-summary'] ?></aside>