Website Summary Files Commits Branches @commit @diff @stats
path: root / views / list / item.php
diff options
context:
space:
mode:
Commitaa600d9b16f73ba3af5e42fc1558e710ae955b5b (patch)
Author
 Syndamia <kamen@syndamia.com>
2025-02-09 19:59:10 +0200
Committer
 Syndamia <kamen@syndamia.com>
2025-02-09 19:59:10 +0200
Files042fb25832780ba6ff06a88016f6be734ae1dd94 /views/list/item.php
nowayforward_human-aa600d9b16f73ba3af5e42fc1558e710ae955b5b.tar
nowayforward_human-aa600d9b16f73ba3af5e42fc1558e710ae955b5b.tar.gz
nowayforward_human-aa600d9b16f73ba3af5e42fc1558e710ae955b5b.zip
Parentd081c605227d9210e5b02a308272452283cf47d7 (diff)
feat(views/list): Add buttons to items
1 files changed, 12 insertions, 2 deletions
-rw-r--r--views/list/item.php14
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>