File tree Expand file tree Collapse file tree 10 files changed +113
-37
lines changed
BugModal/template/en/default/bug_modal Expand file tree Collapse file tree 10 files changed +113
-37
lines changed Original file line number Diff line number Diff line change 930930 [% END %]
931931[% END %]
932932
933+ [%# === extensions which are modules === %]
934+
935+ [% Hook.process('module') %]
936+
933937[%# === attachments === %]
934938
935939[% IF active_attachments || obsolete_attachments %]
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ package Bugzilla::Extension::MozReview;
99
1010use 5.10.1;
1111use strict;
12+ use warnings;
1213use parent qw( Bugzilla::Extension) ;
1314
1415use Bugzilla::Attachment;
@@ -22,7 +23,7 @@ sub template_before_process {
2223 my $vars = $args -> {' vars' };
2324
2425 return unless (($file eq ' bug/show-header.html.tmpl' ||
25- $file eq ' bug/edit .html.tmpl' ||
26+ $file eq ' bug_modal/header .html.tmpl' ||
2627 $file eq ' attachment/create.html.tmpl' ) &&
2728 Bugzilla-> params-> {mozreview_base_url });
2829
Original file line number Diff line number Diff line change 66 # defined by the Mozilla Public License, v. 2.0.
77 #%]
88
9- [% USE Bugzilla %]
10- [% cgi = Bugzilla.cgi %]
11-
129[% RETURN UNLESS mozreview %]
1310
14- <br>
15- <table
16- class="mozreview-table"
17- data-mozreview-url="[% Bugzilla.params.mozreview_base_url FILTER html %]">
11+ <table class="mozreview-table">
1812 <thead>
1913 <tr>
2014 <th>MozReview Requests</th>
2418 <tbody>
2519 <tr>
2620 <td>
27- <table class="mozreview-requests">
28- <thead>
29- <th>Commit</th>
30- <th>Status</th>
31- <th>Open Issues</th>
32- <th>Last Updated</th>
33- </thead>
34- [% FOREACH rrid IN review_request_ids %]
35- [%# rrid is guaranteed to be an integer %]
36- <tbody class="mozreview-request"
37- data-rrid="[% rrid FILTER none %]">
38- <tr class="mozreview-loading-row">
39- <td colspan="4">Loading...</td>
40- </tr>
41- <tr class="mozreview-loading-error-row bz_default_hidden">
42- <td colspan="4">Error loading review
43- request <span class="mozreview-load-error-rrid"></span>:
44- <span class="mozreview-load-error-string"></span></td>
45- </tr>
46- </tbody>
47- [% END %]
48- </table>
21+ [% INCLUDE moz_review/table.html.tmpl %]
4922 </td>
5023 </tr>
5124 </tbody>
Original file line number Diff line number Diff line change 66 # defined by the Mozilla Public License, v. 2.0.
77 #%]
88
9- [% RETURN UNLESS mozreview %]
10-
11- [% style_urls.push('extensions/MozReview/web/style/mozreview.css') %]
12- [% javascript_urls.push('extensions/MozReview/web/js/mozreview.js') %]
9+ [%
10+ IF mozreview;
11+ PROCESS moz_review/header.html.tmpl;
12+ END;
13+ %]
Original file line number Diff line number Diff line change 1+ [%# This Source Code Form is subject to the terms of the Mozilla Public
2+ # License, v. 2.0. If a copy of the MPL was not distributed with this
3+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4+ #
5+ # This Source Code Form is "Incompatible With Secondary Licenses", as
6+ # defined by the Mozilla Public License, v. 2.0.
7+ #%]
8+
9+ [% RETURN UNLESS mozreview %]
10+
11+ [% WRAPPER bug_modal/module.html.tmpl
12+ title = "MozReview Requests"
13+ collapsed = 0
14+ %]
15+ [% INCLUDE moz_review/table.html.tmpl %]
16+ <div class="mozreview-hide-discarded-row bz_default_hidden">
17+ <button type="button" class="minor mozreview-hide-discarded-link">
18+ <span class="mozreview-discarded-action">Show</span> discarded requests
19+ </button>
20+ </div>
21+ [% END %]
Original file line number Diff line number Diff line change 1+ [%# This Source Code Form is subject to the terms of the Mozilla Public
2+ # License, v. 2.0. If a copy of the MPL was not distributed with this
3+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4+ #
5+ # This Source Code Form is "Incompatible With Secondary Licenses", as
6+ # defined by the Mozilla Public License, v. 2.0.
7+ #%]
8+
9+ [%
10+ IF mozreview;
11+ PROCESS moz_review/header.html.tmpl;
12+ END;
13+ %]
Original file line number Diff line number Diff line change 1+ [%# This Source Code Form is subject to the terms of the Mozilla Public
2+ # License, v. 2.0. If a copy of the MPL was not distributed with this
3+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4+ #
5+ # This Source Code Form is "Incompatible With Secondary Licenses", as
6+ # defined by the Mozilla Public License, v. 2.0.
7+ #%]
8+
9+ [% style_urls.push('extensions/MozReview/web/style/mozreview.css') %]
10+ [% javascript_urls.push('extensions/MozReview/web/js/mozreview.js') %]
Original file line number Diff line number Diff line change 1+ [%# This Source Code Form is subject to the terms of the Mozilla Public
2+ # License, v. 2.0. If a copy of the MPL was not distributed with this
3+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4+ #
5+ # This Source Code Form is "Incompatible With Secondary Licenses", as
6+ # defined by the Mozilla Public License, v. 2.0.
7+ #%]
8+
9+ <table class="mozreview-requests" data-mozreview-url="[% Bugzilla.params.mozreview_base_url FILTER html %]">
10+ <thead>
11+ <th>Commit</th>
12+ <th>Status</th>
13+ <th>Open Issues</th>
14+ <th>Last Updated</th>
15+ </thead>
16+ [% FOREACH rrid IN review_request_ids %]
17+ [%# rrid is guaranteed to be an integer %]
18+ <tbody class="mozreview-request"
19+ data-rrid="[% rrid FILTER none %]">
20+ <tr class="mozreview-loading-row">
21+ <td colspan="4">Loading...</td>
22+ </tr>
23+ <tr class="mozreview-loading-error-row bz_default_hidden">
24+ <td colspan="4">Error loading review
25+ request <span class="mozreview-load-error-rrid"></span>:
26+ <span class="mozreview-load-error-string"></span></td>
27+ </tr>
28+ </tbody>
29+ [% END %]
30+ </table>
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ MozReview.elapsedTime = function(d) {
4646} ;
4747
4848MozReview . getReviewRequest = function ( ) {
49- var hostUrl = $ ( '.mozreview-table ' ) . data ( 'mozreviewUrl' ) ;
49+ var hostUrl = $ ( '.mozreview-requests ' ) . data ( 'mozreviewUrl' ) ;
5050 var tr = $ ( '<tr/>' ) ;
5151 var td = $ ( '<td/>' ) ;
5252
@@ -93,15 +93,15 @@ MozReview.getReviewRequest = function() {
9393 return trCommit ;
9494 }
9595
96- $ ( '.mozreview-hide-discarded-link' ) . click ( function ( ) {
96+ $ ( '.mozreview-hide-discarded-link' ) . click ( function ( event ) {
97+ event . preventDefault ( ) ;
9798 if ( $ ( '.bz_default_hidden.mozreview-discarded-request' ) . length ) {
9899 $ ( '.mozreview-discarded-request' ) . removeClass ( 'bz_default_hidden' ) ;
99100 $ ( '.mozreview-discarded-action' ) . text ( 'Hide' ) ;
100101 } else {
101102 $ ( '.mozreview-discarded-request' ) . addClass ( 'bz_default_hidden' ) ;
102103 $ ( '.mozreview-discarded-action' ) . text ( 'Show' ) ;
103104 }
104- return false ;
105105 } ) ;
106106
107107 $ ( '.mozreview-request' ) . each ( function ( ) {
Original file line number Diff line number Diff line change 5252.mozreview-child-request-summary {
5353 text-indent : 1em ;
5454}
55+
56+ /* bug-modal specific */
57+
58+ # module-mozreview-requests .module-content {
59+ padding : 0 ;
60+ }
61+
62+ .bug_modal .mozreview-table {
63+ width : 100% ;
64+ }
65+
66+ .bug_modal .mozreview-request td {
67+ padding-left : 8px ;
68+ }
69+
70+ .bug_modal .mozreview-requests th {
71+ text-align : left;
72+ padding-left : 8px ;
73+ }
74+
75+ .bug_modal .mozreview-hide-discarded-row {
76+ padding : 4px ;
77+ }
You can’t perform that action at this time.
0 commit comments