From 58787923c838e5a1fc90d3f98e27a443bb1e1122 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Wed, 30 Sep 2009 22:39:28 +0000 Subject: Bug 509053: Implement Bugzilla->feature (feature_enabled in the templates), and use it to detect when PatchReader is available. Patch by Max Kanat-Alexander r=LpSolit, a=LpSolit --- template/en/default/attachment/edit.html.tmpl | 8 ++++---- template/en/default/attachment/list.html.tmpl | 2 +- template/en/default/global/code-error.html.tmpl | 6 ++++++ 3 files changed, 11 insertions(+), 5 deletions(-) (limited to 'template/en') diff --git a/template/en/default/attachment/edit.html.tmpl b/template/en/default/attachment/edit.html.tmpl index fadf3e308..bbdf24866 100644 --- a/template/en/default/attachment/edit.html.tmpl +++ b/template/en/default/attachment/edit.html.tmpl @@ -40,7 +40,7 @@ %] [%# No need to display the Diff button and iframe if the attachment is not a patch. %] -[% patchviewerinstalled = (patchviewerinstalled && attachment.ispatch) %] +[% use_patchviewer = (feature_enabled('patch_viewer') && attachment.ispatch) %]
@@ -127,7 +127,7 @@

Actions: View - [% IF attachment.ispatch && patchviewerinstalled %] + [% IF use_patchviewer %] | Diff [% END %] [% IF Param("allow_attachment_deletion") @@ -183,14 +183,14 @@ var patchviewerinstalled = 0; var attachment_id = [% attachment.id %]; if (typeof document.getElementById == "function") { -[% IF patchviewerinstalled %] +[% IF use_patchviewer %] var patchviewerinstalled = 1; document.write('