From 7a433d35a38ad8978081012255e36ccf13700123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Buclin?= Date: Fri, 25 Oct 2024 14:08:47 +0200 Subject: Split long lines of CVE's in bug reports (mga #33677) --- .../en/default/hook/bug/comments-a_comment-end.html.tmpl | 3 +++ .../en/default/hook/bug/field-start_field_column.html.tmpl | 12 ++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 extensions/Mageia/template/en/default/hook/bug/field-start_field_column.html.tmpl diff --git a/extensions/Mageia/template/en/default/hook/bug/comments-a_comment-end.html.tmpl b/extensions/Mageia/template/en/default/hook/bug/comments-a_comment-end.html.tmpl index cbe11b4ca..668c3e8e9 100644 --- a/extensions/Mageia/template/en/default/hook/bug/comments-a_comment-end.html.tmpl +++ b/extensions/Mageia/template/en/default/hook/bug/comments-a_comment-end.html.tmpl @@ -67,6 +67,9 @@ change.fieldname == 'cc' || change.fieldname == 'flagtypes.name' %] [% display_value(change.fieldname, value) FILTER email FILTER html %] + [% ELSIF change.fieldname == 'cf_cve' %] + [%# Split long lists of CVE's on multiple lines %] + [% display_value(change.fieldname, value.replace(',', ', ')) FILTER html FILTER html_line_break %] [% ELSE %] [% display_value(change.fieldname, value) FILTER html FILTER html_line_break %] [% END %] diff --git a/extensions/Mageia/template/en/default/hook/bug/field-start_field_column.html.tmpl b/extensions/Mageia/template/en/default/hook/bug/field-start_field_column.html.tmpl new file mode 100644 index 000000000..d4dd4ee60 --- /dev/null +++ b/extensions/Mageia/template/en/default/hook/bug/field-start_field_column.html.tmpl @@ -0,0 +1,12 @@ +[%# 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. + #%] + +[%# Split long lists of CVE's on multiple lines %] +[% IF field.name == 'cf_cve' AND NOT editable %] + [% SET value = value.replace(',', ', ') %] +[% END %] -- cgit v1.2.1