dog overview
All checks were successful
Build and push / Pulling repo on server (push) Successful in 3s

This commit is contained in:
2023-10-31 21:43:08 +00:00
parent af05f1d520
commit 7b79995796
5 changed files with 82 additions and 3 deletions

View File

@ -209,11 +209,13 @@ class Dogs extends Page {
{
$dogid = $this->params[0];
$d = new Dog();
$res = new Result();
if(!$d->isMyDog($dogid))
return 'Not your dog :(';
$d->load($dogid);
$this->set('results', $d->getResults());
$this->set('dogdata', $d->data);
$this->set('dogid', $dogid);
$this->set('template', 'dog.html');

View File

@ -25,8 +25,47 @@
</div>
</div>
</div>
<div class="col-8" id="sitemain">
<div class="col-9" id="sitemain">
<!-- table of all runs of this dog-->
<div class="card p-2">
<h4>Ergebnisse</h4>
<p class="card-text">
<button hx-get="/dogs/addresult/<?= $dogid; ?>" hx-push-url="/dogs/addresult/<?= $dogid; ?>" hx-target="#main" class="btn btn-primary"><i class="fas fa-plus-circle"></i> Ergebnis Eintragen</button>
</p>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<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) : ?>
<tr>
<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>

View File

@ -77,7 +77,7 @@
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>