client/tags: allow deleting used tags
This commit is contained in:
parent
f40e41ae8b
commit
7e6e59417e
|
@ -1,9 +1,7 @@
|
||||||
<div class='tag-delete'>
|
<div class='tag-delete'>
|
||||||
<form>
|
<form>
|
||||||
<% if (ctx.tag.postCount) { %>
|
<p>This tag has <a href='/posts/query=<%- encodeURIComponent(ctx.tag.names[0]) %>'><%- ctx.tag.postCount %> usage(s)</a>.</p>
|
||||||
<p>For extra <s>paranoia</s> safety, only tags that are unused can be deleted.</p>
|
|
||||||
<p>Check <a href='/posts/query=<%- encodeURIComponent(ctx.tag.names[0]) %>'>which posts</a> are tagged with <%- ctx.tag.names[0] %>.</p>
|
|
||||||
<% } else { %>
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<%= ctx.makeCheckbox({id: 'confirm-deletion', name: 'confirm-deletion', required: true, text: 'I confirm that I want to delete this tag.'}) %>
|
<%= ctx.makeCheckbox({id: 'confirm-deletion', name: 'confirm-deletion', required: true, text: 'I confirm that I want to delete this tag.'}) %>
|
||||||
|
@ -15,6 +13,5 @@
|
||||||
<div class='buttons'>
|
<div class='buttons'>
|
||||||
<input type='submit' value='Delete tag'/>
|
<input type='submit' value='Delete tag'/>
|
||||||
</div>
|
</div>
|
||||||
<% } %>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -36,6 +36,6 @@
|
||||||
<section class='description'>
|
<section class='description'>
|
||||||
<hr/>
|
<hr/>
|
||||||
<%= ctx.makeMarkdown(ctx.tag.description || 'This tag has no description yet.') %>
|
<%= ctx.makeMarkdown(ctx.tag.description || 'This tag has no description yet.') %>
|
||||||
<p>This tag has <a href='/posts/query=<%- encodeURIComponent(ctx.tag.names[0]) %>'><%- ctx.tag.postCount %> usages</a>.</p>
|
<p>This tag has <a href='/posts/query=<%- encodeURIComponent(ctx.tag.names[0]) %>'><%- ctx.tag.postCount %> usage(s)</a>.</p>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue