From 7d33443002e5da146e506f92600ff456571ac84a Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Wed, 11 Dec 2013 04:30:11 +0800 Subject: Bug 942725: backport bug 793963 to bmo (add the ability to tag comments with arbitrary tags) --- .../en/default/admin/params/bugfields.html.tmpl | 6 ++- .../default/admin/params/groupsecurity.html.tmpl | 3 ++ template/en/default/bug/comments.html.tmpl | 54 ++++++++++++++++------ template/en/default/bug/edit.html.tmpl | 25 ++++++++++ template/en/default/bug/show-header.html.tmpl | 3 ++ template/en/default/filterexceptions.pl | 1 + template/en/default/global/user-error.html.tmpl | 23 ++++++++- 7 files changed, 99 insertions(+), 16 deletions(-) (limited to 'template/en/default') diff --git a/template/en/default/admin/params/bugfields.html.tmpl b/template/en/default/admin/params/bugfields.html.tmpl index 58b08f615..a0d9664ad 100644 --- a/template/en/default/admin/params/bugfields.html.tmpl +++ b/template/en/default/admin/params/bugfields.html.tmpl @@ -57,5 +57,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 783099a11..041af6833 100644 --- a/template/en/default/admin/params/groupsecurity.html.tmpl +++ b/template/en/default/admin/params/groupsecurity.html.tmpl @@ -42,6 +42,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 773e6a485..e0226257e 100644 --- a/template/en/default/bug/comments.html.tmpl +++ b/template/en/default/bug/comments.html.tmpl @@ -133,10 +133,13 @@ [% IF mode == "edit" %] [% END %] @@ -151,15 +154,15 @@ [% comment_text = comment.body_full %] [% RETURN IF comment_text == '' AND (comment.work_time - 0) != 0 AND !user.is_timetracker %] -
- [% IF count == description %] +
+ [% IF comment.count == 0 %] [% class_name = "bz_first_comment_head" %] [% comment_label = "Description" %] [% ELSE %] [% class_name = "bz_comment_head" %] - [% comment_label = "Comment " _ count %] + [% comment_label = "Comment " _ comment.count %] [% END %]
@@ -168,17 +171,21 @@ [% IF comment_text.search("(?:^>|\n>)") %] [wrap] + onclick="return toggleCommentWrap(this, [% comment.count %])">wrap] [% END %] [% IF bug.check_can_change_field('longdesc', 1, 0) %] + [% IF user.can_tag_comments %] + [tag] + [% END %] [reply] [% END %] - [% END %] @@ -190,7 +197,7 @@
@@ -198,7 +205,7 @@ + href="show_bug.cgi?id=[% bug.bug_id %]#c[% comment.count %]"> [%- comment_label FILTER html %] @@ -236,11 +243,30 @@ [% 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 696d0739f..fb596f7a7 100644 --- a/template/en/default/bug/edit.html.tmpl +++ b/template/en/default/bug/edit.html.tmpl @@ -30,6 +30,31 @@ [% PROCESS bug/time.html.tmpl %] +[% IF Param('comment_taggers_group') %] + [% IF user.can_tag_comments %] +
+ x +
+ + +
+   +
+
+ x + +
+ [% END %] + [% IF user.id %] + + [% END %] +[% END %] +