blob: 0146dbe7bee452c4fdbc8b1526512390ed8e7fda (
plain) (
blame)
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
|
<section class="list" onclick="window.location.href = '/list/<?= $list->LID ?>'">
<section>
<div class="heading">
<h2>
<?= $list->Name ?>
</h2>
<a href="<?= '/user/' . $user->Username ?>" class="float-right">
<?= $user->Username ?>
</a>
</div>
<p>
<?= $list->Description ?>
</p>
</section>
<section name="itemButton" hidden>
<?php if ($user !== null && $user->UID === $list->AuthorUID): ?>
<form action="/list/update" method="GET">
<input type="hidden" name="lid" value="<?= $list->LID ?>">
<button><?php include $VIEWS_DIR . '/img/edit.svg' ?></button>
</form>
<?php endif; ?>
<?php if ($user !== null && ($user->UID === $list->AuthorUID || $user->Role === 'Admin')): ?>
<form action="/list/delete" method="GET">
<input type="hidden" name="lid" value="<?= $list->LID ?>">
<button><?php include $VIEWS_DIR . '/img/delete.svg' ?></button>
</form>
<?php endif; ?>
</section>
</section>
|