hundeprofile sind jetzt öffentlich
All checks were successful
Build and push / Pulling repo on server (push) Successful in 3s

This commit is contained in:
Chris 2023-11-01 19:53:36 +01:00
parent 46cf4dcd40
commit 4794f46add
2 changed files with 69 additions and 57 deletions

View File

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

View File

@ -37,11 +37,13 @@
<?php endif; ?>
</ul>
<?php if($ismydog===true): ?>
<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>
<?php endif; ?>
</div>
</div>
</div>
@ -68,6 +70,7 @@
</tr>
</thead>
<tbody>
<?php if(count($results) > 0): ?>
<?php foreach($results as $result) : ?>
<?php
$t = new Tournament();
@ -128,11 +131,20 @@
</a></td>
</tr>
<?php endforeach; ?>
<?php else: ?>
<tr>
<td colspan="12">
<div class="alert alert-info" role="alert">
<i class="fas fa-info-circle"></i> Dieser Hund hat noch keine Ergebnisse
</div>
</td>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
<?php if(count($results) > 0): ?>
<div class="col">
<div id="graph" data-bs-theme="light" class="card bg-light text-black" style="min-height: 400px;"></div>
@ -214,6 +226,6 @@
myChart.setOption(option);
</script>
</div>
<?php endif; ?>
</div>
</div>