From 74c6f9974fddc33163ae78c5927c6569f2eb28c0 Mon Sep 17 00:00:00 2001
From: Byron Jones
Date: Wed, 23 Mar 2016 11:25:52 +0800
Subject: Bug 1251236 - Please show the diff on the attachment details page
when a patch has been reviewed in MozReview
---
.../en/default/hook/attachment/edit-view.html.tmpl | 16 +++
template/en/default/attachment/edit.html.tmpl | 135 +++++++++++----------
2 files changed, 86 insertions(+), 65 deletions(-)
create mode 100644 extensions/MozReview/template/en/default/hook/attachment/edit-view.html.tmpl
diff --git a/extensions/MozReview/template/en/default/hook/attachment/edit-view.html.tmpl b/extensions/MozReview/template/en/default/hook/attachment/edit-view.html.tmpl
new file mode 100644
index 000000000..571d69b50
--- /dev/null
+++ b/extensions/MozReview/template/en/default/hook/attachment/edit-view.html.tmpl
@@ -0,0 +1,16 @@
+[%# 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 attachment.mimetype == "text/x-review-board-request" && attachment.external_redirect;
+ custom_attachment_viewer = 1;
+ url = attachment.data;
+%]
+
diff --git a/template/en/default/attachment/edit.html.tmpl b/template/en/default/attachment/edit.html.tmpl
index 8dc29c1e6..c7d85e270 100644
--- a/template/en/default/attachment/edit.html.tmpl
+++ b/template/en/default/attachment/edit.html.tmpl
@@ -175,73 +175,78 @@
[% ELSIF attachment.is_viewable %]
-
+ [% END %]
[% ELSE %]