summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-04-28 06:44:41 +0200
committerByron Jones <glob@mozilla.com>2015-04-28 06:44:41 +0200
commit92059de568ef17628928a6cf19d6fca3ee505f2b (patch)
tree00fb913f802252a4a6bb98f69d28c353b1f5ca02
parent29e3eb8b03ba072fa4ce092b45fb98c2e2352744 (diff)
downloadbugzilla-92059de568ef17628928a6cf19d6fca3ee505f2b.tar.gz
bugzilla-92059de568ef17628928a6cf19d6fca3ee505f2b.tar.xz
Bug 1149659: crash signature not linking to signature summary on socorro
-rw-r--r--extensions/BMO/Extension.pm2
-rw-r--r--extensions/BMO/template/en/default/hook/bug_modal/edit-custom_field-cf_crash_signature.html.tmpl38
-rw-r--r--extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl1
-rw-r--r--extensions/BugModal/template/en/default/bug_modal/field.html.tmpl6
4 files changed, 45 insertions, 2 deletions
diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm
index 40a00a625..a1baea7bc 100644
--- a/extensions/BMO/Extension.pm
+++ b/extensions/BMO/Extension.pm
@@ -139,7 +139,7 @@ sub template_before_process {
$vars->{'versions'} = [ reverse @$versions ];
}
}
- elsif ($file eq 'bug/edit.html.tmpl') {
+ elsif ($file eq 'bug/edit.html.tmpl' || $file eq 'bug_modal/edit.html.tmpl') {
$vars->{split_cf_crash_signature} = $self->_split_crash_signature($vars);
}
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
new file mode 100644
index 000000000..cd826ed8b
--- /dev/null
+++ b/extensions/BMO/template/en/default/hook/bug_modal/edit-custom_field-cf_crash_signature.html.tmpl
@@ -0,0 +1,38 @@
+[%# 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.
+ #%]
+
+[%
+ rendered_custom_fields.push('cf_crash_signature');
+ WRAPPER bug_modal/field.html.tmpl
+ field = field
+ 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;
+ "<div>";
+ IF sig.match('^\[\@\s*') && sig.match('\s*\]$');
+ sig = sig.replace('(^\[\@\s*|\s*\]$)', '');
+ %]
+ <a href="https://crash-stats.mozilla.com/report/list?signature=[% sig FILTER uri %]" target="_blank">
+ [@ [% sig FILTER html %] ]
+ </a>
+ [%
+ ELSE;
+ sig FILTER html;
+ END;
+ "</div>";
+ END;
+ ELSIF value;
+ %]
+ <span class="multiline-value">[% value FILTER html FILTER html_line_break %]</span>
+ [%
+ END
+ %]
+[% END %]
diff --git a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
index 54ae9bec0..6649399e1 100644
--- a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
+++ b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
@@ -857,6 +857,7 @@
[%
FOREACH field IN custom_fields;
NEXT IF field.type != constants.FIELD_TYPE_TEXTAREA;
+ Hook.process('custom_field-' _ field.name);
NEXT IF rendered_custom_fields.exists(field.name);
INCLUDE bug_modal/field.html.tmpl
field = field
diff --git a/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl
index d89c22868..089543c39 100644
--- a/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl
+++ b/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl
@@ -220,7 +220,11 @@ END;
[%# text area %]
<button type="button" class="minor edit-textarea-btn [%= "edit-textarea-set-btn" IF value != "" %]"
id="[% name FILTER html %]-edit">Edit</button>
- <span class="multiline-value" id="[% name FILTER html %]-view">[% value FILTER html FILTER html_line_break %]</span>
+ [% IF content.defined && !append_content %]
+ <span id="[% name FILTER html %]-view">[% content FILTER none %]</span>
+ [% ELSE %]
+ <span class="multiline-value" id="[% name FILTER html %]-view">[% value FILTER html FILTER html_line_break %]</span>
+ [% END %]
<textarea id="[% name FILTER html %]" name="[% name FILTER html %]"
rows="10" cols="10" style="display:none">[% value FILTER html %]</textarea>