From 75f0045caf4cc6a7c8cbc544a0a0d319015dacad Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Wed, 15 Oct 2014 21:21:01 +0200 Subject: [PATCH] Changed tag view Added tag info which turns into form with sufficient privileges. (Previously only form was available.) --- public_html/templates/tag.tpl | 84 +++++++++++++++++++---------------- 1 file changed, 45 insertions(+), 39 deletions(-) diff --git a/public_html/templates/tag.tpl b/public_html/templates/tag.tpl index 73e4fa3e..8715a31b 100644 --- a/public_html/templates/tag.tpl +++ b/public_html/templates/tag.tpl @@ -3,57 +3,63 @@

<%= tagName %>

- <% if (_.any(privileges)) { %> -
- <% if (privileges.canChangeName) { %> -
- -
+ + <% if (privileges.canChangeName) { %> +
+ +
-
- <% } %> +
+ <% } %> - <% if (privileges.canChangeImplications) { %> -
- -
- -

Added automatically when tagging with <%= tagName %>.

-
-
- <% } %> +
+ +
+ <% if (privileges.canChangeImplications) { %> + +

Added automatically when tagging with <%= tagName %>.

+ <% } else { %> + <%= _.pluck(tag.implications, 'name').join(' ') || '-' %>

+ <% } %> +
+
- <% if (privileges.canChangeSuggestions) { %> -
- -
- -

Suggested when tagging with <%= tagName %>.

-
-
- <% } %> +
+ +
+ <% if (privileges.canChangeSuggestions) { %> + +

Suggested when tagging with <%= tagName %>.

+ <% } else { %> + <%= _.pluck(tag.suggestions, 'name').join(' ') || '-' %> + <% } %> +
+
- <% if (privileges.canBan) { %> -
- -
- > - -
-
- <% } %> +
+ +
+ <% if (privileges.canBan) { %> + > + + <% } else { %> + <%= tag.banned ? 'This is banned and cannot cannot be used in posts.' : 'This tag is not banned and can be used in posts.' %> + <% } %> +
+
+ <% if (_.any(privileges)) { %>
- - <% } %> + <% } %> +

Example usages