From aa600d9b16f73ba3af5e42fc1558e710ae955b5b Mon Sep 17 00:00:00 2001
From: Syndamia
Date: Sun, 9 Feb 2025 19:59:10 +0200
Subject: feat(views/list): Add buttons to items
---
views/img/edit.svg | 1 +
views/list/item.php | 14 ++++++++++++--
views/styles.css | 12 ++++++++----
3 files changed, 21 insertions(+), 6 deletions(-)
create mode 100644 views/img/edit.svg
(limited to 'views')
diff --git a/views/img/edit.svg b/views/img/edit.svg
new file mode 100644
index 0000000..4646926
--- /dev/null
+++ b/views/img/edit.svg
@@ -0,0 +1 @@
+
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 @@
-
-
+ UID === $list->AuthorUID): ?>
+
+
+ UID === $list->AuthorUID || $user->Role === 'Admin')): ?>
+
+
diff --git a/views/styles.css b/views/styles.css
index fecbfeb..0ec7895 100644
--- a/views/styles.css
+++ b/views/styles.css
@@ -328,7 +328,7 @@ hr.new-section {
border-color: var(--dark-green);
}
-.item [name=itemButton], .item .global-buttons {
+[name=itemButton], .item .global-buttons {
border-left: 3px solid var(--dark-purple);
margin: -0.5em 0 -0.5em 0.5em;
padding: 0.5em 0 0.5em 0.5em;
@@ -337,14 +337,18 @@ hr.new-section {
gap: 0.3em;
}
-.item [name=itemButton] > *, .item .global-buttons > * {
+.list [name=itemButton] {
+ border-color: var(--cherry);
+}
+
+[name=itemButton] > *, .item .global-buttons > * {
display: flex;
align-items: end;
flex: 1;
}
-.item [name=itemButton] input,
-.item [name=itemButton] button,
+[name=itemButton] input,
+[name=itemButton] button,
.item .global-buttons input,
.item .global-buttons button {
box-shadow: none;
--
cgit v1.2.3