Chris
a68d94f482
All checks were successful
Build and push / Pulling repo on server (push) Successful in 3s
83 lines
4.1 KiB
HTML
83 lines
4.1 KiB
HTML
<!-- FILEPATH: /home/chris/git/dogstats/web/pages/dogs/dog.html -->
|
|
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-3">
|
|
<div class="card">
|
|
<img src="<?= $dogdata['photo']?:'https://pictshare.net/1ch3e5.png' ?>/300x200/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>Alter: <?= date_diff(date_create($dogdata['birthday']), date_create('now'))->y ?></li>
|
|
|
|
<?php if($dogdata['breed']): ?><li>Rasse: <?= escape($dogdata['breed']); ?></li> <?php endif; ?>
|
|
<?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>
|
|
</div>
|
|
</div>
|
|
<div class="col-9" id="sitemain">
|
|
<!-- table of all runs of this dog-->
|
|
<div class="card p-2">
|
|
<h4>Alle Ergebnisse</h4>
|
|
<div class="table-responsive">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>Turnier</th>
|
|
<th>Lauf</th>
|
|
<th>Platz</th>
|
|
<th>Disqualifiziert</th>
|
|
<th>Verweigerungen</th>
|
|
<th>Fehler</th>
|
|
<th>Zeitfehler</th>
|
|
<th>Zeit</th>
|
|
<th>Gesamtfehler</th>
|
|
<th>m/Sek</th>
|
|
<th>Bewertung</th>
|
|
<th>Teilnehmer</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach($results as $result) : ?>
|
|
<?php
|
|
$t = new Tournament();
|
|
$run = new Run();
|
|
|
|
$tname = $t->getField('name',$result['tournament']);
|
|
$rname = $run->getField('name',$result['run']);
|
|
|
|
?>
|
|
<tr>
|
|
<td><a href="/tournaments/event/<?= $result['tournament']; ?>"><?= $tname; ?></a></td>
|
|
<td><a href="/runs/overview/<?= $result['run']; ?>"><?= $rname; ?></a></td>
|
|
<td><?= escape($result['ranking']); ?></td>
|
|
<td><?= $result['disqualified']?'Ja':'Nein'; ?></td>
|
|
<td><?= escape($result['refusals']); ?></td>
|
|
<td><?= escape($result['errors']); ?></td>
|
|
<td><?= escape($result['timefaults']); ?></td>
|
|
<td><?= escape($result['runtime']); ?></td>
|
|
<td><?= escape($result['penalties']); ?></td>
|
|
<td><?= escape($result['speed']); ?></td>
|
|
<td><?= escape($result['rating']); ?></td>
|
|
<td><a href="/dogs/overview/<?= $result['dog'] ?>"><?= escape( (new Dog())->getField('name',$result['dog']) ); ?></a></td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|