diff options
author | David Lawrence <dkl@mozilla.com> | 2016-07-12 16:44:03 +0200 |
---|---|---|
committer | David Lawrence <dkl@mozilla.com> | 2016-07-12 16:44:03 +0200 |
commit | dc519b098fac5c18b3807e8a7dfd37334799c951 (patch) | |
tree | adfca05db74f5f84399520f147bc10ba786c51f1 /extensions/Splinter/template | |
parent | b823202cd93b41b0cf68776a42825f8943f7d7e0 (diff) | |
download | bugzilla-dc519b098fac5c18b3807e8a7dfd37334799c951.tar.gz bugzilla-dc519b098fac5c18b3807e8a7dfd37334799c951.tar.xz |
Bug 1283649 - When an attachment is a github pull request link, the pull request diff should be displayed in the edit page
Diffstat (limited to 'extensions/Splinter/template')
3 files changed, 15 insertions, 13 deletions
diff --git a/extensions/Splinter/template/en/default/hook/attachment/edit-action.html.tmpl b/extensions/Splinter/template/en/default/hook/attachment/edit-action.html.tmpl index 7648e1d76..6100deeb7 100644 --- a/extensions/Splinter/template/en/default/hook/attachment/edit-action.html.tmpl +++ b/extensions/Splinter/template/en/default/hook/attachment/edit-action.html.tmpl @@ -19,7 +19,8 @@ # David Lawrence <dkl@mozilla.com> #%] -[% IF attachment.ispatch %] +[% IF attachment.ispatch + || (attachment.mimetype == "text/x-github-pull-request" && attachment.external_redirect) %]   | <a href="[% Bugzilla.splinter_review_url(attachment.bug_id, attachment.id) FILTER none %]">Review</a> [% END %] diff --git a/extensions/Splinter/template/en/default/hook/attachment/list-action.html.tmpl b/extensions/Splinter/template/en/default/hook/attachment/list-action.html.tmpl index ee793b192..e22151b50 100644 --- a/extensions/Splinter/template/en/default/hook/attachment/list-action.html.tmpl +++ b/extensions/Splinter/template/en/default/hook/attachment/list-action.html.tmpl @@ -19,7 +19,8 @@ # David Lawrence <dkl@mozilla.com> #%] -[% IF attachment.ispatch %] +[% IF attachment.ispatch + || (attachment.mimetype == "text/x-github-pull-request" && attachment.can_review) %]   | - <a href="[% Bugzilla.splinter_review_url(bugid, attachment.id) FILTER none %]">Review</a> + <a href="[% Bugzilla.splinter_review_url(bugid, attachment.id) FILTER none %]">Splinter Review</a> [% END %] diff --git a/extensions/Splinter/template/en/default/pages/splinter.html.tmpl b/extensions/Splinter/template/en/default/pages/splinter.html.tmpl index 16d312759..9ecaded3f 100644 --- a/extensions/Splinter/template/en/default/pages/splinter.html.tmpl +++ b/extensions/Splinter/template/en/default/pages/splinter.html.tmpl @@ -34,7 +34,7 @@ "skins/custom/bug_groups.css" ] javascript_urls = [ "js/yui/element/element-min.js", "js/yui/container/container-min.js", - "js/yui/button/button-min.js", + "js/yui/button/button-min.js", "js/yui/json/json-min.js", "js/yui/datasource/datasource-min.js", "js/yui/datatable/datatable-min.js", @@ -86,11 +86,11 @@ [% END %] [% FOREACH attachment = bug.attachments %] - [% NEXT IF attachment.isprivate && !user.is_insider && attachment.attacher.id != user.id %] - [% NEXT IF !attachment.ispatch %] + [% NEXT IF attachment.isprivate && !user.is_insider && attachment.attacher.id != user.id %] + [% NEXT IF !attachment.ispatch && !(attachment.mimetype == "text/x-github-pull-request" && attachment.external_redirect) %] var attachid = parseInt('[% attachment.id FILTER js %]'); var attachment = new Splinter.Bug.Attachment('', attachid); - [% IF attachment.id == attach_id && attachment.ispatch %] + [% IF attachment.id == attach_id %] [% flag_types = attachment.flag_types %] [% can_edit = attachment.validate_can_edit %] attachment.data = '[% attach_data FILTER js %]'; @@ -102,7 +102,7 @@ attachment.date = Splinter.Bug.parseDate('[% attachment.attached FILTER time("%Y-%m-%d %T %z") FILTER js %]'); attachment.whoName = Splinter.Utils.strip('[% attachment.attacher.name FILTER js %]'); attachment.whoEmail = Splinter.Utils.strip('[% attachment.attacher.email FILTER js %]'); - attachment.isPatch = [% attachment.ispatch ? 1 : 0 %]; + attachment.isPatch = [% attachment.ispatch || (attachment.mimetype == "text/x-github-pull-request" && attachment.external_redirect) ? 1 : 0 %]; attachment.isObsolete = [% attachment.isobsolete ? 1 : 0 %]; attachment.isPrivate = [% attachment.isprivate ? 1 : 0 %]; attachment.isCRLF = [% attach_is_crlf ? 1 : 0 %]; @@ -125,7 +125,7 @@ <a id="allReviewsLink" href="[% Bugzilla.splinter_review_base FILTER none %]"> [reviews]</a> [% END %] - <a id='helpLink' target='splinterHelp' + <a id='helpLink' target='splinterHelp' href="[% urlbase FILTER none %]page.cgi?id=splinter/help.html"> [help]</a> </div> @@ -186,9 +186,9 @@ <li>From the Overview page, you can add a more generic overview comment that will appear at the beginning of your review.</li> <li>To comment on a specific lines in the patch, first select the filename from the file navigation links.</li> <li>Then double click the line you want to review and a comment box will appear below the line.</li> - <li>When the review is complete and you publish it, the overview comment and all line specific comments with their context, + <li>When the review is complete and you publish it, the overview comment and all line specific comments with their context, will be combined together into a single review comment on the [% terms.bug %] report.</li> - <li>For more detailed instructions, read the Splinter + <li>For more detailed instructions, read the Splinter <a id='helpLink' target='splinterHelp' href="[% urlbase FILTER none %]page.cgi?id=splinter/help.html">help page</a>. </li> </ul> @@ -276,12 +276,12 @@ <div id="splinter-files" style="display: none;"> <div id="file-collapse-all" style="display:none;"> <a href="javascript:void(0);" onclick="Splinter.toggleCollapsed('', 'none')">Collapse All</a> | - <a href="javascript:void(0);" onclick="Splinter.toggleCollapsed('', 'block')">Expand All</a> + <a href="javascript:void(0);" onclick="Splinter.toggleCollapsed('', 'block')">Expand All</a> </div> </div> <div id="credits"> - Powered by <a href="http://fishsoup.net/software/splinter">Splinter</a> + Powered by <a href="http://fishsoup.net/software/splinter">Splinter</a> </div> <div id="saveDraftNotice" style="display: none;"></div> |