From bff9f8e135cdf6e72228d7502cf160b3bdd9bde4 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Tue, 22 Jul 2014 15:23:21 +0800 Subject: Bug 713307: Please add FlagTypeComments for tracking/approval flags --- .../hook/bug/edit-after_custom_fields.html.tmpl | 70 ++++++++++------------ .../en/default/hook/global/header-start.html.tmpl | 11 ++++ 2 files changed, 42 insertions(+), 39 deletions(-) create mode 100644 extensions/TrackingFlags/template/en/default/hook/global/header-start.html.tmpl (limited to 'extensions/TrackingFlags/template/en/default/hook') diff --git a/extensions/TrackingFlags/template/en/default/hook/bug/edit-after_custom_fields.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/bug/edit-after_custom_fields.html.tmpl index e0411b512..b66bd3df4 100644 --- a/extensions/TrackingFlags/template/en/default/hook/bug/edit-after_custom_fields.html.tmpl +++ b/extensions/TrackingFlags/template/en/default/hook/bug/edit-after_custom_fields.html.tmpl @@ -6,49 +6,41 @@ # defined by the Mozilla Public License, v. 2.0. #%] -[% IF tracking_flags.size %] - [% FOREACH type = tracking_flag_types %] - [% flag_list = [] %] - [% FOREACH flag = tracking_flags %] - [% flag_list.push(flag) IF flag.flag_type == type.name %] - [% END %] - [% IF flag_list.size %] - - - - - - [% IF bug.check_can_change_field('flagtypes.name', 0, 1) %] - [% IF user.id && type.collapsed %] - - (edit) - - [% END %] - - [% INCLUDE bug/tracking_flags.html.tmpl - flag_list = flag_list %] -
- [% IF type.collapsed %] - - [% END %] - [% ELSE %] - [% FOREACH flag = flag_list %] - [% NEXT IF flag.status == '---' %] - [% flag.description FILTER html %]: [% flag.bug_flag.value FILTER html %]
- [% END %] +[% RETURN UNLESS tracking_flags.size %] + +[% FOREACH type = tracking_flag_types %] + [% flag_list = [] %] + [% FOREACH flag = tracking_flags %] + [% flag_list.push(flag) IF flag.flag_type == type.name %] + [% END %] + [% IF flag_list.size %] + + + + + + [% IF bug.check_can_change_field('flagtypes.name', 0, 1) %] + [% IF user.id && type.collapsed %] + + (edit) + + [% END %] + + [% INCLUDE bug/tracking_flags.html.tmpl + flag_list = flag_list %] +
+ [% ELSE %] + [% FOREACH flag = flag_list %] + [% NEXT IF flag.status == '---' %] + [% flag.description FILTER html %]: [% flag.bug_flag.value FILTER html %]
[% END %] - - - [% END %] + [% END %] + + [% END %] [% END %] diff --git a/extensions/TrackingFlags/template/en/default/hook/global/header-start.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/global/header-start.html.tmpl new file mode 100644 index 000000000..2bf1c75c3 --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/global/header-start.html.tmpl @@ -0,0 +1,11 @@ +[%# 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. + #%] + +[% IF template.name == "bug/create/create.html.tmpl" && tracking_flags.size %] + [% javascript_urls.push('extensions/TrackingFlags/web/js/tracking_flags.js') %] +[% END %] -- cgit v1.2.3-24-g4f1b