From 7e6e59417e14e8974f40c9e991069473b106fc77 Mon Sep 17 00:00:00 2001 From: rr- Date: Sat, 30 Jul 2016 10:02:23 +0200 Subject: [PATCH] client/tags: allow deleting used tags --- client/html/tag_delete.tpl | 25 +++++++++++-------------- client/html/tag_summary.tpl | 2 +- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/client/html/tag_delete.tpl b/client/html/tag_delete.tpl index 13435b9b..5b63aa01 100644 --- a/client/html/tag_delete.tpl +++ b/client/html/tag_delete.tpl @@ -1,20 +1,17 @@
- <% if (ctx.tag.postCount) { %> -

For extra paranoia safety, only tags that are unused can be deleted.

-

Check which posts are tagged with <%- ctx.tag.names[0] %>.

- <% } else { %> -
    -
  • - <%= ctx.makeCheckbox({id: 'confirm-deletion', name: 'confirm-deletion', required: true, text: 'I confirm that I want to delete this tag.'}) %> -
  • -
+

This tag has <%- ctx.tag.postCount %> usage(s).

-
+
    +
  • + <%= ctx.makeCheckbox({id: 'confirm-deletion', name: 'confirm-deletion', required: true, text: 'I confirm that I want to delete this tag.'}) %> +
  • +
-
- -
- <% } %> +
+ +
+ +
diff --git a/client/html/tag_summary.tpl b/client/html/tag_summary.tpl index 38bb238f..6938e344 100644 --- a/client/html/tag_summary.tpl +++ b/client/html/tag_summary.tpl @@ -36,6 +36,6 @@

<%= ctx.makeMarkdown(ctx.tag.description || 'This tag has no description yet.') %> -

This tag has <%- ctx.tag.postCount %> usages.

+

This tag has <%- ctx.tag.postCount %> usage(s).