tournaments page added
This commit is contained in:
parent
99f44c9bb2
commit
151e06299d
@ -31,7 +31,7 @@ class Tournaments extends Page {
|
||||
}
|
||||
|
||||
function index() {
|
||||
|
||||
$this->set('template', 'tournaments.html');
|
||||
}
|
||||
|
||||
function manage()
|
||||
@ -189,7 +189,7 @@ class Tournaments extends Page {
|
||||
return;
|
||||
}
|
||||
|
||||
//var_dump($_SESSION['user']->data['dogs']);
|
||||
//var_dump($_SESSION['user']->data['tournaments']);
|
||||
|
||||
if(!is_array($_SESSION['user']->data['tournaments']) || !in_array($tid, $_SESSION['user']->data['tournaments'])) // new t!
|
||||
{
|
||||
|
@ -1,35 +1,17 @@
|
||||
<!-- FILEPATH: /home/chris/git/dogstats/web/pages/dogs/dog.html -->
|
||||
|
||||
<div class="container">
|
||||
<h1>Wettkämpfe</h1>
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<div class="card">
|
||||
<img src="<?= $dogdata['photo']?:'https://pictshare.net/1ch3e5.png' ?>/300x170/forcesize" class="card-img-top" alt="<?= escape($dogdata['name']); ?>'s profile Picture">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title"><?= escape($dogdata['name']); ?></h5>
|
||||
<p class="card-text">
|
||||
|
||||
<ul>
|
||||
<li>Rasse: <?= escape($dogdata['breed'])?:'Nicht eingetragen'; ?></li>
|
||||
<li>Alter: <?= date_diff(date_create($dogdata['birthday']), date_create('now'))->y ?></li>
|
||||
<?php if($dogdata['kennel_name']): ?><li>Zuchtname: <?= escape($dogdata['kennel_name']); ?></li> <?php endif; ?>
|
||||
<?php if($dogdata['size']): ?><li>Größe: <?= escape($dogdata['size']); ?> cm</li> <?php endif; ?>
|
||||
<?php if($dogdata['agility_size']): ?><li>Agility Größe: <?= escape($dogdata['agility_size']); ?></li> <?php endif; ?>
|
||||
</ul>
|
||||
|
||||
<div class="d-flex justify-content-end">
|
||||
<button type="button" class="btn btn-secondary" hx-get="/dogs/edit/<?= $dogid; ?>" hx-target="#main">
|
||||
<i class="fas fa-edit"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<h1>Turnier Veranstaltungen</h1>
|
||||
<p>Hier kannst du alle Veranstaltungen einsehen.</p>
|
||||
<div class="tournaments-list">
|
||||
<?php foreach ($tournaments as $tournament) : ?>
|
||||
<div class="d-flex card">
|
||||
<img src="<?= $tournament['photo'] ?>/50x50/forcesize">
|
||||
<div class="card-body">
|
||||
<h3><?= escape($tournament['name']); ?></h3>
|
||||
<p><?= escape($tournament['date']); ?></p>
|
||||
<button hx-get="/tournament/edit/<?= $tournament['id'] ?>" hx-push-url="/tournament/edit/<?= $tournament['id'] ?>" hx-target="#main" >Bearbeiten</button>
|
||||
<button hx-get="/tournament/delete/<?= $tournament['id'] ?>" hx-target="#main" hx-confirm="Bist du sicher, dass du <?= escape($tournament['name']); ?> löschen willst">Löschen</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-8">
|
||||
Second Column
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
|
Reference in New Issue
Block a user