From 067eb3f8481e9c653e6a0de5feea43bb64ddc1fc Mon Sep 17 00:00:00 2001 From: Daniel Nitsikopoulos Date: Sun, 7 May 2023 17:35:08 +1000 Subject: [PATCH] Clean up admin area --- slices/admin/templates/bookmarks/index.html.slim | 5 +++-- slices/admin/templates/posts/index.html.slim | 11 +++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/slices/admin/templates/bookmarks/index.html.slim b/slices/admin/templates/bookmarks/index.html.slim index 3fccdd6..ebb26b8 100644 --- a/slices/admin/templates/bookmarks/index.html.slim +++ b/slices/admin/templates/bookmarks/index.html.slim @@ -6,7 +6,7 @@ div class="max-w-prose mx-auto" thead th Details th Date - th Actions + th colspan="2" Actions tbody - bookmarks.each do |bookmark| tr id="bookmark-#{bookmark.id}" @@ -25,7 +25,8 @@ div class="max-w-prose mx-auto" td = bookmark.published_at&.strftime("%d %b %Y") td - button hx-delete="/admin/bookmarks/#{bookmark.id}" hx-target="#bookmark-#{bookmark.id}" delete + button class="text-red-600" hx-delete="/admin/bookmarks/#{bookmark.id}" hx-target="#bookmark-#{bookmark.id}" delete + td button hx-post="/admin/bookmarks/#{bookmark.id}/archive" archive div class="max-w-screen-md mx-auto border-t-4 border-solid border-gray-400 dark:border-gray-600" diff --git a/slices/admin/templates/posts/index.html.slim b/slices/admin/templates/posts/index.html.slim index 3c5d833..6414327 100644 --- a/slices/admin/templates/posts/index.html.slim +++ b/slices/admin/templates/posts/index.html.slim @@ -6,22 +6,21 @@ div class="max-w-prose mx-auto" thead th Details th Date - th Actions + th colspan="2" Actions tbody - posts.each do |post| tr id="post-#{post.id}" td div = post.name - a class="no-underline" href=post.slug + a class="no-underline" href="/post/#{post.slug}" small class="text-gray-400 dark:text-gray-600" = post.slug td = post.published_at&.strftime("%d %b %Y") td - div - button hx-delete="/admin/bookmarks/#{post.id}" hx-target="#post-#{post.id}" delete - div - button hx-post="/admin/bookmarks/#{post.id}/archive" archive + button class="text-red-600" hx-delete="/admin/bookmarks/#{post.id}" hx-target="#post-#{post.id}" delete + td + button hx-post="/admin/bookmarks/#{post.id}/archive" unpublish div class="max-w-screen-md mx-auto border-t-4 border-solid border-gray-400 dark:border-gray-600"