summaryrefslogtreecommitdiffstats
path: root/extensions/Review/template/en/default/hook
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2013-10-31 06:44:10 +0100
committerByron Jones <bjones@mozilla.com>2013-10-31 06:44:10 +0100
commit2c925582f8bd4f6e062dbddabbd424ddfd69debb (patch)
treedac01fccbcbeaa0ff346ab9bd9b2b9114d1503a0 /extensions/Review/template/en/default/hook
parenta37157083da30af1714b1fe0f70daf1348c994d1 (diff)
downloadbugzilla-2c925582f8bd4f6e062dbddabbd424ddfd69debb.tar.gz
bugzilla-2c925582f8bd4f6e062dbddabbd424ddfd69debb.tar.xz
Bug 920026: show reminder of pending review, feedback, and needinfo requests in the header
Diffstat (limited to 'extensions/Review/template/en/default/hook')
-rw-r--r--extensions/Review/template/en/default/hook/global/header-message.html.tmpl23
-rw-r--r--extensions/Review/template/en/default/hook/global/header-start.html.tmpl7
-rw-r--r--extensions/Review/template/en/default/hook/global/user-error-auth_failure_object.html.tmpl11
3 files changed, 41 insertions, 0 deletions
diff --git a/extensions/Review/template/en/default/hook/global/header-message.html.tmpl b/extensions/Review/template/en/default/hook/global/header-message.html.tmpl
new file mode 100644
index 000000000..33e899492
--- /dev/null
+++ b/extensions/Review/template/en/default/hook/global/header-message.html.tmpl
@@ -0,0 +1,23 @@
+[%# 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.review_request_count
+ || user.feedback_request_count
+ || user.needinfo_request_count
+%]
+
+<span id="badge" title="Flags requested of you:
+ [%- " review (" _ user.review_request_count _ ")" IF user.review_request_count -%]
+ [%- " feedback (" _ user.feedback_request_count _ ")" IF user.feedback_request_count -%]
+ [%- " needinfo (" _ user.needinfo_request_count _ ")" IF user.needinfo_request_count -%]
+">
+ <a href="request.cgi?action=queue&amp;requestee=[% user.login FILTER uri %]&amp;group=type">
+ [%- user.review_request_count + user.feedback_request_count + user.needinfo_request_count ~%]
+ </a>
+</span>
diff --git a/extensions/Review/template/en/default/hook/global/header-start.html.tmpl b/extensions/Review/template/en/default/hook/global/header-start.html.tmpl
index e086e9b55..585041e99 100644
--- a/extensions/Review/template/en/default/hook/global/header-start.html.tmpl
+++ b/extensions/Review/template/en/default/hook/global/header-start.html.tmpl
@@ -6,6 +6,13 @@
# defined by the Mozilla Public License, v. 2.0.
#%]
+[% IF user.review_request_count
+ || user.feedback_request_count
+ || user.needinfo_request_count
+%]
+ [% style_urls.push('extensions/Review/web/styles/badge.css') %]
+[% END %]
+
[% RETURN UNLESS template.name == 'attachment/edit.html.tmpl'
|| template.name == 'attachment/create.html.tmpl'
|| template.name == 'attachment/diff-header.html.tmpl'
diff --git a/extensions/Review/template/en/default/hook/global/user-error-auth_failure_object.html.tmpl b/extensions/Review/template/en/default/hook/global/user-error-auth_failure_object.html.tmpl
new file mode 100644
index 000000000..156f0aa93
--- /dev/null
+++ b/extensions/Review/template/en/default/hook/global/user-error-auth_failure_object.html.tmpl
@@ -0,0 +1,11 @@
+[%# 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.
+ #%]
+
+[% IF object == 'review_requests_rebuild' %]
+ rebuild review request counters
+[% END %]