summaryrefslogtreecommitdiffstats
path: root/template/en/default
diff options
context:
space:
mode:
Diffstat (limited to 'template/en/default')
-rw-r--r--template/en/default/admin/workflow/comment.html.tmpl93
-rw-r--r--template/en/default/admin/workflow/edit.html.tmpl93
-rw-r--r--template/en/default/filterexceptions.pl10
-rw-r--r--template/en/default/global/messages.html.tmpl5
-rw-r--r--template/en/default/global/user-error.html.tmpl4
5 files changed, 203 insertions, 2 deletions
diff --git a/template/en/default/admin/workflow/comment.html.tmpl b/template/en/default/admin/workflow/comment.html.tmpl
new file mode 100644
index 000000000..5e9a788d6
--- /dev/null
+++ b/template/en/default/admin/workflow/comment.html.tmpl
@@ -0,0 +1,93 @@
+[%# 1.0@bugzilla.org %]
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # Contributor(s): Frédéric Buclin <LpSolit@gmail.com>
+ # Gervase Markham <gerv@mozilla.org>
+ #%]
+
+[% PROCESS "global/field-descs.none.tmpl" %]
+
+[% INCLUDE global/header.html.tmpl
+ title = "Edit Actions Triggered by the Workflow"
+ style_urls = ['skins/standard/admin.css']
+%]
+
+<script type="text/javascript">
+<!--
+ function toggle_cell(cell) {
+ if (cell.checked)
+ cell.parentNode.className = "checkbox-cell checked";
+ else
+ cell.parentNode.className = "checkbox-cell";
+ }
+//-->
+</script>
+
+<p>
+ This page allows you to define which status transitions require a comment
+ by the user doing the change.
+</p>
+
+<form id="workflow_form" method="POST" action="editworkflow.cgi">
+<table>
+ <tr>
+ <th colspan="2">&nbsp;</th>
+ <th colspan="[% statuses.size FILTER html %]" class="title">To</th>
+ </tr>
+
+ <tr>
+ <th rowspan="[% statuses.size + 2 FILTER html %]" class="title">From</th>
+ <th>&nbsp;</th>
+ [% FOREACH status = statuses %]
+ <th class="col-header[% status.is_open ? " open-status" : " closed-status" %]">
+ [% status.value FILTER html %]
+ </th>
+ [% END %]
+ </tr>
+
+ [%# This defines the entry point in the workflow %]
+ [% p = [{id => 0, value => "{Start}", is_open => 1}] %]
+ [% FOREACH status = p.merge(statuses) %]
+ <tr class="highlight">
+ <th align="right" class="[% status.is_open ? "open-status" : "closed-status" %]">
+ [% status.value FILTER html %]
+ </th>
+
+ [% FOREACH new_status = statuses %]
+ [% IF workflow.${status.id}.${new_status.id}.defined %]
+ <td align="center" class="checkbox-cell
+ [% " checked" IF workflow.${status.id}.${new_status.id} %]"
+ title="From [% status.value FILTER html %] to [% new_status.value FILTER html %]">
+ <input type="checkbox" name="c_[% status.id %]_[% new_status.id %]"
+ id="c_[% status.id %]_[% new_status.id %]" onclick="toggle_cell(this)"
+ [% " checked='checked'" IF workflow.${status.id}.${new_status.id} %]>
+ </td>
+ [% ELSE %]
+ <td class="checkbox-cell forbidden">&nbsp;</td>
+ [% END %]
+ [% END %]
+ </tr>
+ [% END %]
+</table>
+
+<p align="center">
+ <input type="hidden" name="action" value="update_comment">
+ <input type="hidden" name="token" value="[% token FILTER html %]">
+ <input type="submit" value="Commit Changes"> -
+ <a href="editworkflow.cgi?action=edit_comment">Cancel Changes</a> -
+ <a href="editworkflow.cgi">View Current Workflow</a>
+</p>
+
+</form>
+
+[% INCLUDE global/footer.html.tmpl %]
diff --git a/template/en/default/admin/workflow/edit.html.tmpl b/template/en/default/admin/workflow/edit.html.tmpl
new file mode 100644
index 000000000..dee71c0a1
--- /dev/null
+++ b/template/en/default/admin/workflow/edit.html.tmpl
@@ -0,0 +1,93 @@
+[%# 1.0@bugzilla.org %]
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # Contributor(s): Frédéric Buclin <LpSolit@gmail.com>
+ # Gervase Markham <gerv@mozilla.org>
+ #%]
+
+[% PROCESS "global/field-descs.none.tmpl" %]
+
+[% INCLUDE global/header.html.tmpl
+ title = "Edit Workflow"
+ style_urls = ['skins/standard/admin.css']
+%]
+
+<script type="text/javascript">
+<!--
+ function toggle_cell(cell) {
+ if (cell.checked)
+ cell.parentNode.className = "checkbox-cell checked";
+ else
+ cell.parentNode.className = "checkbox-cell";
+ }
+//-->
+</script>
+
+<p>
+ This page allows you to define which status transitions are valid
+ in your workflow.
+</p>
+
+<form id="workflow_form" method="POST" action="editworkflow.cgi">
+<table>
+ <tr>
+ <th colspan="2">&nbsp;</th>
+ <th colspan="[% statuses.size FILTER html %]" class="title">To</th>
+ </tr>
+
+ <tr>
+ <th rowspan="[% statuses.size + 2 FILTER html %]" class="title">From</th>
+ <th>&nbsp;</th>
+ [% FOREACH status = statuses %]
+ <th class="col-header[% status.is_open ? " open-status" : " closed-status" %]">
+ [% status.value FILTER html %]
+ </th>
+ [% END %]
+ </tr>
+
+ [%# This defines the entry point in the workflow %]
+ [% p = [{id => 0, value => "{Start}", is_open => 1}] %]
+ [% FOREACH status = p.merge(statuses) %]
+ <tr class="highlight">
+ <th align="right" class="[% status.is_open ? "open-status" : "closed-status" %]">
+ [% status.value FILTER html %]
+ </th>
+
+ [% FOREACH new_status = statuses %]
+ [% IF status.id != new_status.id %]
+ <td align="center" class="checkbox-cell
+ [% " checked" IF workflow.${status.id}.${new_status.id}.defined %]"
+ title="From [% status.value FILTER html %] to [% new_status.value FILTER html %]">
+ <input type="checkbox" name="w_[% status.id %]_[% new_status.id %]"
+ id="w_[% status.id %]_[% new_status.id %]" onclick="toggle_cell(this)"
+ [% " checked='checked'" IF workflow.${status.id}.${new_status.id}.defined %]>
+ </td>
+ [% ELSE %]
+ <td class="checkbox-cell forbidden">&nbsp;</td>
+ [% END %]
+ [% END %]
+ </tr>
+ [% END %]
+</table>
+
+<p align="center">
+ <input type="hidden" name="action" value="update">
+ <input type="hidden" name="token" value="[% token FILTER html %]">
+ <input type="submit" value="Commit Changes"> -
+ <a href="editworkflow.cgi">Cancel Changes</a> -
+ <a href="editworkflow.cgi?action=edit_comment">View Current Triggers</a>
+</p>
+
+</form>
+
+[% INCLUDE global/footer.html.tmpl %]
diff --git a/template/en/default/filterexceptions.pl b/template/en/default/filterexceptions.pl
index ac579115b..ed3d72503 100644
--- a/template/en/default/filterexceptions.pl
+++ b/template/en/default/filterexceptions.pl
@@ -543,6 +543,16 @@
'comp.bug_count'
],
+'admin/workflow/edit.html.tmpl' => [
+ 'status.id',
+ 'new_status.id',
+],
+
+'admin/workflow/comment.html.tmpl' => [
+ 'status.id',
+ 'new_status.id',
+],
+
'account/login.html.tmpl' => [
'target',
],
diff --git a/template/en/default/global/messages.html.tmpl b/template/en/default/global/messages.html.tmpl
index 11fe0733c..3673a8d6e 100644
--- a/template/en/default/global/messages.html.tmpl
+++ b/template/en/default/global/messages.html.tmpl
@@ -491,7 +491,10 @@
You entered a username that matched more than one
user, so we have instead left the [% match_field FILTER html %]
field blank.
-
+
+ [% ELSIF message_tag == "workflow_updated" %]
+ The workflow has been updated.
+
[% ELSE %]
[%# Give sensible error if error functions are used incorrectly.
#%]
diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl
index 4fa138206..485f7c403 100644
--- a/template/en/default/global/user-error.html.tmpl
+++ b/template/en/default/global/user-error.html.tmpl
@@ -189,7 +189,7 @@
[% ELSIF object == "settings" %]
settings
[% ELSIF object == "sudo_session" %]
- an sudo session
+ a sudo session
[% ELSIF object == "timetracking_summaries" %]
time-tracking summary reports
[% ELSIF object == "user" %]
@@ -198,6 +198,8 @@
users
[% ELSIF object == "versions" %]
versions
+ [% ELSIF object == "workflow" %]
+ the workflow
[% END %].
[% Hook.process("auth_failure") %]