From f30b939630917a63bc733e3963869643eeccdc90 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Thu, 11 Aug 2011 16:08:16 -0400 Subject: Bug 655522 - Severity values no longer defined in fields.html --- extensions/BMO/Extension.pm | 7 ++++- .../en/default/hook/bug/field-help-end.none.tmpl | 31 +++++++++++----------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm index f9ee38563..79edaad3e 100644 --- a/extensions/BMO/Extension.pm +++ b/extensions/BMO/Extension.pm @@ -148,7 +148,12 @@ sub page_before_template { }; } elsif ($page eq 'fields.html') { - $vars->{'fields_page'} = 1; + # Recently global/field-descs.none.tmpl and bug/field-help.none.tmpl + # were changed for better performance and are now only loaded once. + # I have not found an easy way to allow our hook template to check if + # it is called from pages/fields.html.tmpl. So we set a value in request_cache + # that our hook template can see. + Bugzilla->request_cache->{'bmo_fields_page'} = 1; } elsif ($page eq 'remo-form-payment.html') { _remo_form_payment($vars); diff --git a/extensions/BMO/template/en/default/hook/bug/field-help-end.none.tmpl b/extensions/BMO/template/en/default/hook/bug/field-help-end.none.tmpl index d95d1b606..70132d7e0 100644 --- a/extensions/BMO/template/en/default/hook/bug/field-help-end.none.tmpl +++ b/extensions/BMO/template/en/default/hook/bug/field-help-end.none.tmpl @@ -18,7 +18,8 @@ # Dave Lawrence #%] -[% IF fields_page %] +[% USE Bugzilla %] +[% IF Bugzilla.request_cache.bmo_fields_page %] [% filtered_severity_blocker = display_value("bug_severity", "blocker") FILTER html %] [% filtered_severity_critical = display_value("bug_severity", "critical") FILTER html %] [% filtered_severity_major = display_value("bug_severity", "major") FILTER html %] @@ -26,27 +27,27 @@ [% filtered_severity_minor = display_value("bug_severity", "minor") FILTER html %] [% filtered_severity_trivial = display_value("bug_severity", "trivial") FILTER html %] [% filtered_severity_enhancement = display_value("bug_severity", "enhancement") FILTER html %] - + [% filtered_platform_all = display_value("rep_platform", "All") FILTER html %] [% filtered_platform_x86_64 = display_value("rep_platform", "x86_64") FILTER html %] [% filtered_platform_arm = display_value("rep_platform", "ARM") FILTER html %] - + [% filtered_opsys_all = display_value("op_sys", "All") FILTER html %] [% filtered_opsys_windows = display_value("op_sys", "Windows 7") FILTER html %] [% filtered_opsys_mac = display_value("op_sys", "Mac OS X") FILTER html %] [% filtered_opsys_linux = display_value("op_sys", "Linux") FILTER html %] - + [% filtered_status_new = display_value("bug_status", "NEW") FILTER html %] - + [% - help_html.priority = + vars.help_html.priority = "This field describes the importance and order in which $terms.abug should be fixed compared to other ${terms.bugs}. This field is utilized by the programmers/engineers to prioritize their work to be done." - - help_html.bug_severity = + + vars.help_html.bug_severity = "This field describes the impact of ${terms.abug}. - +
@@ -77,8 +78,8 @@
$filtered_severity_blocker Blocks development and/or testing work$filtered_severity_enhancement Request for enhancement
" - - help_html.rep_platform = + + vars.help_html.rep_platform = "This is the hardware platform against which the $terms.bug was reported. Legal platforms include: