diff options
author | lpsolit%gmail.com <> | 2006-07-14 03:00:40 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2006-07-14 03:00:40 +0200 |
commit | 12b3b674e4dac42707c39ce2389907f2e4e6a74c (patch) | |
tree | 1c2d6e6de10015c50dccf315dd578d9e34c42f57 /template/en/default | |
parent | 8eadcd8aa1b2bdcab8f6d26c97d3cd9eeed252e2 (diff) | |
download | bugzilla-12b3b674e4dac42707c39ce2389907f2e4e6a74c.tar.gz bugzilla-12b3b674e4dac42707c39ce2389907f2e4e6a74c.tar.xz |
Bug 94534: Customised resolutions - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=myk
Diffstat (limited to 'template/en/default')
21 files changed, 84 insertions, 43 deletions
diff --git a/template/en/default/admin/fieldvalues/confirm-delete.html.tmpl b/template/en/default/admin/fieldvalues/confirm-delete.html.tmpl index 317f1f4b3..d29c124d6 100644 --- a/template/en/default/admin/fieldvalues/confirm-delete.html.tmpl +++ b/template/en/default/admin/fieldvalues/confirm-delete.html.tmpl @@ -61,13 +61,13 @@ <h2>Confirmation</h2> -[% IF (Param(param_name) == value) || bug_count || (value_count == 1) %] +[% IF (param_name.defined && Param(param_name) == value) || bug_count || (value_count == 1) %] <p>Sorry, but the '[% value FILTER html %]' value cannot be deleted from the '[% field FILTER html %]' field for the following reason(s):</p> <ul class="warningmessages"> - [% IF Param(param_name) == value %] + [% IF param_name.defined && Param(param_name) == value %] <li>'[% value FILTER html %]' is the default value for the '[% field FILTER html %]' field. [% IF user.groups.tweakparams %] diff --git a/template/en/default/admin/fieldvalues/edit.html.tmpl b/template/en/default/admin/fieldvalues/edit.html.tmpl index c798bb3a9..362ed4753 100644 --- a/template/en/default/admin/fieldvalues/edit.html.tmpl +++ b/template/en/default/admin/fieldvalues/edit.html.tmpl @@ -33,8 +33,15 @@ <tr> <th valign="top"><label for="value">Field Value:</label></th> - <td><input id="value" size="20" maxlength="60" name="value" value=" - [%- value FILTER html %]"></td> + <td> + [% IF is_static %] + <input type="hidden" name="value" value="[% value FILTER html %]"> + [% value FILTER html %] + [% ELSE %] + <input id="value" size="20" maxlength="60" name="value" value=" + [%- value FILTER html %]"> + [% END %] + </td> </tr> <tr> <th align="right"><label for="sortkey">Sortkey:</label></th> diff --git a/template/en/default/admin/fieldvalues/list.html.tmpl b/template/en/default/admin/fieldvalues/list.html.tmpl index d25adf2b1..f446d0f96 100644 --- a/template/en/default/admin/fieldvalues/list.html.tmpl +++ b/template/en/default/admin/fieldvalues/list.html.tmpl @@ -21,6 +21,7 @@ # displayed to the user in a list. # # field: string; the name of the field we are editing values for. + # static: array; list of values which cannot be renamed nor deleted. #%] [% USE Bugzilla %] @@ -58,15 +59,35 @@ } ] %] -[% overrides.action = [ { - match_value => "$default" - match_field => 'name' - override_content => 1 - content => "(Default value)" - override_contentlink => 1 - contentlink => undef - } ] -%] +[% IF default.defined %] + [% overrides.action = [ { + match_value => "$default" + match_field => 'name' + override_content => 1 + content => "(Default value)" + override_contentlink => 1 + contentlink => undef + } ] + %] +[% END %] + +[% IF static.size %] + [% UNLESS overrides.action.size %] + [% overrides.action = [] %] + [% END %] + + [% FOREACH static_value = static %] + [% overrides.action.push({ + match_value => "$static_value" + match_field => 'name' + override_content => 1 + content => "(Non deletable value)" + override_contentlink => 1 + contentlink => undef + }) + %] + [% END %] +[% END %] [% PROCESS admin/table.html.tmpl columns = columns diff --git a/template/en/default/bug/activity/table.html.tmpl b/template/en/default/bug/activity/table.html.tmpl index 31556623d..5bfb79f37 100644 --- a/template/en/default/bug/activity/table.html.tmpl +++ b/template/en/default/bug/activity/table.html.tmpl @@ -85,7 +85,7 @@ [% ELSIF change.fieldname == 'bug_status' %] [% status_descs.${change.removed} FILTER html %] [% ELSIF change.fieldname == 'resolution' %] - [% resolution_descs.${change.removed} FILTER html %] + [% get_resolution(change.removed) FILTER html %] [% ELSIF change.fieldname == 'blocked' || change.fieldname == 'dependson' %] [% change.removed FILTER bug_list_link FILTER none %] @@ -105,7 +105,7 @@ [% ELSIF change.fieldname == 'bug_status' %] [% status_descs.${change.added} FILTER html %] [% ELSIF change.fieldname == 'resolution' %] - [% resolution_descs.${change.added} FILTER html %] + [% get_resolution(change.added) FILTER html %] [% ELSIF change.fieldname == 'blocked' || change.fieldname == 'dependson' %] [% change.added FILTER bug_list_link FILTER none %] diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl index adbccd141..2ea8d0db6 100644 --- a/template/en/default/bug/edit.html.tmpl +++ b/template/en/default/bug/edit.html.tmpl @@ -198,7 +198,7 @@ </b> </td> <td> - [% resolution_descs.${bug.resolution} FILTER html %] + [% get_resolution(bug.resolution) FILTER html %] [% IF bug.resolution == "DUPLICATE" %] of [% terms.bug %] [%+ "${bug.dup_id}" FILTER bug_link(bug.dup_id) %] [% END %] diff --git a/template/en/default/bug/knob.html.tmpl b/template/en/default/bug/knob.html.tmpl index 38a4898fe..36712911e 100644 --- a/template/en/default/bug/knob.html.tmpl +++ b/template/en/default/bug/knob.html.tmpl @@ -28,7 +28,7 @@ <input type="radio" id="knob-leave" name="knob" value="none" checked="checked"> <label for="knob-leave"> Leave as <b>[% status_descs.${bug.bug_status} FILTER html %] - [% resolution_descs.${bug.resolution} FILTER html %]</b> + [% get_resolution(bug.resolution) FILTER html %]</b> </label> <br> @@ -185,7 +185,7 @@ <select name="resolution" onchange="document.changeform.knob[[% knum %]].checked=true"> [% FOREACH r = bug.choices.resolution %] - <option value="[% r FILTER html %]">[% resolution_descs.${r} FILTER html %]</option> + <option value="[% r FILTER html %]">[% get_resolution(r) FILTER html %]</option> [% END %] </select> <br> diff --git a/template/en/default/bug/show-multiple.html.tmpl b/template/en/default/bug/show-multiple.html.tmpl index 023cb9573..22bc3db69 100644 --- a/template/en/default/bug/show-multiple.html.tmpl +++ b/template/en/default/bug/show-multiple.html.tmpl @@ -117,7 +117,7 @@ <th>[% field_descs.bug_status FILTER html %]:</th> <td> [% status_descs.${bug.bug_status} FILTER html %] - [%+ resolution_descs.${bug.resolution} FILTER html %] + [%+ get_resolution(bug.resolution) FILTER html %] </td> [% PROCESS rightcell %] diff --git a/template/en/default/email/whine.txt.tmpl b/template/en/default/email/whine.txt.tmpl index 2e1061709..214231394 100644 --- a/template/en/default/email/whine.txt.tmpl +++ b/template/en/default/email/whine.txt.tmpl @@ -37,7 +37,7 @@ You need to take a look at them, and decide on an initial action. Generally, this means one of three things: -(1) You decide this [% terms.bug %] is really quick to deal with (like, it's [% resolution_descs.INVALID %]), +(1) You decide this [% terms.bug %] is really quick to deal with (like, it's [% get_resolution("INVALID") %]), and so you get rid of it immediately. (2) You decide the [% terms.bug %] doesn't belong to you, and you reassign it to someone else. (Hint: if you don't know who to reassign it to, make diff --git a/template/en/default/global/field-descs.none.tmpl b/template/en/default/global/field-descs.none.tmpl index 8014fe255..7a2725121 100644 --- a/template/en/default/global/field-descs.none.tmpl +++ b/template/en/default/global/field-descs.none.tmpl @@ -88,4 +88,6 @@ "---" => "---", " " => " " } %] +[% MACRO get_resolution(res) GET resolution_descs.$res || res %] + [% Hook.process("end") %] diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl index 3b901929f..c615598b9 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -396,6 +396,16 @@ The value of a field is limited to 60 characters. '[% value FILTER html %]' is too long ([% value.length %] characters). + [% ELSIF error == "fieldvalue_not_editable" %] + [% title = "Field Value Not Editable" %] + The value '[% old_value FILTER html %]' cannot be renamed because + it plays some special role for the '[% field FILTER html %]' field. + + [% ELSIF error == "fieldvalue_not_deletable" %] + [% title = "Field Value Not Deletable" %] + The value '[% value FILTER html %]' cannot be removed because + it plays some special role for the '[% field FILTER html %]' field. + [% ELSIF error == "fieldvalue_not_specified" %] [% title = "Field Value Not Specified" %] No field value specified when trying to edit a field value. diff --git a/template/en/default/list/edit-multiple.html.tmpl b/template/en/default/list/edit-multiple.html.tmpl index 687888b24..92a083a68 100644 --- a/template/en/default/list/edit-multiple.html.tmpl +++ b/template/en/default/list/edit-multiple.html.tmpl @@ -300,8 +300,8 @@ <select name="resolution" onchange="document.forms.changeform.knob[[% knum %]].checked=true"> [% FOREACH resolution = resolutions %] [% NEXT IF !resolution %] - <option value="[% resolution FILTER html %]" [% 'selected="selected"' IF resolution == "FIXED" %]> - [% resolution_descs.$resolution FILTER html %] + <option value="[% resolution FILTER html %]"> + [% get_resolution(resolution) FILTER html %] </option> [% END %] </select><br> diff --git a/template/en/default/list/table.html.tmpl b/template/en/default/list/table.html.tmpl index 7ef53058a..0387adafb 100644 --- a/template/en/default/list/table.html.tmpl +++ b/template/en/default/list/table.html.tmpl @@ -193,7 +193,7 @@ [% ELSIF column == 'bug_status' %] [%- status_descs.${bug.$column}.truncate(abbrev.$column.maxlength, abbrev.$column.ellipsis) FILTER html %] [% ELSIF column == 'resolution' %] - [%- resolution_descs.${bug.$column}.truncate(abbrev.$column.maxlength, abbrev.$column.ellipsis) FILTER html %] + [%- get_resolution(bug.$column).truncate(abbrev.$column.maxlength, abbrev.$column.ellipsis) FILTER html %] [% ELSE %] [%- bug.$column.truncate(abbrev.$column.maxlength, abbrev.$column.ellipsis) FILTER html -%] [% END %] diff --git a/template/en/default/pages/fields.html.tmpl b/template/en/default/pages/fields.html.tmpl index a45fa0b87..7a41801f4 100644 --- a/template/en/default/pages/fields.html.tmpl +++ b/template/en/default/pages/fields.html.tmpl @@ -148,7 +148,7 @@ cycle of [% terms.abug %]. <td> <dl> <dt> - <b>[% resolution_descs.FIXED FILTER html %]</b> + <b>[% get_resolution("FIXED") FILTER html %]</b> </dt> <dd> A fix for this [% terms.bug %] is checked into the tree and @@ -156,14 +156,14 @@ cycle of [% terms.abug %]. </dd> <dt> - <b>[% resolution_descs.INVALID FILTER html %]</b> + <b>[% get_resolution("INVALID") FILTER html %]</b> </dt> <dd> The problem described is not [% terms.abug %]. </dd> <dt> - <b>[% resolution_descs.WONTFIX FILTER html %]</b> + <b>[% get_resolution("WONTFIX") FILTER html %]</b> </dt> <dd> The problem described is [% terms.abug %] which will never be @@ -171,7 +171,7 @@ cycle of [% terms.abug %]. </dd> <dt> - <b>[% resolution_descs.DUPLICATE FILTER html %]</b> + <b>[% get_resolution("DUPLICATE") FILTER html %]</b> </dt> <dd> The problem is a duplicate of an existing [% terms.bug %]. @@ -181,7 +181,7 @@ cycle of [% terms.abug %]. </dd> <dt> - <b>[% resolution_descs.WORKSFORME FILTER html %]</b> + <b>[% get_resolution("WORKSFORME") FILTER html %]</b> </dt> <dd> All attempts at reproducing this [% terms.bug %] were futile, @@ -191,7 +191,7 @@ cycle of [% terms.abug %]. </dd> <dt> - <b>[% resolution_descs.MOVED FILTER html %]</b> + <b>[% get_resolution("MOVED") FILTER html %]</b> </dt> <dd> The problem was specific to a related product diff --git a/template/en/default/reports/report-bar.png.tmpl b/template/en/default/reports/report-bar.png.tmpl index bb5dab7cd..2c29a3558 100644 --- a/template/en/default/reports/report-bar.png.tmpl +++ b/template/en/default/reports/report-bar.png.tmpl @@ -35,7 +35,7 @@ [% IF col_field == 'resolution' %] [% FOR i IN [ 0 .. data.0.0.max ] %] - [% data.0.0.$i = resolution_descs.${data.0.0.$i} %] + [% data.0.0.$i = get_resolution(data.0.0.$i) %] [% END %] [% END %] @@ -47,7 +47,7 @@ [% IF row_field == 'resolution' %] [% FOR i IN [ 0 .. row_names.max ] %] - [% row_names.$i = resolution_descs.${row_names.$i} %] + [% row_names.$i = get_resolution(row_names.$i) %] [% END %] [% END %] diff --git a/template/en/default/reports/report-line.png.tmpl b/template/en/default/reports/report-line.png.tmpl index 60e9f261a..24215af98 100644 --- a/template/en/default/reports/report-line.png.tmpl +++ b/template/en/default/reports/report-line.png.tmpl @@ -35,7 +35,7 @@ [% IF col_field == 'resolution' %] [% FOR i IN [ 0 .. data.0.0.max ] %] - [% data.0.0.$i = resolution_descs.${data.0.0.$i} %] + [% data.0.0.$i = get_resolution(data.0.0.$i) %] [% END %] [% END %] @@ -47,7 +47,7 @@ [% IF row_field == 'resolution' %] [% FOR i IN [ 0 .. row_names.max ] %] - [% row_names.$i = resolution_descs.${row_names.$i} %] + [% row_names.$i = get_resolution(row_names.$i) %] [% END %] [% END %] diff --git a/template/en/default/reports/report-pie.png.tmpl b/template/en/default/reports/report-pie.png.tmpl index c70b06bcf..3eb73b1b0 100644 --- a/template/en/default/reports/report-pie.png.tmpl +++ b/template/en/default/reports/report-pie.png.tmpl @@ -31,7 +31,7 @@ [% IF col_field == 'resolution' %] [% FOR i IN [ 0 .. data.0.0.max ] %] - [% data.0.0.$i = resolution_descs.${data.0.0.$i} %] + [% data.0.0.$i = get_resolution(data.0.0.$i) %] [% END %] [% END %] diff --git a/template/en/default/reports/report-table.csv.tmpl b/template/en/default/reports/report-table.csv.tmpl index 0abb68ece..2f7f867af 100644 --- a/template/en/default/reports/report-table.csv.tmpl +++ b/template/en/default/reports/report-table.csv.tmpl @@ -44,7 +44,7 @@ [% IF col_field == 'bug_status' %] [% status_descs.$col FILTER csv -%] [% ELSIF col_field == 'resolution' %] - [% resolution_descs.$col FILTER csv -%] + [% get_resolution(col) FILTER csv -%] [% ELSE %] [% col FILTER csv -%] [% END %] @@ -57,7 +57,7 @@ [% IF row_field == 'bug_status' %] [% status_descs.$row FILTER csv -%] [% ELSIF row_field == 'resolution' %] - [% resolution_descs.$row FILTER csv -%] + [% get_resolution(row) FILTER csv -%] [% ELSE %] [% row FILTER csv -%] [% END %] diff --git a/template/en/default/reports/report-table.html.tmpl b/template/en/default/reports/report-table.html.tmpl index 0e2ae62c8..679eb1c1d 100644 --- a/template/en/default/reports/report-table.html.tmpl +++ b/template/en/default/reports/report-table.html.tmpl @@ -88,7 +88,7 @@ [% IF col_field == 'bug_status' %] [% status_descs.$col FILTER html FILTER replace('^ $',' ') %] [% ELSIF col_field == 'resolution' %] - [% resolution_descs.$col FILTER html FILTER replace('^ $',' ') %] + [% get_resolution(col) FILTER html FILTER replace('^ $',' ') %] [% ELSE %] [% col FILTER html FILTER replace('^ $',' ') %] [% END %] @@ -109,7 +109,7 @@ [% IF row_field == 'bug_status' %] [% status_descs.$row FILTER html FILTER replace('^ $',' ') %] [% ELSIF row_field == 'resolution' %] - [% resolution_descs.$row FILTER html FILTER replace('^ $',' ') %] + [% get_resolution(row) FILTER html FILTER replace('^ $',' ') %] [% ELSE %] [% row FILTER html FILTER replace('^ $',' ') %] [% END %] diff --git a/template/en/default/search/form.html.tmpl b/template/en/default/search/form.html.tmpl index ee8567586..230a438c1 100644 --- a/template/en/default/search/form.html.tmpl +++ b/template/en/default/search/form.html.tmpl @@ -628,12 +628,13 @@ function doOnSelectProduct(selectmode) { <option value="[% name FILTER html %]" [% " selected" IF lsearch(default.${sel.name}, name) != -1 %]> [% IF sel.name == "bug_status" %] - [% status_descs.${name} FILTER html %]</option> + [% status_descs.${name} FILTER html %] [% ELSIF sel.name == "resolution" %] - [% resolution_descs.${name} FILTER html %]</option> + [% get_resolution(name) FILTER html %] [% ELSE %] - [% name FILTER html %]</option> + [% name FILTER html %] [% END %] + </option> [% END %] </select> </td> diff --git a/template/en/default/whine/mail.html.tmpl b/template/en/default/whine/mail.html.tmpl index d81043a36..8fe11d657 100644 --- a/template/en/default/whine/mail.html.tmpl +++ b/template/en/default/whine/mail.html.tmpl @@ -84,7 +84,7 @@ <td align="left">[% bug.rep_platform FILTER html %]</td> <td align="left">[% bug.$assignee_login_string FILTER html %]</td> <td align="left">[% status_descs.${bug.bug_status} FILTER html %]</td> - <td align="left">[% resolution_descs.${bug.resolution} FILTER html %]</td> + <td align="left">[% get_resolution(bug.resolution) FILTER html %]</td> <td align="left">[% bug.short_desc FILTER html %]</td> </tr> [% END %] diff --git a/template/en/default/whine/mail.txt.tmpl b/template/en/default/whine/mail.txt.tmpl index 962972197..c7dcef3dc 100644 --- a/template/en/default/whine/mail.txt.tmpl +++ b/template/en/default/whine/mail.txt.tmpl @@ -59,7 +59,7 @@ Platform: [%+ bug.rep_platform %] Assignee: [%+ bug.$assignee_login_string %] Status: [%+ status_descs.${bug.bug_status} %] - [%- IF bug.resolution -%] Resolution: [% resolution_descs.${bug.resolution} -%] + [%- IF bug.resolution -%] Resolution: [% get_resolution(bug.resolution) -%] [%- END %] Summary: [% bug.short_desc %] |