summaryrefslogtreecommitdiffstats
path: root/extensions/MozReview/template/en/default
diff options
context:
space:
mode:
authorMark Côté <mcote@alumni.uwaterloo.ca>2015-03-05 17:07:27 +0100
committerMark Côté <mcote@alumni.uwaterloo.ca>2015-03-05 17:14:46 +0100
commit7d75b6edad8cf5e312d32859f64e49538b5c79de (patch)
tree3deaa031bb7fab54c498326dc6b33503b35355a0 /extensions/MozReview/template/en/default
parent8d20ba6e2308484b6685c35a832033fcfff89f17 (diff)
downloadbugzilla-7d75b6edad8cf5e312d32859f64e49538b5c79de.tar.gz
bugzilla-7d75b6edad8cf5e312d32859f64e49538b5c79de.tar.xz
Bug 1102428 - Extension to display MozReview data. r=glob
Add an extension called "MozReview" (and an addition hook to bug/edit.html.tmpl) that displays a table of MozReview request summaries on show_bug if there are any MozReview attachments in the current bug.
Diffstat (limited to 'extensions/MozReview/template/en/default')
-rw-r--r--extensions/MozReview/template/en/default/hook/admin/params/editparams-current_panel.html.tmpl11
-rw-r--r--extensions/MozReview/template/en/default/hook/bug/edit-after_bug_data.html.tmpl62
-rw-r--r--extensions/MozReview/template/en/default/hook/bug/show-header-end.html.tmpl12
3 files changed, 85 insertions, 0 deletions
diff --git a/extensions/MozReview/template/en/default/hook/admin/params/editparams-current_panel.html.tmpl b/extensions/MozReview/template/en/default/hook/admin/params/editparams-current_panel.html.tmpl
new file mode 100644
index 000000000..f16aaddb8
--- /dev/null
+++ b/extensions/MozReview/template/en/default/hook/admin/params/editparams-current_panel.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 panel.name == "advanced" %]
+ [% panel.param_descs.mozreview_base_url = 'MozReview Base URL' %]
+[% END -%]
diff --git a/extensions/MozReview/template/en/default/hook/bug/edit-after_bug_data.html.tmpl b/extensions/MozReview/template/en/default/hook/bug/edit-after_bug_data.html.tmpl
new file mode 100644
index 000000000..a2afa0351
--- /dev/null
+++ b/extensions/MozReview/template/en/default/hook/bug/edit-after_bug_data.html.tmpl
@@ -0,0 +1,62 @@
+[%# 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.
+ #%]
+
+[% USE Bugzilla %]
+[% cgi = Bugzilla.cgi %]
+
+[% RETURN UNLESS mozreview %]
+
+<br>
+<table
+ class="mozreview-table"
+ data-mozreview-url="[% Bugzilla.params.mozreview_base_url FILTER html %]">
+ <thead>
+ <tr>
+ <th>MozReview Requests</th>
+ </tr>
+ </thead>
+
+ <tbody>
+ <tr>
+ <td>
+ <table class="mozreview-requests">
+ <thead>
+ <th>Commit</th>
+ <th>Status</th>
+ <th>Open Issues</th>
+ <th>Last Updated</th>
+ </thead>
+ [% FOREACH rrid IN review_request_ids %]
+ [%# rrid is guaranteed to be an integer %]
+ <tbody class="mozreview-request"
+ data-rrid="[% rrid FILTER none %]">
+ <tr class="mozreview-loading-row">
+ <td colspan="4">Loading...</td>
+ </tr>
+ <tr class="mozreview-loading-error-row bz_default_hidden">
+ <td colspan="4">Error loading review
+ request <span class="mozreview-load-error-rrid"></span>:
+ <span class="mozreview-load-error-string"></span></td>
+ </tr>
+ </tbody>
+ [% END %]
+ </table>
+ </td>
+ </tr>
+ </tbody>
+
+ <tfoot>
+ <tr class="mozreview-hide-discarded-row bz_default_hidden">
+ <td class="mozreview-hide-discarded">
+ <a class="mozreview-hide-discarded-link"
+ href="#"><span class="mozreview-discarded-action">Show</span>
+ discarded requests</a>
+ </td>
+ </tr>
+ </tfoot>
+</table>
diff --git a/extensions/MozReview/template/en/default/hook/bug/show-header-end.html.tmpl b/extensions/MozReview/template/en/default/hook/bug/show-header-end.html.tmpl
new file mode 100644
index 000000000..995dd8868
--- /dev/null
+++ b/extensions/MozReview/template/en/default/hook/bug/show-header-end.html.tmpl
@@ -0,0 +1,12 @@
+[%# 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 mozreview %]
+
+[% style_urls.push('extensions/MozReview/web/style/mozreview.css') %]
+[% javascript_urls.push('extensions/MozReview/web/js/mozreview.js') %]