forked from teiling88/lebk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
59 lines (52 loc) · 1.99 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php declare(strict_types=1);
use SwagLebk\Entity\WeeklyReportEntity;
require_once __DIR__.'/autoload.php';
$entity = new WeeklyReportEntity();
$entity->id = 1;
$weeklyReports = $repository->read();
?>
<?php require_once __DIR__ . '/templates/head.html' ?>
<div class="container">
<h1><a href="index.php">Weekly Reports</a></h1>
<div class="row">
<div class="col-sm">
<table class="table table-striped">
<thead class="thead-light">
<tr>
<th scope="col">id</th>
<th scope="col">Weeknumber</th>
<th scope="col">Positive</th>
<th scope="col">Negative</th>
<th scope="col">Learned</th>
<th scope="col">Actions</th>
</tr>
</thead>
<tbody>
<?php foreach ($weeklyReports as $report): ?>
<tr>
<td><?= $report->id ?></td>
<td><?= $report->weeknumber ?></td>
<td><?= $report->positive ?></td>
<td><?= $report->negative ?></td>
<td><?= $report->learned ?></td>
<td>
<a href="edit.php?id=<?= $report->id ?>">
<img src="templates/edit.svg" alt="delete"/>
</a>
<a href="delete.php?id=<?= $report->id ?>">
<img src="templates/delete.svg" alt="delete"/>
</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
<div class="row">
<div class="col-sm">
<a class="btn btn-primary" href="create.php" role="button">Create new Report</a>
</div>
</div>
</div>
<?php require_once __DIR__ . '/templates/footer.html' ?>