diff options
| author | Syndamia <kamen@syndamia.com> | 2025-02-09 19:59:10 +0200 |
|---|---|---|
| committer | Syndamia <kamen@syndamia.com> | 2025-02-09 19:59:10 +0200 |
| commit | aa600d9b16f73ba3af5e42fc1558e710ae955b5b (patch) | |
| tree | 042fb25832780ba6ff06a88016f6be734ae1dd94 /views/list | |
| parent | d081c605227d9210e5b02a308272452283cf47d7 (diff) | |
| download | nowayforward_human-aa600d9b16f73ba3af5e42fc1558e710ae955b5b.tar nowayforward_human-aa600d9b16f73ba3af5e42fc1558e710ae955b5b.tar.gz nowayforward_human-aa600d9b16f73ba3af5e42fc1558e710ae955b5b.zip | |
feat(views/list): Add buttons to items
Diffstat (limited to 'views/list')
| -rw-r--r-- | views/list/item.php | 14 |
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> |
