From 4c9afb9aa9c3fa8cb16824a7a032d560f5780403 Mon Sep 17 00:00:00 2001 From: Anthony Hughes Date: Wed, 25 Oct 2017 09:30:40 -0700 Subject: Bug 1332016 - Integrate the Socorro Lens into Bug Modal --- .../edit-custom_field-cf_crash_signature.html.tmpl | 37 +++++++++++----------- 1 file changed, 18 insertions(+), 19 deletions(-) (limited to 'extensions/BMO') diff --git a/extensions/BMO/template/en/default/hook/bug_modal/edit-custom_field-cf_crash_signature.html.tmpl b/extensions/BMO/template/en/default/hook/bug_modal/edit-custom_field-cf_crash_signature.html.tmpl index cdf2c10df..4a5d742f5 100644 --- a/extensions/BMO/template/en/default/hook/bug_modal/edit-custom_field-cf_crash_signature.html.tmpl +++ b/extensions/BMO/template/en/default/hook/bug_modal/edit-custom_field-cf_crash_signature.html.tmpl @@ -13,26 +13,25 @@ field_type = field.type hide_on_view = bug.${field.name} == "" || bug.${field.name} == "---"; %] - [% - IF split_cf_crash_signature.size; - FOREACH sig IN split_cf_crash_signature; - "
"; - IF sig.match('^\[\@\s*') && sig.match('\s*\]$'); - sig = sig.replace('(^\[\@\s*|\s*\]$)', ''); - %] + [% IF split_cf_crash_signature.size %] + [% FOREACH sig IN split_cf_crash_signature %] +
+ [% IF sig.match('^\[\@\s*') && sig.match('\s*\]$') %] + [% sig = sig.replace('(^\[\@\s*|\s*\]$)', '') %] [@ [% sig FILTER html %] ] - [% - ELSE; - sig FILTER html; - END; - "
"; - END; - ELSIF value; - %] - [% value FILTER html FILTER html_line_break %] - [% - END - %] + [% ELSE %] + [% sig FILTER html %] + [% END %] +
+ [% END %] + [%# socorro_lens_url() is defined in Bugzilla/Template.pm %] + [% SET lens_url = socorro_lens_url(split_cf_crash_signature) %] + [% IF lens_url %] + + [% END %] + [% ELSIF value %] + [% value FILTER html FILTER html_line_break %] + [% END %] [% END %] -- cgit v1.2.3-24-g4f1b