summaryrefslogtreecommitdiffstats
path: root/extensions/BMO/template/en/default/hook/bug_modal/edit-custom_field-cf_crash_signature.html.tmpl
blob: cd826ed8be1990394299d9ef29c84c78a0bfe99c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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 %]