From edcc538e961a21c18566bf71fea02c0ef5bbd256 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Tue, 10 Apr 2007 22:33:10 +0000 Subject: Bug 377026: Replace all occurences of status_descs.FOO by get_status("FOO") (next step in supporting custom bug statuses) - Patch by Frédéric Buclin r=gerv a=LpSolit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../default/admin/products/edit-common.html.tmpl | 2 +- template/en/default/bug/activity/table.html.tmpl | 4 +- template/en/default/bug/create/create.html.tmpl | 4 +- template/en/default/bug/knob.html.tmpl | 16 +++---- template/en/default/bug/show-multiple.html.tmpl | 2 +- template/en/default/email/whine.txt.tmpl | 8 ++-- template/en/default/global/field-descs.none.tmpl | 2 + template/en/default/list/edit-multiple.html.tmpl | 8 ++-- template/en/default/list/table.html.tmpl | 2 +- template/en/default/pages/bug-writing.html.tmpl | 4 +- template/en/default/pages/fields.html.tmpl | 50 ++++++++++++---------- template/en/default/reports/report-bar.png.tmpl | 4 +- template/en/default/reports/report-line.png.tmpl | 4 +- template/en/default/reports/report-pie.png.tmpl | 2 +- template/en/default/reports/report-table.csv.tmpl | 4 +- template/en/default/reports/report-table.html.tmpl | 4 +- template/en/default/search/form.html.tmpl | 2 +- template/en/default/whine/mail.html.tmpl | 2 +- template/en/default/whine/mail.txt.tmpl | 2 +- 19 files changed, 66 insertions(+), 60 deletions(-) (limited to 'template/en/default') diff --git a/template/en/default/admin/products/edit-common.html.tmpl b/template/en/default/admin/products/edit-common.html.tmpl index 1a1ecab3f..4c90601cf 100644 --- a/template/en/default/admin/products/edit-common.html.tmpl +++ b/template/en/default/admin/products/edit-common.html.tmpl @@ -107,7 +107,7 @@ Enter the number of votes [% terms.abug %] in this product needs to automatically get out of the - [% status_descs.UNCONFIRMED FILTER html %] + [% get_status("UNCONFIRMED") FILTER html %] state.
diff --git a/template/en/default/bug/activity/table.html.tmpl b/template/en/default/bug/activity/table.html.tmpl index 5bfb79f37..b15925555 100644 --- a/template/en/default/bug/activity/table.html.tmpl +++ b/template/en/default/bug/activity/table.html.tmpl @@ -83,7 +83,7 @@ change.fieldname == 'work_time' %] [% PROCESS formattimeunit time_unit=change.removed %] [% ELSIF change.fieldname == 'bug_status' %] - [% status_descs.${change.removed} FILTER html %] + [% get_status(change.removed) FILTER html %] [% ELSIF change.fieldname == 'resolution' %] [% get_resolution(change.removed) FILTER html %] [% ELSIF change.fieldname == 'blocked' || @@ -103,7 +103,7 @@ change.fieldname == 'work_time' %] [% PROCESS formattimeunit time_unit=change.added %] [% ELSIF change.fieldname == 'bug_status' %] - [% status_descs.${change.added} FILTER html %] + [% get_status(change.added) FILTER html %] [% ELSIF change.fieldname == 'resolution' %] [% get_resolution(change.added) FILTER html %] [% ELSIF change.fieldname == 'blocked' || diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl index fc6024a9e..af7285cac 100644 --- a/template/en/default/bug/create/create.html.tmpl +++ b/template/en/default/bug/create/create.html.tmpl @@ -264,7 +264,7 @@ function handleWantsAttachment(wants_attachment) { Initial State: - [% status_descs.${default.bug_status} FILTER html %] + [% get_status(default.bug_status) FILTER html %] [% ELSE %] [% sel = { description => 'Initial State', name => 'bug_status' } %] [% INCLUDE select %] @@ -600,7 +600,7 @@ function handleWantsAttachment(wants_attachment) { diff --git a/template/en/default/bug/knob.html.tmpl b/template/en/default/bug/knob.html.tmpl index 03084ddd4..12f1adf65 100644 --- a/template/en/default/bug/knob.html.tmpl +++ b/template/en/default/bug/knob.html.tmpl @@ -35,7 +35,7 @@ [% PROCESS initial_action %]
[% knum = knum + 1 %] @@ -48,7 +48,7 @@
[% knum = knum + 1 %] @@ -61,7 +61,7 @@
[% knum = knum + 1 %] @@ -97,7 +97,7 @@ [% IF bug.isunconfirmed && bug.user.canconfirm %]     
[% END %] @@ -113,7 +113,7 @@ [% IF bug.isunconfirmed && bug.user.canconfirm %]     
[% END %] @@ -142,7 +142,7 @@ [% PROCESS initial_action %]
[% knum = knum + 1 %] @@ -151,7 +151,7 @@ [% PROCESS initial_action %]
[% knum = knum + 1 %] @@ -177,7 +177,7 @@ [% IF !initial_action_shown %]
diff --git a/template/en/default/bug/show-multiple.html.tmpl b/template/en/default/bug/show-multiple.html.tmpl index d9dc627d2..50256965c 100644 --- a/template/en/default/bug/show-multiple.html.tmpl +++ b/template/en/default/bug/show-multiple.html.tmpl @@ -117,7 +117,7 @@ [% field_descs.bug_status FILTER html %]: - [% status_descs.${bug.bug_status} FILTER html %] + [% get_status(bug.bug_status) FILTER html %] [%+ get_resolution(bug.resolution) FILTER html %] diff --git a/template/en/default/email/whine.txt.tmpl b/template/en/default/email/whine.txt.tmpl index e50964e8a..764b581e8 100644 --- a/template/en/default/email/whine.txt.tmpl +++ b/template/en/default/email/whine.txt.tmpl @@ -31,8 +31,8 @@ You have one or more [% terms.bugs %] assigned to you in the [% terms.Bugzilla % [% terms.bug %] tracking system ([% Param("urlbase") %]) that require attention. -All of these [% terms.bugs %] are in the [% status_descs.NEW %] or -[% status_descs.REOPENED %] state, and have not been +All of these [% terms.bugs %] are in the [% get_status("NEW") %] or +[% get_status("REOPENED") %] state, and have not been touched in [% Param("whinedays") %] days or more. You need to take a look at them, and decide on an initial action. @@ -47,7 +47,7 @@ Generally, this means one of three things: (3) You decide the [% terms.bug %] belongs to you, but you can't solve it this moment. Just use the "Accept [% terms.bug %]" command. -To get a list of all [% status_descs.NEW %]/[% status_descs.REOPENED %] [%+ terms.bugs %], you can use this URL (bookmark +To get a list of all [% get_status("NEW") %]/[% get_status("REOPENED") %] [%+ terms.bugs %], you can use this URL (bookmark it if you like!): [% Param("urlbase") %]buglist.cgi?bug_status=NEW&bug_status=REOPENED&assigned_to=[% email %] @@ -55,7 +55,7 @@ it if you like!): Or, you can use the general query page, at [%+ Param("urlbase") %]query.cgi -Appended below are the individual URLs to get to all of your [% status_descs.NEW %] [%+ terms.bugs %] +Appended below are the individual URLs to get to all of your [% get_status("NEW") %] [%+ terms.bugs %] that haven't been touched for a week or more. You will get this message once a day until you've dealt with these [% terms.bugs %]! diff --git a/template/en/default/global/field-descs.none.tmpl b/template/en/default/global/field-descs.none.tmpl index 94ba948d6..317c76039 100644 --- a/template/en/default/global/field-descs.none.tmpl +++ b/template/en/default/global/field-descs.none.tmpl @@ -92,6 +92,8 @@ "VERIFIED" => "VERIFIED", "CLOSED" => "CLOSED" } %] +[% MACRO get_status(status) GET status_descs.$status || status %] + [% resolution_descs = { "FIXED" => "FIXED", "INVALID" => "INVALID", "WONTFIX" => "WONTFIX", diff --git a/template/en/default/list/edit-multiple.html.tmpl b/template/en/default/list/edit-multiple.html.tmpl index 38e4e930f..0dc91681c 100644 --- a/template/en/default/list/edit-multiple.html.tmpl +++ b/template/en/default/list/edit-multiple.html.tmpl @@ -282,7 +282,7 @@ [% knum = knum + 1 %]
[% END %] @@ -292,7 +292,7 @@ [% knum = knum + 1 %]
[% knum = knum + 1 %] @@ -326,14 +326,14 @@ [% IF bugstatuses.contains('RESOLVED') %] [% knum = knum + 1 %] -
+
[% END %] [% END %] [% IF !bugstatuses.containsany(openstates) AND !bugstatuses.contains('CLOSED') %] [% knum = knum + 1 %] -
+
[% END %] [% knum = knum + 1 %] diff --git a/template/en/default/list/table.html.tmpl b/template/en/default/list/table.html.tmpl index 2918007c1..eb9e641ae 100644 --- a/template/en/default/list/table.html.tmpl +++ b/template/en/default/list/table.html.tmpl @@ -190,7 +190,7 @@ column == 'estimated_time' %] [% PROCESS formattimeunit time_unit=bug.$column %] [% ELSIF column == 'bug_status' %] - [%- status_descs.${bug.$column}.truncate(abbrev.$column.maxlength, abbrev.$column.ellipsis) FILTER html %] + [%- get_status(bug.$column).truncate(abbrev.$column.maxlength, abbrev.$column.ellipsis) FILTER html %] [% ELSIF column == 'resolution' %] [%- get_resolution(bug.$column).truncate(abbrev.$column.maxlength, abbrev.$column.ellipsis) FILTER html %] [% ELSE %] diff --git a/template/en/default/pages/bug-writing.html.tmpl b/template/en/default/pages/bug-writing.html.tmpl index d0cfb625d..6df5d5fef 100644 --- a/template/en/default/pages/bug-writing.html.tmpl +++ b/template/en/default/pages/bug-writing.html.tmpl @@ -57,8 +57,8 @@