aboutsummaryrefslogtreecommitdiff
path: root/views/list/item.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/list/item.php')
-rw-r--r--views/list/item.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/views/list/item.php b/views/list/item.php
index 17a6a59..0146dbe 100644
--- a/views/list/item.php
+++ b/views/list/item.php
@@ -13,7 +13,17 @@
</p>
</section>
<section name="itemButton" hidden>
- <span><!-- Edit button --></span>
- <span><!-- Delete button --></span>
+ <?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>