Gear-Planer Guide: Tasten auch ohne geplante Skills erklaeren - eigener Knopf in "Hotbar & Makro", leerer Kopf nur mit Tasten-Erklaerungen wird zum Hinweis "Erklaere deinen Build"
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d4c8d57251
commit
6c9bf5667a
1 changed files with 14 additions and 6 deletions
|
|
@ -314,7 +314,8 @@ function gear_render_guide_tab(array $set, bool $isOwn, array $slots, array $pla
|
||||||
$guide = gear_guide($set);
|
$guide = gear_guide($set);
|
||||||
$notes = $guide['skills'];
|
$notes = $guide['skills'];
|
||||||
$description = (string) ($set['description'] ?? '');
|
$description = (string) ($set['description'] ?? '');
|
||||||
$hasContent = gear_guide_has_content($set, $guide);
|
// Kopfteil (Tags, Beschreibung, Staerken/Schwaechen) - Skill- und Tasten-Erklaerungen stehen weiter unten
|
||||||
|
$hasIntro = $description !== '' || $guide['difficulty'] !== '' || $guide['tags'] || $guide['strengths'] || $guide['weaknesses'];
|
||||||
$groups = gear_guide_skill_groups($planned, $notes);
|
$groups = gear_guide_skill_groups($planned, $notes);
|
||||||
$setUrl = '/gear.php?set=' . (int) $set['id'];
|
$setUrl = '/gear.php?set=' . (int) $set['id'];
|
||||||
$filled = count(array_filter($slots, static fn (array $row): bool => !empty($row['item'])));
|
$filled = count(array_filter($slots, static fn (array $row): bool => !empty($row['item'])));
|
||||||
|
|
@ -363,7 +364,7 @@ function gear_render_guide_tab(array $set, bool $isOwn, array $slots, array $pla
|
||||||
return $html;
|
return $html;
|
||||||
};
|
};
|
||||||
?>
|
?>
|
||||||
<?php if (!$hasContent): ?>
|
<?php if (!$hasIntro && ($isOwn || !gear_guide_has_content($set, $guide))): ?>
|
||||||
<div class="panel gear-guide-empty">
|
<div class="panel gear-guide-empty">
|
||||||
<?php if ($isOwn): ?>
|
<?php if ($isOwn): ?>
|
||||||
<p><strong>Erkläre deinen Build.</strong> Wofür ist er gedacht, was kann er gut, worauf muss man achten? Schreib eine Beschreibung, Stärken, Schwächen und Tipps – das sehen alle, die das Set ansehen.</p>
|
<p><strong>Erkläre deinen Build.</strong> Wofür ist er gedacht, was kann er gut, worauf muss man achten? Schreib eine Beschreibung, Stärken, Schwächen und Tipps – das sehen alle, die das Set ansehen.</p>
|
||||||
|
|
@ -372,7 +373,7 @@ function gear_render_guide_tab(array $set, bool $isOwn, array $slots, array $pla
|
||||||
<p class="text-muted">Zu diesem Build gibt es noch keine Erklärung – unten siehst du, was geplant ist.</p>
|
<p class="text-muted">Zu diesem Build gibt es noch keine Erklärung – unten siehst du, was geplant ist.</p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
<?php else: ?>
|
<?php elseif ($hasIntro): ?>
|
||||||
<div class="panel gear-guide-intro">
|
<div class="panel gear-guide-intro">
|
||||||
<div class="gear-guide-chips">
|
<div class="gear-guide-chips">
|
||||||
<?php if ($guide['difficulty'] !== ''): ?>
|
<?php if ($guide['difficulty'] !== ''): ?>
|
||||||
|
|
@ -440,10 +441,13 @@ function gear_render_guide_tab(array $set, bool $isOwn, array $slots, array $pla
|
||||||
<div class="gear-guide-section-head">
|
<div class="gear-guide-section-head">
|
||||||
<h3>Hotbar & Makro</h3>
|
<h3>Hotbar & Makro</h3>
|
||||||
<span class="text-muted gear-guide-legend">Preset <?= $preset ?></span>
|
<span class="text-muted gear-guide-legend">Preset <?= $preset ?></span>
|
||||||
|
<?php if ($isOwn): ?>
|
||||||
|
<button type="button" class="button button-secondary button-small" data-modal-open="gear-guide-skills-edit"><?= icon('edit') ?> Tasten erklären</button>
|
||||||
|
<?php endif; ?>
|
||||||
<a href="<?= e($setUrl) ?>&tab=macro&preset=<?= $preset ?>">Makro öffnen →</a>
|
<a href="<?= e($setUrl) ?>&tab=macro&preset=<?= $preset ?>">Makro öffnen →</a>
|
||||||
</div>
|
</div>
|
||||||
<?php if (!$usedKeys && !$entries): ?>
|
<?php if (!$usedKeys && !$entries): ?>
|
||||||
<p class="text-muted">Für Preset <?= $preset ?> ist noch keine Skill-Leiste geplant.</p>
|
<p class="text-muted">Für Preset <?= $preset ?> ist noch keine Skill-Leiste geplant<?= $isOwn ? ' – belege sie im Reiter „Makro“, dann kannst du hier jede Taste erklären' : '' ?>.</p>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?php if ($usedKeys): ?>
|
<?php if ($usedKeys): ?>
|
||||||
<ul class="gear-guide-hotbar">
|
<ul class="gear-guide-hotbar">
|
||||||
|
|
@ -563,8 +567,8 @@ function gear_render_guide_tab(array $set, bool $isOwn, array $slots, array $pla
|
||||||
|
|
||||||
<?= gear_guide_tip_sources(array_map(static fn (array $entry): int => (int) $entry['level'], $planned)) ?>
|
<?= gear_guide_tip_sources(array_map(static fn (array $entry): int => (int) $entry['level'], $planned)) ?>
|
||||||
|
|
||||||
<?php if ($isOwn && $planned): ?>
|
<?php if ($isOwn): ?>
|
||||||
<?php // Skills und Tasten erklaeren: Reihenfolge und Begruendung je Skill, Erklaerung je Taste (#skills-erklaeren) ?>
|
<?php // Skills und Tasten erklaeren (auch ohne geplante Skills - dann nur die Tasten): Reihenfolge und Begruendung je Skill, Erklaerung je Taste (#skills-erklaeren) ?>
|
||||||
<div class="modal-overlay" id="gear-guide-skills-edit" data-hash="skills-erklaeren" hidden>
|
<div class="modal-overlay" id="gear-guide-skills-edit" data-hash="skills-erklaeren" hidden>
|
||||||
<div class="modal modal-wide">
|
<div class="modal modal-wide">
|
||||||
<button type="button" class="modal-close icon-button" title="Schließen"><?= icon('x') ?></button>
|
<button type="button" class="modal-close icon-button" title="Schließen"><?= icon('x') ?></button>
|
||||||
|
|
@ -573,6 +577,7 @@ function gear_render_guide_tab(array $set, bool $isOwn, array $slots, array $pla
|
||||||
<?= csrf_field() ?>
|
<?= csrf_field() ?>
|
||||||
<input type="hidden" name="action" value="save_guide_notes">
|
<input type="hidden" name="action" value="save_guide_notes">
|
||||||
<input type="hidden" name="set_id" value="<?= (int) $set['id'] ?>">
|
<input type="hidden" name="set_id" value="<?= (int) $set['id'] ?>">
|
||||||
|
<?php if ($ordered): ?>
|
||||||
<fieldset class="gear-fieldset">
|
<fieldset class="gear-fieldset">
|
||||||
<legend>Skills <span class="text-muted">(Reihenfolge = in welcher Folge man sie steigert, leer = keine)</span></legend>
|
<legend>Skills <span class="text-muted">(Reihenfolge = in welcher Folge man sie steigert, leer = keine)</span></legend>
|
||||||
<?php foreach ($ordered as $entry): ?>
|
<?php foreach ($ordered as $entry): ?>
|
||||||
|
|
@ -592,6 +597,9 @@ function gear_render_guide_tab(array $set, bool $isOwn, array $slots, array $pla
|
||||||
</div>
|
</div>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
<?php else: ?>
|
||||||
|
<p class="field-hint">Noch keine Skills geplant – Reihenfolge und Begründung je Skill kannst du ergänzen, sobald du im Reiter „Skills“ Stufen vergibst.</p>
|
||||||
|
<?php endif; ?>
|
||||||
<fieldset class="gear-fieldset">
|
<fieldset class="gear-fieldset">
|
||||||
<legend>Hotbar <span class="text-muted">(was auf welche Taste kommt und warum)</span></legend>
|
<legend>Hotbar <span class="text-muted">(was auf welche Taste kommt und warum)</span></legend>
|
||||||
<label>Gezeigtes Preset
|
<label>Gezeigtes Preset
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue