summaryrefslogtreecommitdiffstats
path: root/extensions/TrackingFlags/template/en/default/hook/bug
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/TrackingFlags/template/en/default/hook/bug')
-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-form.html.tmpl63
-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/create/create-winqual-bug_flags_end.html.tmpl33
-rw-r--r--extensions/TrackingFlags/template/en/default/hook/bug/create/create-winqual-project_flags_end.html.tmpl18
-rw-r--r--extensions/TrackingFlags/template/en/default/hook/bug/create/create-winqual-tracking_flags_end.html.tmpl18
-rw-r--r--extensions/TrackingFlags/template/en/default/hook/bug/edit-after_custom_fields.html.tmpl191
-rw-r--r--extensions/TrackingFlags/template/en/default/hook/bug/field-editable.html.tmpl38
-rw-r--r--extensions/TrackingFlags/template/en/default/hook/bug/field-non_editable.html.tmpl9
-rw-r--r--extensions/TrackingFlags/template/en/default/hook/bug/show-header-end.html.tmpl10
11 files changed, 449 insertions, 0 deletions
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 %]
+ <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-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 %]
+
+ <script type="text/javascript">
+ [% js_filtered_names = [] %]
+ [% FOREACH flag = tracking_flag_names %]
+ [% js_filtered = flag FILTER js %]
+ [% js_filtered_names.push(js_filtered) %]
+ [% END %]
+ var tracking_flag_names = ['[% js_filtered_names.join("','") FILTER none %]'];
+ var tracking_flags = new Array([% product.components.size %]);
+
+ [% count = 0 %]
+ [% FOREACH c = product.components %]
+ [% NEXT IF NOT c.is_active %]
+ [% tracking_flag_list = [] %]
+ [% FOREACH flag = tracking_flags %]
+ [% FOREACH v = flag.visibility %]
+ [% IF v.product_id == product.id
+ && (!v.component_id.defined || v.component_id == c.id) %]
+ [% tracking_flag_list.push(flag.name) %]
+ [% END %]
+ [% END %]
+ [% END %]
+ [% js_filtered_flags = [] %]
+ [% FOREACH flag = tracking_flag_list %]
+ [% js_filtered = flag FILTER js %]
+ [% js_filtered_flags.push(js_filtered) %]
+ [% END %]
+ tracking_flags[[% count %]] = ['[% js_filtered_flags.join("','") FILTER none %]'];
+ [% count = count + 1 %]
+ [% END %]
+
+ function update_tracking_flags () {
+ var component = document.getElementById('component');
+ // First, we disable all flags.
+ for (var i = 0; i < tracking_flag_names.length; i++) {
+ var flagField = document.getElementById(tracking_flag_names[i]);
+ flagField.disabled = true;
+ }
+ // Now enable flags available for the selected component.
+ var index = component.selectedIndex;
+ for (var i = 0; i < tracking_flags[index].length; i++) {
+ var flagField = document.getElementById(tracking_flags[index][i]);
+ flagField.disabled = false;
+ }
+ }
+
+ YAHOO.util.Event.onDOMReady(update_tracking_flags);
+ YAHOO.util.Event.addListener("component", "change", update_tracking_flags);
+ </script>
+[% 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 %]
+ <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-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 %]
+ <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 %]
+ [% END %]
+ [% IF flag_list.size %]
+ <tr>
+ <td class="field_label">
+ <label>[% type.description FILTER html %]:</label>
+ </td>
+ <td>
+ [% IF bug.check_can_change_field('flagtypes.name', 0, 1) %]
+ [% IF user.id && type.collapsed %]
+ <span id="edit_[% type.name FILTER html %]_flags_action">
+ (<a href="#" name="[% type.name FILTER html %]" class="edit_tracking_flags_link">edit</a>)
+ </span>
+ [% END %]
+ <table class="tracking_flags">
+ [% INCLUDE bug/tracking_flags.html.tmpl
+ flag_list = flag_list %]
+ </table>
+ [% IF type.collapsed %]
+ <script type="text/javascript">
+ TrackingFlags.flags['[% type.name FILTER js %]'] = {};
+ [% FOREACH flag = flag_list %]
+ TrackingFlags.flags['[% type.name FILTER js %]']['[% flag.name FILTER js %]'] = '[% flag.bug_flag.value FILTER js %]';
+ [% END %]
+ TrackingFlags.types.push('[% type.name FILTER js %]');
+ </script>
+ [% END %]
+ [% ELSE %]
+ [% FOREACH flag = flag_list %]
+ [% NEXT IF flag.status == '---' %]
+ [% flag.description FILTER html %]: [% flag.bug_flag.value FILTER html %]<br>
+ [% END %]
+ [% END %]
+ </td>
+ </tr>
+ [% END %]
+ [% END %]
+[% END %]
+
+<script type="text/javascript">
+ hide_tracking_flags();
+</script>
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.
+ #%]
+
+<input type="hidden" id="[% field.name FILTER html %]_dirty">
+<select id="[% field.name FILTER html %]"
+ name="[% field.name FILTER html %]">
+ [% IF allow_dont_change %]
+ <option value="[% dontchange FILTER html %]"
+ [% ' selected="selected"' IF value == dontchange %]>
+ [% dontchange FILTER html %]
+ </option>
+ [% END %]
+ [% FOREACH legal_value = field.values %]
+ [% IF legal_value.name != value %]
+ [% NEXT IF !field.can_set_value(legal_value.name) %]
+ [% NEXT IF !legal_value.is_active %]
+ [% END %]
+ <option value="[% legal_value.name FILTER html %]"
+ id="v[% legal_value.id FILTER html %] [%- field.name FILTER html %]"
+ [% IF legal_value.name == value %]
+ selected="selected"
+ [% END %]>
+ [%- display_value(field.name, legal_value.name) FILTER html ~%]
+ </option>
+ [% END %]
+</select>
+<script type="text/javascript">
+<!--
+ initHidingOptionsForIE('[% field.name FILTER js %]');
+ [%+ INCLUDE "bug/field-events.js.tmpl"
+ field = field, product = bug.product_obj %]
+//-->
+</script>
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') %]