join leave works
All checks were successful
Build and push / Pulling repo on server (push) Successful in 3s

This commit is contained in:
2023-10-26 21:48:04 +02:00
parent ebe969c7de
commit 5dda6b958d
2 changed files with 51 additions and 2 deletions

View File

@ -18,13 +18,25 @@
<?php if($tdata['url']): ?><li>Webseite: <a href="<?= $tdata['url']; ?>"><?= escape($tdata['url']); ?></a></li> <?php endif; ?>
</ul>
<?php if($admin===true): ?>
<div class="d-flex justify-content-end">
<?php if($admin===true): ?>
<button type="button" class="btn btn-secondary" hx-get="/tournaments/edit/<?= $tournament_id; ?>" hx-target="#main">
<i class="fas fa-edit"></i>
</button>
<?php endif; ?>
<?php if($joined===false): ?>
<button type="button" class="btn btn-secondary" hx-get="/tournaments/manage/join/<?= $tournament_id; ?>" hx-swap="outerHTML">
<i class="fas fa-plus-circle"></i> Diesem Event beitreten
</button>
<?php elseif($admin===false): ?>
<button type="button" class="btn btn-danger" hx-get="/tournaments/manage/leave/<?= $tournament_id; ?>" hx-swap="outerHTML" hx-confirm="Möchtest du dieses Event wirklich verlassen?">
<i class="fas fa-minus-circle"></i> Event verlassen
</button>
<?php endif; ?>
</div>
<?php endif; ?>
</div>
</div>
</div>