summaryrefslogtreecommitdiff
path: root/src/chef/pages/admin.clj
diff options
context:
space:
mode:
authorTim <contact@bytim.eu>2025-05-16 16:45:13 +0200
committerTim <contact@bytim.eu>2025-05-16 16:45:13 +0200
commitd658c185d0c56a72b062a234982c5d1f8da49c1c (patch)
tree68d6f9b10437f59fe4ab3477c8d9cadc7ba07cf1 /src/chef/pages/admin.clj
parent8cb2c95d253f0a0c1216ac396288f38c238e6b13 (diff)
downloadchef-d658c185d0c56a72b062a234982c5d1f8da49c1c.tar.xz
chef-d658c185d0c56a72b062a234982c5d1f8da49c1c.zip
Add feature to delete categories
Diffstat (limited to 'src/chef/pages/admin.clj')
-rw-r--r--src/chef/pages/admin.clj5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/chef/pages/admin.clj b/src/chef/pages/admin.clj
index 73cf127..83e5dbd 100644
--- a/src/chef/pages/admin.clj
+++ b/src/chef/pages/admin.clj
@@ -25,6 +25,11 @@
:hx-post (str "/api/admin/create-category"
(when (some? data) (str "?parent=" (:categories/id data))))
:hx-swap "none"}]
+ [:img {:src "/static/icons/trash.svg" :height "30em"
+ :style {:vertical-align :middle
+ :margin-left "1em"}
+ :hx-delete (str "/api/admin/delete-category/" (:categories/id data))
+ :hx-swap "none"}]
[:ul
(for [child children]
(render-category child (->> (sql/format {:select [:*]