summaryrefslogtreecommitdiffstats
path: root/extensions/Review/template/en/default
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
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')
-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
-rw-r--r--extensions/Review/template/en/default/pages/review_requests_rebuild.html.tmpl23
4 files changed, 64 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 %]
diff --git a/extensions/Review/template/en/default/pages/review_requests_rebuild.html.tmpl b/extensions/Review/template/en/default/pages/review_requests_rebuild.html.tmpl
new file mode 100644
index 000000000..5ec811126
--- /dev/null
+++ b/extensions/Review/template/en/default/pages/review_requests_rebuild.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.
+ #%]
+
+[% INCLUDE global/header.html.tmpl
+ title = "Review Requests Rebuild"
+%]
+
+[% IF rebuild %]
+ Counters rebuilt for [% total FILTER html %] users.
+[% ELSE %]
+ <form method="post">
+ <input type="hidden" name="id" value="review_requests_rebuild.html">
+ <input type="hidden" name="rebuild" value="1">
+ <input type="submit" value="Rebuild Review Request Counters">
+ </form>
+[% END %]
+
+[% INCLUDE global/footer.html.tmpl %]