summaryrefslogtreecommitdiffstats
path: root/extensions/TrackingFlags/template/en
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2013-10-11 23:44:25 +0200
committerDave Lawrence <dlawrence@mozilla.com>2013-10-11 23:44:25 +0200
commit0e52c06f2069cb5413abce39d6249bac73f045c8 (patch)
tree326576b9e20d428c8ddad006d29dd0bdd2b3f75d /extensions/TrackingFlags/template/en
parent085a562c412b8bcdedf978821222f3b6585993e5 (diff)
downloadbugzilla-0e52c06f2069cb5413abce39d6249bac73f045c8.tar.gz
bugzilla-0e52c06f2069cb5413abce39d6249bac73f045c8.tar.xz
Bug 880829 - Migrate current custom field based tracking flags to the new Tracking Flags extension tables
r=glob
Diffstat (limited to 'extensions/TrackingFlags/template/en')
-rw-r--r--extensions/TrackingFlags/template/en/default/hook/bug/create/create-bug_flags.html.tmpl29
-rw-r--r--extensions/TrackingFlags/template/en/default/hook/bug/create/create-bug_flags_end.html.tmpl33
-rw-r--r--extensions/TrackingFlags/template/en/default/hook/bug/create/create-project_flags_end.html.tmpl18
-rw-r--r--extensions/TrackingFlags/template/en/default/hook/bug/create/create-tracking_flags_end.html.tmpl18
-rw-r--r--extensions/TrackingFlags/template/en/default/hook/bug/edit-after_custom_fields.html.tmpl137
5 files changed, 29 insertions, 206 deletions
diff --git a/extensions/TrackingFlags/template/en/default/hook/bug/create/create-bug_flags.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-bug_flags.html.tmpl
new file mode 100644
index 000000000..b41e1619f
--- /dev/null
+++ b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-bug_flags.html.tmpl
@@ -0,0 +1,29 @@
+[%# 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 %]
+<td>
+ <table class="tracking_flags">
+ [% 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 %]
+ <tr>
+ <th style="text-align:right">
+ [% type.description FILTER html %]:
+ </th>
+ </tr>
+ [% INCLUDE bug/tracking_flags.html.tmpl
+ flag_list = flag_list
+ new_bug = 1 %]
+ [% END %]
+ [% END %]
+ </table>
+</td>
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
deleted file mode 100644
index 2a90cbfe3..000000000
--- a/extensions/TrackingFlags/template/en/default/hook/bug/create/create-bug_flags_end.html.tmpl
+++ /dev/null
@@ -1,33 +0,0 @@
-[%# 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 %]
- <tr>
- <td>
- <table class="tracking_flags">
- <tr>
- <th>
- [% type.description FILTER html %]:
- </th>
- </tr>
- [% INCLUDE bug/tracking_flags.html.tmpl
- flag_list = flag_list
- new_bug = 1 %]
- </table>
- </td>
- </tr>
- [% 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
deleted file mode 100644
index 662bc26ee..000000000
--- a/extensions/TrackingFlags/template/en/default/hook/bug/create/create-project_flags_end.html.tmpl
+++ /dev/null
@@ -1,18 +0,0 @@
-[%# 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
deleted file mode 100644
index 69827a87a..000000000
--- a/extensions/TrackingFlags/template/en/default/hook/bug/create/create-tracking_flags_end.html.tmpl
+++ /dev/null
@@ -1,18 +0,0 @@
-[%# 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
index 697db75ce..e0411b512 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,145 +6,8 @@
# 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 %]
- <tr>
- <td class="field_label">
- <label>Project Flags:</label>
- </td>
- <td>
- [% IF bug.check_can_change_field('flagtypes.name', 0, 1) %]
- <table class="tracking_flags">
- [% FOREACH field = old_project_flags %]
- [% NEXT IF NOT user.id AND field.value == "---" %]
- <tr id="row_[% field.name FILTER js %]">
- <td>
- <label for="[% field.name FILTER html %]">
- [% field_descs.${field.name} FILTER html %]:
- </label>
- </td>
- <td>
- [% PROCESS bug/field.html.tmpl value = bug.${field.name}
- editable = user.id
- no_tds = 1 %]
- [% IF user.id %]
- <span id="ro_[% field.name FILTER html %]" class="bz_default_hidden">
- [% bug.${field.name} FILTER html %]
- </span>
- [% END %]
- </td>
- </tr>
- [% END %]
- [% INCLUDE bug/tracking_flags.html.tmpl
- flag_list = new_project_flags %]
- </table>
- [% ELSE %]
- [% FOREACH field = old_project_flags %]
- [% NEXT IF bug.${field.name} == "---" %]
- [% field_descs.${field.name} FILTER html %]: [% bug.${field.name} FILTER html %]<br>
- [% END %]
- [% FOREACH flag = project_flags %]
- [% NEXT IF flag.bug_flag.value == '---' %]
- [% flag.description FILTER html %]: [% flag.bug_flag.value FILTER html %]<br>
- [% END %]
- [% END %]
- </td>
- </tr>
-[% END %]
-
-[% IF old_tracking_flags.size || new_tracking_flags.size %]
- <tr>
- <td class="field_label">
- <label>Tracking Flags:</label>
- </td>
- <td>
- [% IF bug.check_can_change_field('flagtypes.name', 0, 1) %]
- [% IF user.id %]
- <span id="edit_tracking_flags_action">
- (<a href="#" name="tracking" class="edit_tracking_flags_link">edit</a>)
- </span>
- [% END %]
- <table class="tracking_flags">
- [% FOREACH field = old_tracking_flags %]
- [% NEXT IF NOT user.id AND field.value == "---" %]
- <tr id="row_[% field.name FILTER js %]">
- <td>
- <label for="[% field.name FILTER html %]">
- [% field_descs.${field.name} FILTER html %]:
- </label>
- </td>
- <td>
- [% PROCESS bug/field.html.tmpl
- value = bug.${field.name}
- editable = user.id
- no_tds = 1
- %]
- [% IF user.id %]
- <span id="ro_[% field.name FILTER html %]" class="bz_default_hidden">
- [% bug.${field.name} FILTER html %]
- </span>
- [% END %]
- </td>
- </tr>
- [% END %]
- [% INCLUDE bug/tracking_flags.html.tmpl
- flag_list = new_tracking_flags %]
- </table>
- [% ELSE %]
- [% FOREACH field = old_tracking_flags %]
- [% NEXT IF bug.${field.name} == "---" %]
- [% field_descs.${field.name} FILTER html %]: [% bug.${field.name} FILTER html %]<br>
- [% END %]
- [% FOREACH flag = new_tracking_flags %]
- [% NEXT IF flag.status == '---' %]
- [% flag.description FILTER html %]: [% flag.bug_flag.value FILTER html %]<br>
- [% END %]
- [% END %]
- </td>
- </tr>
- <script type="text/javascript">
- TrackingFlags.flags['tracking'] = {};
- [% FOREACH field = old_tracking_flags %]
- TrackingFlags.flags['tracking']['[% field.name FILTER js %]'] = '[% bug.${field.name} FILTER js %]';
- [% END %]
- [% FOREACH flag = new_tracking_flags %]
- TrackingFlags.flags['tracking']['[% flag.name FILTER js %]'] = '[% flag.bug_flag.value FILTER js %]';
- [% END %]
- TrackingFlags.types.push('tracking');
- </script>
-[% 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 %]