From 701e41d96429e68d8989b2063d02cd0d20a229ea Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Thu, 25 Jul 2013 14:55:15 +0800 Subject: Bug 750742: Create new BMO extension called TrackingFlags to move current tracking flags away from custom fields --- .../en/default/bug/tracking_flags.html.tmpl | 57 ++++++ .../hook/admin/admin-end_links_right.html.tmpl | 18 ++ .../hook/bug/create/create-bug_flags_end.html.tmpl | 33 ++++ .../default/hook/bug/create/create-form.html.tmpl | 63 +++++++ .../bug/create/create-project_flags_end.html.tmpl | 18 ++ .../bug/create/create-tracking_flags_end.html.tmpl | 18 ++ .../create/create-winqual-bug_flags_end.html.tmpl | 33 ++++ .../create-winqual-project_flags_end.html.tmpl | 18 ++ .../create-winqual-tracking_flags_end.html.tmpl | 18 ++ .../hook/bug/edit-after_custom_fields.html.tmpl | 191 ++++++++++++++++++++ .../en/default/hook/bug/field-editable.html.tmpl | 38 ++++ .../default/hook/bug/field-non_editable.html.tmpl | 9 + .../en/default/hook/bug/show-header-end.html.tmpl | 10 ++ .../hook/global/code-error-errors.html.tmpl | 26 +++ .../hook/global/messages-messages.html.tmpl | 15 ++ .../hook/global/user-error-errors.html.tmpl | 57 ++++++ .../pages/tracking_flags_admin_edit.html.tmpl | 194 +++++++++++++++++++++ .../pages/tracking_flags_admin_list.html.tmpl | 56 ++++++ 18 files changed, 872 insertions(+) create mode 100644 extensions/TrackingFlags/template/en/default/bug/tracking_flags.html.tmpl create mode 100644 extensions/TrackingFlags/template/en/default/hook/admin/admin-end_links_right.html.tmpl create mode 100644 extensions/TrackingFlags/template/en/default/hook/bug/create/create-bug_flags_end.html.tmpl create mode 100644 extensions/TrackingFlags/template/en/default/hook/bug/create/create-form.html.tmpl create mode 100644 extensions/TrackingFlags/template/en/default/hook/bug/create/create-project_flags_end.html.tmpl create mode 100644 extensions/TrackingFlags/template/en/default/hook/bug/create/create-tracking_flags_end.html.tmpl create mode 100644 extensions/TrackingFlags/template/en/default/hook/bug/create/create-winqual-bug_flags_end.html.tmpl create mode 100644 extensions/TrackingFlags/template/en/default/hook/bug/create/create-winqual-project_flags_end.html.tmpl create mode 100644 extensions/TrackingFlags/template/en/default/hook/bug/create/create-winqual-tracking_flags_end.html.tmpl create mode 100644 extensions/TrackingFlags/template/en/default/hook/bug/edit-after_custom_fields.html.tmpl create mode 100644 extensions/TrackingFlags/template/en/default/hook/bug/field-editable.html.tmpl create mode 100644 extensions/TrackingFlags/template/en/default/hook/bug/field-non_editable.html.tmpl create mode 100644 extensions/TrackingFlags/template/en/default/hook/bug/show-header-end.html.tmpl create mode 100644 extensions/TrackingFlags/template/en/default/hook/global/code-error-errors.html.tmpl create mode 100644 extensions/TrackingFlags/template/en/default/hook/global/messages-messages.html.tmpl create mode 100644 extensions/TrackingFlags/template/en/default/hook/global/user-error-errors.html.tmpl create mode 100644 extensions/TrackingFlags/template/en/default/pages/tracking_flags_admin_edit.html.tmpl create mode 100644 extensions/TrackingFlags/template/en/default/pages/tracking_flags_admin_list.html.tmpl (limited to 'extensions/TrackingFlags/template') diff --git a/extensions/TrackingFlags/template/en/default/bug/tracking_flags.html.tmpl b/extensions/TrackingFlags/template/en/default/bug/tracking_flags.html.tmpl new file mode 100644 index 000000000..b2b6efca7 --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/bug/tracking_flags.html.tmpl @@ -0,0 +1,57 @@ +[%# 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. + #%] + +[% FOREACH flag = flag_list %] + [% SET bug_id = bug.defined ? bug.id : 0 %] + [% SET flag_bug_value = flag.bug_flag(bug_id).value %] + [% NEXT IF !new_bug && (!user.id && flag_bug_value == '---') %] + + + + + + [% IF user.id %] + + + + [% IF !new_bug && user.id %] + + [% flag_bug_value FILTER html %] + + [% END %] + [% ELSE %] + [% flag_bug_value FILTER html %] + [% END %] + + +[% END %] diff --git a/extensions/TrackingFlags/template/en/default/hook/admin/admin-end_links_right.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/admin/admin-end_links_right.html.tmpl new file mode 100644 index 000000000..4808da069 --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/admin/admin-end_links_right.html.tmpl @@ -0,0 +1,18 @@ +[%# 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 user.in_group('admin') %] +
+ Release Tracking Flags +
+
+ Tracking flags are special multi-value fields used to aid tracking releases + of Firefox, Firefox OS, Thunderbird, and other projects. +
+[% END %] + diff --git a/extensions/TrackingFlags/template/en/default/hook/bug/create/create-bug_flags_end.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-bug_flags_end.html.tmpl new file mode 100644 index 000000000..2a90cbfe3 --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-bug_flags_end.html.tmpl @@ -0,0 +1,33 @@ +[%# 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. + #%] + +[% RETURN IF NOT tracking_flags.size %] + +[% FOREACH type = tracking_flag_types %] + [% NEXT IF type.name == 'tracking' || type.name == 'project' %] + [% flag_list = [] %] + [% FOREACH flag = tracking_flags %] + [% flag_list.push(flag) IF flag.flag_type == type.name %] + [% END %] + [% IF flag_list.size %] + + + + + + + [% INCLUDE bug/tracking_flags.html.tmpl + flag_list = flag_list + new_bug = 1 %] +
+ [% type.description FILTER html %]: +
+ + + [% END %] +[% END %] diff --git a/extensions/TrackingFlags/template/en/default/hook/bug/create/create-form.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-form.html.tmpl new file mode 100644 index 000000000..59fe1d0ec --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-form.html.tmpl @@ -0,0 +1,63 @@ +[%# 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 tracking_flags.size %] + [% tracking_flag_names = [] %] + [% FOREACH flag = tracking_flags %] + [% tracking_flag_names.push(flag.name) %] + [% END %] + + +[% END %] diff --git a/extensions/TrackingFlags/template/en/default/hook/bug/create/create-project_flags_end.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-project_flags_end.html.tmpl new file mode 100644 index 000000000..662bc26ee --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-project_flags_end.html.tmpl @@ -0,0 +1,18 @@ +[%# 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. + #%] + +[% RETURN IF NOT tracking_flags.size %] + +[% flag_list = [] %] +[% FOREACH flag = tracking_flags %] + [% NEXT IF flag.flag_type != 'project' %] + [% flag_list.push(flag) %] +[% END %] +[% INCLUDE bug/tracking_flags.html.tmpl + flag_list = flag_list + new_bug = 1 %] diff --git a/extensions/TrackingFlags/template/en/default/hook/bug/create/create-tracking_flags_end.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-tracking_flags_end.html.tmpl new file mode 100644 index 000000000..69827a87a --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-tracking_flags_end.html.tmpl @@ -0,0 +1,18 @@ +[%# 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. + #%] + +[% RETURN IF NOT tracking_flags.size %] + +[% flag_list = [] %] +[% FOREACH flag = tracking_flags %] + [% NEXT IF flag.flag_type != 'tracking' %] + [% flag_list.push(flag) %] +[% END %] +[% INCLUDE bug/tracking_flags.html.tmpl + flag_list = flag_list + new_bug = 1 %] diff --git a/extensions/TrackingFlags/template/en/default/hook/bug/create/create-winqual-bug_flags_end.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-winqual-bug_flags_end.html.tmpl new file mode 100644 index 000000000..2a90cbfe3 --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-winqual-bug_flags_end.html.tmpl @@ -0,0 +1,33 @@ +[%# 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. + #%] + +[% RETURN IF NOT tracking_flags.size %] + +[% FOREACH type = tracking_flag_types %] + [% NEXT IF type.name == 'tracking' || type.name == 'project' %] + [% flag_list = [] %] + [% FOREACH flag = tracking_flags %] + [% flag_list.push(flag) IF flag.flag_type == type.name %] + [% END %] + [% IF flag_list.size %] + + + + + + + [% INCLUDE bug/tracking_flags.html.tmpl + flag_list = flag_list + new_bug = 1 %] +
+ [% type.description FILTER html %]: +
+ + + [% END %] +[% END %] diff --git a/extensions/TrackingFlags/template/en/default/hook/bug/create/create-winqual-project_flags_end.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-winqual-project_flags_end.html.tmpl new file mode 100644 index 000000000..662bc26ee --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-winqual-project_flags_end.html.tmpl @@ -0,0 +1,18 @@ +[%# 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. + #%] + +[% RETURN IF NOT tracking_flags.size %] + +[% flag_list = [] %] +[% FOREACH flag = tracking_flags %] + [% NEXT IF flag.flag_type != 'project' %] + [% flag_list.push(flag) %] +[% END %] +[% INCLUDE bug/tracking_flags.html.tmpl + flag_list = flag_list + new_bug = 1 %] diff --git a/extensions/TrackingFlags/template/en/default/hook/bug/create/create-winqual-tracking_flags_end.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-winqual-tracking_flags_end.html.tmpl new file mode 100644 index 000000000..69827a87a --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-winqual-tracking_flags_end.html.tmpl @@ -0,0 +1,18 @@ +[%# 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. + #%] + +[% RETURN IF NOT tracking_flags.size %] + +[% flag_list = [] %] +[% FOREACH flag = tracking_flags %] + [% NEXT IF flag.flag_type != 'tracking' %] + [% flag_list.push(flag) %] +[% END %] +[% INCLUDE bug/tracking_flags.html.tmpl + flag_list = flag_list + new_bug = 1 %] 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 new file mode 100644 index 000000000..697db75ce --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/bug/edit-after_custom_fields.html.tmpl @@ -0,0 +1,191 @@ +[%# 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. + #%] + +[%# Old style custom field based tracking flags %] +[% old_tracking_flags = [] %] +[% old_project_flags = [] %] +[% FOREACH field = Bugzilla.active_custom_fields(product=>bug.product_obj,component=>bug.component_obj,type=>2) %] + [% NEXT IF field.type == constants.FIELD_TYPE_EXTENSION %] + [% NEXT IF NOT user.id AND bug.${field.name} == "---" %] + [% NEXT IF cf_flag_disabled(field.name, bug) %] + [% IF cf_is_project_flag(field.name) %] + [% old_project_flags.push(field) %] + [% ELSE %] + [% old_tracking_flags.push(field) %] + [% END %] +[% END %] + +[%# Add in the new tracking flags that are type tracking or project %] +[% new_tracking_flags = [] %] +[% new_project_flags = [] %] +[% IF tracking_flags.size %] + [% FOREACH flag = tracking_flags %] + [% IF flag.flag_type == 'tracking' %] + [% new_tracking_flags.push(flag) %] + [% END %] + [% IF flag.flag_type == 'project' %] + [% new_project_flags.push(flag) %] + [% END %] + [% END %] +[% END %] + +[% IF old_project_flags.size || new_project_flags.size %] + + + + + + [% IF bug.check_can_change_field('flagtypes.name', 0, 1) %] + + [% FOREACH field = old_project_flags %] + [% NEXT IF NOT user.id AND field.value == "---" %] + + + + + [% END %] + [% INCLUDE bug/tracking_flags.html.tmpl + flag_list = new_project_flags %] +
+ + + [% PROCESS bug/field.html.tmpl value = bug.${field.name} + editable = user.id + no_tds = 1 %] + [% IF user.id %] + + [% bug.${field.name} FILTER html %] + + [% END %] +
+ [% ELSE %] + [% FOREACH field = old_project_flags %] + [% NEXT IF bug.${field.name} == "---" %] + [% field_descs.${field.name} FILTER html %]: [% bug.${field.name} FILTER html %]
+ [% END %] + [% FOREACH flag = project_flags %] + [% NEXT IF flag.bug_flag.value == '---' %] + [% flag.description FILTER html %]: [% flag.bug_flag.value FILTER html %]
+ [% END %] + [% END %] + + +[% END %] + +[% IF old_tracking_flags.size || new_tracking_flags.size %] + + + + + + [% IF bug.check_can_change_field('flagtypes.name', 0, 1) %] + [% IF user.id %] + + (edit) + + [% END %] + + [% FOREACH field = old_tracking_flags %] + [% NEXT IF NOT user.id AND field.value == "---" %] + + + + + [% END %] + [% INCLUDE bug/tracking_flags.html.tmpl + flag_list = new_tracking_flags %] +
+ + + [% PROCESS bug/field.html.tmpl + value = bug.${field.name} + editable = user.id + no_tds = 1 + %] + [% IF user.id %] + + [% bug.${field.name} FILTER html %] + + [% END %] +
+ [% ELSE %] + [% FOREACH field = old_tracking_flags %] + [% NEXT IF bug.${field.name} == "---" %] + [% field_descs.${field.name} FILTER html %]: [% bug.${field.name} FILTER html %]
+ [% END %] + [% FOREACH flag = new_tracking_flags %] + [% NEXT IF flag.status == '---' %] + [% flag.description FILTER html %]: [% flag.bug_flag.value FILTER html %]
+ [% END %] + [% END %] + + + +[% END %] + +[%# Last, display any new style flags that are not type tracking or project %] +[% IF tracking_flags.size %] + [% FOREACH type = tracking_flag_types %] + [% NEXT IF type.name == 'tracking' || type.name == 'project' %] + [% 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 %] + [% END %] + + + [% END %] + [% END %] +[% END %] + + diff --git a/extensions/TrackingFlags/template/en/default/hook/bug/field-editable.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/bug/field-editable.html.tmpl new file mode 100644 index 000000000..f598609e8 --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/bug/field-editable.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. + #%] + + + + diff --git a/extensions/TrackingFlags/template/en/default/hook/bug/field-non_editable.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/bug/field-non_editable.html.tmpl new file mode 100644 index 000000000..8fa1f1623 --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/bug/field-non_editable.html.tmpl @@ -0,0 +1,9 @@ +[%# 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. + #%] + +[% display_value(field.name, value) FILTER html %] diff --git a/extensions/TrackingFlags/template/en/default/hook/bug/show-header-end.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/bug/show-header-end.html.tmpl new file mode 100644 index 000000000..5e4ef2fcb --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/bug/show-header-end.html.tmpl @@ -0,0 +1,10 @@ +[%# 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. + #%] + +[% javascript_urls.push('extensions/TrackingFlags/web/js/tracking_flags.js') %] +[% style_urls.push('extensions/TrackingFlags/web/styles/edit_bug.css') %] diff --git a/extensions/TrackingFlags/template/en/default/hook/global/code-error-errors.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/global/code-error-errors.html.tmpl new file mode 100644 index 000000000..2d462ebaf --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/global/code-error-errors.html.tmpl @@ -0,0 +1,26 @@ +[%# 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 error == "tracking_flags_invalid_product" %] + [% title = "Invalid Product" %] + The product named '[% product FILTER html %]' does not exist. + +[% ELSIF error == "tracking_flags_invalid_component" %] + [% title = "Invalid Component" %] + The component named '[% component FILTER html %]' does not exist. + +[% ELSIF error == "tracking_flags_invalid_item_id" %] + [% title = "Invalid " _ item _ " ID" %] + Invalid [% item FILTER html %] ID ([% id FILTER html %]). + +[% ELSIF error == "tracking_flags_invalid_param" %] + [% title = "Invalid Parameter Provided" %] + An invalid parameter '[% value FILTER html %]' + for '[% name FILTER html %]' was provided. + +[% END %] diff --git a/extensions/TrackingFlags/template/en/default/hook/global/messages-messages.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/global/messages-messages.html.tmpl new file mode 100644 index 000000000..45bb7332c --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/global/messages-messages.html.tmpl @@ -0,0 +1,15 @@ +[%# 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 message_tag == 'tracking_flags_created' %] + The tracking flag has been created. + +[% ELSIF message_tag == 'tracking_flags_updated' %] + The tracking flag has been updated. + +[% END %] diff --git a/extensions/TrackingFlags/template/en/default/hook/global/user-error-errors.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/global/user-error-errors.html.tmpl new file mode 100644 index 000000000..f17df1bdf --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/hook/global/user-error-errors.html.tmpl @@ -0,0 +1,57 @@ +[%# 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 error == "tracking_flags_change_denied" %] + [% title = "Tracking Flag Modification Denied" %] + You tried to update the status of the tracking flag '[% flag.name FILTER html %]' + [% IF value %] to '[% value.name FILTER html %]'[% END %]. + Only a user with the required permissions may make this change. + +[% ELSIF error == "tracking_flags_missing_mandatory" %] + [% IF fields.size == 1 %] + [% title = "Missing mandatory field" %] + The field "[% fields.first FILTER html %]" is mandatory, and must be provided. + [% ELSE %] + [% title = "Missing mandatory fields" %] + The following fields are mandatory, and must be provided: + [%+ fields.join(', ') FILTER html %] + [% END %] + +[% ELSIF error == "tracking_flags_cf_prefix" %] + [% title = "Invalid flag name" %] + The flag name must start with 'cf_'. + +[% ELSIF error == "tracking_flags_duplicate_field" %] + [% title = "Duplicate field" %] + A tracking flag field named "[% name FILTER html %]" already exists. + +[% ELSIF error == "tracking_flags_missing_values" %] + [% title = "Missing values" %] + You must provide at least one value. + +[% ELSIF error == "tracking_flags_missing_value" %] + [% title = "Missing value" %] + You must provied the value for all values. + +[% ELSIF error == "tracking_flags_duplicate_value" %] + [% title = "Duplicate value" %] + The value "[% value FILTER html %]" has been provided more than once. + +[% ELSIF error == "tracking_flags_missing_visibility" %] + [% title = "Missing visibility" %] + You must provide at least one product for visibility. + +[% ELSIF error == "tracking_flags_duplicate_visibility" %] + [% title = "Duplicate visibility" %] + The visibility '[% name FILTER html %]' has been provided more than once. + +[% ELSIF error == "tracking_flags_invalid_flag_type" %] + [% title = "Invalid flag type" %] + The flag type '[% type FILTER html %]' is invalid. + +[% END %] diff --git a/extensions/TrackingFlags/template/en/default/pages/tracking_flags_admin_edit.html.tmpl b/extensions/TrackingFlags/template/en/default/pages/tracking_flags_admin_edit.html.tmpl new file mode 100644 index 000000000..d9f11fa2a --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/pages/tracking_flags_admin_edit.html.tmpl @@ -0,0 +1,194 @@ +[%# 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. + #%] + +[% js_data = BLOCK %] +var useclassification = false; +var first_load = true; +var last_sel = []; +var cpts = new Array(); +[% n = 1 %] +[% FOREACH p = user.get_selectable_products %] + cpts['[% n FILTER js %]'] = [ + [%- FOREACH c = p.components %]'[% c.name FILTER js %]'[% ", " UNLESS loop.last %] [%- END -%] ]; + [% n = n+1 %] +[% END %] +var selected_components = [ + [%- FOREACH c = input.component %]'[% c FILTER js %]' + [%- ',' UNLESS loop.last %] [%- END ~%] ]; +[% END %] + +[% PROCESS global/header.html.tmpl + title = "Release Tracking Flags" + javascript = js_data + javascript_urls = [ 'extensions/TrackingFlags/web/js/admin.js', 'js/productform.js' ] + style_urls = [ 'extensions/TrackingFlags/web/styles/admin.css' ] +%] + +[% IF mode == 'deleted' %] + +

The tracking flag [% flag_name FILTER html %] has been deleted.

+
+

Return to the list of Tracking Flags.

+ + [% RETURN %] + +[% END %] + + + +
+ [% IF mode == 'edit' %] + Editing [% flag.name FILTER html %]. + [% ELSE %] + New flag + [% END %] +
+ +
+ + + + + + + +[%# name/desc/etc %] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Flag
Namedatabase field name
Descriptionvisible name
Type + + flag type used for grouping
Sort Key + + [ + +5 + | -5 + ] +
Active
+ +[%# values %] + + + + + + + + + + + + + + + + + +
Values
ValueSetterActive
+ [ New Value ] +
+ +[%# visibility %] + + + + + + + + + + + + + + + + + +
Visibility
ProductComponent
+ + + + + [ Add ] + +
+ + +[%# submit %] + +
+ + [% IF can_delete %] + + + [% END %] +
+ +
+ +
+

+Return to the list of Tracking Flags. +

+ +[% INCLUDE global/footer.html.tmpl %] diff --git a/extensions/TrackingFlags/template/en/default/pages/tracking_flags_admin_list.html.tmpl b/extensions/TrackingFlags/template/en/default/pages/tracking_flags_admin_list.html.tmpl new file mode 100644 index 000000000..6c2ecc915 --- /dev/null +++ b/extensions/TrackingFlags/template/en/default/pages/tracking_flags_admin_list.html.tmpl @@ -0,0 +1,56 @@ +[%# 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. + #%] + +[% PROCESS global/header.html.tmpl + title = "Release Tracking Flags" + style_urls = [ 'extensions/TrackingFlags/web/styles/admin.css' ] +%] + + + + + + + + + + + + +[% FOREACH flag = flags %] + + + + + + + + +[% END %] + +
NameDescriptionTypeSort KeyActive 
+ + [% flag.name FILTER html %] + + + [% flag.description FILTER html %] + + [% flag.flag_type FILTER html %] + + [% flag.sortkey FILTER html %] + + [% flag.is_active ? "Yes" : "No" %] + + Copy +
+ +
+Add Flag +
+ +[% INCLUDE global/footer.html.tmpl %] -- cgit v1.2.3-24-g4f1b