From ba0765bf4dc468815e4fa45509010c0cd675e5b2 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Mon, 25 Nov 2013 16:21:03 +0800 Subject: Bug 793963: add the ability to tag comments with arbitrary tags r=dkl, a=glob --- .../en/default/admin/params/bugfields.html.tmpl | 6 +++- .../default/admin/params/groupsecurity.html.tmpl | 3 ++ template/en/default/bug/comments.html.tmpl | 39 ++++++++++++++++++---- template/en/default/bug/edit.html.tmpl | 25 ++++++++++++++ template/en/default/bug/show-header.html.tmpl | 3 ++ template/en/default/global/user-error.html.tmpl | 27 ++++++++++++++- 6 files changed, 94 insertions(+), 9 deletions(-) (limited to 'template') diff --git a/template/en/default/admin/params/bugfields.html.tmpl b/template/en/default/admin/params/bugfields.html.tmpl index 07b200825..961833d89 100644 --- a/template/en/default/admin/params/bugfields.html.tmpl +++ b/template/en/default/admin/params/bugfields.html.tmpl @@ -41,5 +41,9 @@ "entry form.
" _ "You can leave this empty: " _ "$terms.Bugzilla will then use the operating system that the browser " _ - "reports to be running on as the default." } + "reports to be running on as the default.", + + collapsed_comment_tags => "A comma separated list of tags which, when applied " _ + "to comments, will cause them to be collapsed by default", + } %] diff --git a/template/en/default/admin/params/groupsecurity.html.tmpl b/template/en/default/admin/params/groupsecurity.html.tmpl index 7e30f0723..4f0b4919b 100644 --- a/template/en/default/admin/params/groupsecurity.html.tmpl +++ b/template/en/default/admin/params/groupsecurity.html.tmpl @@ -29,6 +29,9 @@ querysharegroup => "The name of the group of users who can share their " _ "saved searches with others.", + comment_taggers_group => "The name of the group of users who can tag comment." _ + " Setting this to empty disables comment tagging.", + debug_group => "The name of the group of users who can view the actual " _ "SQL query generated when viewing $terms.bug lists and reports.", diff --git a/template/en/default/bug/comments.html.tmpl b/template/en/default/bug/comments.html.tmpl index a2fe4e52f..7aa9a34a6 100644 --- a/template/en/default/bug/comments.html.tmpl +++ b/template/en/default/bug/comments.html.tmpl @@ -13,7 +13,7 @@ [% END %] @@ -175,10 +181,29 @@ [% PROCESS formattimeunit time_unit=comment.work_time %] [% END %] + [% IF user.id && Param('comment_taggers_group') %] +
+ + [% IF comment.tags.size %] + + [% END %] + +
+ [% END %] + [%# Don't indent the
 block, since then the spaces are displayed in the
   # generated HTML
   #%]
-
   [%- comment_text FILTER quoteUrls(bug, comment) -%]
 
diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl index a6857f0d5..202a981ea 100644 --- a/template/en/default/bug/edit.html.tmpl +++ b/template/en/default/bug/edit.html.tmpl @@ -8,6 +8,31 @@ [% PROCESS bug/time.html.tmpl %] +[% IF Param('comment_taggers_group') %] + [% IF user.can_tag_comments %] +
+ x +
+ + +
+   +
+
+ x + +
+ [% END %] + [% IF user.id %] + + [% END %] +[% END %] +