]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1474809 - add "new to bugzilla" tag to non-comment changes
authorKohei Yoshino <kohei.yoshino@gmail.com>
Mon, 6 Aug 2018 16:23:28 +0000 (12:23 -0400)
committerDylan William Hardison <dylan@hardison.net>
Mon, 6 Aug 2018 16:23:28 +0000 (12:23 -0400)
extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl
extensions/TagNewUsers/template/en/default/hook/bug/changes-user.html.tmpl [new file with mode: 0644]

index 36494773bf699f68db80ae164d07d531300ce47b..08c6b5b64880240a74213a1a5f1b4988ae2062f7 100644 (file)
           [% IF extra_class %]
             <span class="user-role">([% extra_class.ucfirst FILTER none %])</span>
           [% END %]
+          [% Hook.process('user', 'bug/changes.html.tmpl') %]
         </td>
         <td class="comment-actions">
           <button type="button" class="change-spinner minor" id="as-[% id FILTER none %]">-</button>
diff --git a/extensions/TagNewUsers/template/en/default/hook/bug/changes-user.html.tmpl b/extensions/TagNewUsers/template/en/default/hook/bug/changes-user.html.tmpl
new file mode 100644 (file)
index 0000000..56657c9
--- /dev/null
@@ -0,0 +1,20 @@
+[%# This Source Code Form is subject to the terms of the Mozilla Public
+  # License, v. 2.0. If a copy of the MPL was not distributed with this
+  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
+  #
+  # This Source Code Form is "Incompatible With Secondary Licenses", as
+  # defined by the Mozilla Public License, v. 2.0.
+  #%]
+
+[% RETURN UNLESS user.in_group('canconfirm') %]
+[% IF action.who.is_new %]
+<span class="new_user" title="
+[%- action.who.comment_count FILTER html %] comment[% "s" IF action.who.comment_count != 1 -%]
+, created [%
+IF action.who.creation_age == 0 %]today[%
+ELSIF action.who.creation_age > 365 %]more than a year ago[%
+ELSE %][% action.who.creation_age FILTER html %] day[% "s" IF action.who.creation_age != 1 %] ago[% END %]."
+  >
+(New to [% terms.Bugzilla %])
+</span>
+[% END %]