2024-04-23 22:43:54 +02:00
|
|
|
<?php
|
2024-04-16 15:25:22 +02:00
|
|
|
|
2024-04-23 22:43:54 +02:00
|
|
|
use WoWPress\Frontend\Icon;
|
|
|
|
use WoWPress\Frontend\ToggleButton;
|
|
|
|
use WoWPress\Models\Character;
|
|
|
|
use WoWPress\Models\Raid;
|
2024-04-16 15:25:22 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2024-04-23 22:43:54 +02:00
|
|
|
$raid = $GLOBALS['wowpress']['raid'];
|
|
|
|
set_sidebar_status('top', false);
|
|
|
|
set_sidebar_status('left', false);
|
|
|
|
set_sidebar_status('right', false);
|
2024-04-16 15:25:22 +02:00
|
|
|
|
2024-04-23 22:43:54 +02:00
|
|
|
global $user;
|
2024-04-17 22:10:17 +02:00
|
|
|
|
2024-04-23 22:43:54 +02:00
|
|
|
if ($raid->id_wowaudit) {
|
|
|
|
$raid->sync(true);
|
|
|
|
$raid->save();
|
|
|
|
}
|
2024-04-23 00:44:42 +02:00
|
|
|
|
2024-04-17 22:10:17 +02:00
|
|
|
|
2024-04-23 22:43:54 +02:00
|
|
|
$unknowns = [];
|
|
|
|
|
|
|
|
get_header();
|
|
|
|
?>
|
|
|
|
<div class="top-title flex flex-col lg:flex-row gap-auto" style="margin-top:calc(-1 * var(--wowp-gap))">
|
|
|
|
<?php if ($raid->previous) : ?>
|
|
|
|
<a href="<?= $raid->previous->link ?>" class="btn btn-outline hidden lg:flex">Vorheriger</a>
|
|
|
|
<?php endif; ?>
|
|
|
|
<div class="text-3xl font-bold bg-glass shadow p-3 text-center w-full">
|
|
|
|
<?= $raid->title ?>
|
2024-04-22 15:38:22 +02:00
|
|
|
</div>
|
2024-04-23 22:43:54 +02:00
|
|
|
<?php if ($raid->next) : ?>
|
|
|
|
<a href="<?= $raid->next->link ?>" class="btn btn-outline hidden lg:flex">Nächster</a>
|
|
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
|
|
<section id="primary">
|
|
|
|
<main id="main">
|
|
|
|
<div class="flex flex-col lg:flex-row gap-auto" x-data="{encounter:<?= $raid->encounters[0]['id'] ?>}">
|
|
|
|
<div class="bg-glass shadow p-auto w-full lg:w-1/5 order-2 lg:order-1">
|
|
|
|
<h3 class="text-xl font-bold text-center">Bosse</h3>
|
|
|
|
<div class="grid gap-auto">
|
|
|
|
<?php foreach ($raid->encounters as $encounter) : ?>
|
|
|
|
<button <?= $encounter['enabled'] ? "" : "disabled" ?> x-on:click="encounter=<?= $encounter['id'] ?>" class="btn btn-outline <?= $encounter['enabled'] ? "btn-green" : "btn-slate" ?>" :class="{'current-menu-item' : encounter==<?= $encounter['id'] ?> }"><?= $encounter['name'] ?></button>
|
|
|
|
<?php endforeach; ?>
|
2024-04-17 22:10:17 +02:00
|
|
|
</div>
|
2024-04-23 22:43:54 +02:00
|
|
|
</div>
|
|
|
|
<div class="w-full flex flex-col gap-auto order-3 lg:order-2">
|
|
|
|
<div class="flex flex-col lg:flex-row gap-auto">
|
|
|
|
<div class="bg-glass shadow p-auto w-full lg:w-1/5">
|
|
|
|
<div class="grid text-center gap-1">
|
|
|
|
<div class="bg-<?= $raid->color ?> text-black text-2xl "><?= format_date($raid->start, "EEEE") ?></div>
|
|
|
|
<div class="border border-<?= $raid->color ?>">
|
|
|
|
<div class="text-3xl p-auto "><?= format_date($raid->start, "dd. MMMM") ?></div>
|
2024-04-22 15:38:22 +02:00
|
|
|
</div>
|
2024-04-23 22:43:54 +02:00
|
|
|
<div class="border border-<?= $raid->color ?> p-2">Start: <?= format_date($raid->start, "HH:mm") ?></div>
|
|
|
|
<div class="border border-<?= $raid->color ?> p-2">Ende: <?= format_date($raid->end, "HH:mm") ?></div>
|
|
|
|
<?php if ($raid->difficulty) : ?>
|
|
|
|
<div class="border border-<?= $raid->color ?> p-2"><?= $raid->difficulty ?></div>
|
|
|
|
<?php endif; ?>
|
2024-04-16 15:25:22 +02:00
|
|
|
</div>
|
2024-04-23 22:43:54 +02:00
|
|
|
</div>
|
|
|
|
<div class="bg-glass shadow p-auto w-full">
|
|
|
|
<?php foreach ($raid->encounters as $encounter) : ?>
|
|
|
|
<div x-cloak x-show="encounter==<?= $encounter['id'] ?>">
|
|
|
|
<h3 class="text-xl font-bold">Informationen für : <?= $encounter['name'] ?></h3>
|
|
|
|
<div>
|
|
|
|
<?= $encounter['notes'] ?>
|
2024-04-22 15:38:22 +02:00
|
|
|
</div>
|
2024-04-23 22:43:54 +02:00
|
|
|
</div>
|
|
|
|
<?php endforeach; ?>
|
2024-04-22 15:38:22 +02:00
|
|
|
</div>
|
2024-04-23 22:43:54 +02:00
|
|
|
</div>
|
2024-04-17 22:10:17 +02:00
|
|
|
|
2024-04-16 15:25:22 +02:00
|
|
|
|
2024-04-23 22:43:54 +02:00
|
|
|
<div class="flex flex-col lg:flex-row gap-auto">
|
|
|
|
<?php foreach ($raid->encounters as $encounter) : ?>
|
|
|
|
<div x-cloak x-show="encounter==<?= $encounter['id'] ?>" class="w-full">
|
2024-04-22 15:38:22 +02:00
|
|
|
|
2024-04-23 22:43:54 +02:00
|
|
|
<div class="w-full grid grid-cols-1 lg:grid-cols-4 gap-auto">
|
|
|
|
<?php
|
|
|
|
foreach ($encounter['selections']->groupBy('role') as $role => $signups) :
|
|
|
|
if ($role != "Unknown") :
|
|
|
|
?>
|
|
|
|
<div class="bg-glass shadow p-auto flex flex-col gap-auto">
|
|
|
|
<h3 class="text-xl font-bold text-center"><?= $role ?></h3>
|
|
|
|
<?php foreach ($signups as $signup) : ?>
|
|
|
|
<?= $signup->showForm(false, true, false, $encounter['id'] == 0) ?>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</div>
|
|
|
|
<?php
|
|
|
|
else : if ($encounter['id'] == 0) : $unknowns = $signups;
|
2024-04-22 15:38:22 +02:00
|
|
|
endif;
|
2024-04-23 22:43:54 +02:00
|
|
|
endif;
|
|
|
|
endforeach;
|
|
|
|
?>
|
2024-04-22 15:38:22 +02:00
|
|
|
</div>
|
2024-04-16 15:25:22 +02:00
|
|
|
|
2024-04-22 15:38:22 +02:00
|
|
|
</div>
|
2024-04-23 22:43:54 +02:00
|
|
|
<?php endforeach; ?>
|
|
|
|
|
2024-04-16 15:25:22 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2024-04-23 22:43:54 +02:00
|
|
|
<div class="flex flex-col gap-auto w-full lg:w-1/5 order-1 lg:order-3">
|
|
|
|
<div class="bg-glass shadow p-auto">
|
|
|
|
<div class="flex flex-col gap-auto">
|
|
|
|
<h3 class="text-xl font-bold text-center">Status</h3>
|
|
|
|
<?= $raid->showSignup($user->characters->first(), true, true, true) ?>
|
|
|
|
</div>
|
2024-04-22 15:38:22 +02:00
|
|
|
</div>
|
2024-04-16 15:25:22 +02:00
|
|
|
</div>
|
2024-04-23 22:43:54 +02:00
|
|
|
</div>
|
|
|
|
<div class="w-full order-4 bg-glass shadow p-auto flex flex-col gap-auto">
|
|
|
|
<h3 class="text-xl font-bold text-center">Keine Rückmeldung</h3>
|
|
|
|
<div class="grid grid-cols-1 lg:grid-cols-5 flex-wrap gap-auto">
|
|
|
|
<?php foreach ($unknowns as $signup) : ?>
|
|
|
|
<?= $signup->showForm() ?>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</main>
|
|
|
|
</section>
|
|
|
|
<?php
|
|
|
|
get_footer();
|