From fa146fbfb3bee0f5fc7e59133c6350df0a991ebd Mon Sep 17 00:00:00 2001 From: Daniel Nitsikopoulos Date: Sat, 6 May 2023 20:31:23 +1000 Subject: [PATCH] Clean up tags admin --- slices/admin/templates/shared/_tag.html.slim | 2 +- slices/admin/templates/tags/index.html.slim | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/slices/admin/templates/shared/_tag.html.slim b/slices/admin/templates/shared/_tag.html.slim index 73415c2..db98575 100644 --- a/slices/admin/templates/shared/_tag.html.slim +++ b/slices/admin/templates/shared/_tag.html.slim @@ -1,4 +1,4 @@ -li id="tag-#{tag.id}" +li id="tag-#{tag.id}" class="text-gray-800 dark:text-gray-200" = "#{tag.label} (#{tag.posts.count})" = " — " button hx-delete="/admin/tags/#{tag.id}" hx-target="#tag-#{tag.id}" delete \ No newline at end of file diff --git a/slices/admin/templates/tags/index.html.slim b/slices/admin/templates/tags/index.html.slim index a2e9184..995604f 100644 --- a/slices/admin/templates/tags/index.html.slim +++ b/slices/admin/templates/tags/index.html.slim @@ -5,8 +5,9 @@ div class="max-w-prose mx-auto" ul - unused_tags.each do |tag| == render "shared/tag", tag: tag - li class="py-2" - hr + - if !unused_tags.empty? + li class="py-2" + hr - used_tags.each do |tag| == render "shared/tag", tag: tag