summaryrefslogtreecommitdiffstats
path: root/template
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2009-08-05 14:35:50 +0200
committerlpsolit%gmail.com <>2009-08-05 14:35:50 +0200
commitd0002e9626b97df6fad2c597b89c8ec31f7c308a (patch)
treeb14fd7ecb63ad9931b5c72e9c666ef499f0daa1d /template
parent8b2db148f30d74283d3a80ebd77691c94a1ca4a7 (diff)
downloadbugzilla-d0002e9626b97df6fad2c597b89c8ec31f7c308a.tar.gz
bugzilla-d0002e9626b97df6fad2c597b89c8ec31f7c308a.tar.xz
Bug 415541: Implement $bug->set_flags() and $attachment->set_flags() - Patch by Frédéric Buclin <LpSolit@gmail.com> a=LpSolit
Diffstat (limited to 'template')
-rw-r--r--template/en/default/global/code-error.html.tmpl13
-rw-r--r--template/en/default/global/user-error.html.tmpl22
-rw-r--r--template/en/default/request/email.txt.tmpl19
3 files changed, 29 insertions, 25 deletions
diff --git a/template/en/default/global/code-error.html.tmpl b/template/en/default/global/code-error.html.tmpl
index 91207a20e..97fd59d21 100644
--- a/template/en/default/global/code-error.html.tmpl
+++ b/template/en/default/global/code-error.html.tmpl
@@ -222,15 +222,10 @@
but you tried to flag it as obsolete while creating a new attachment to
[% terms.bug %] [%+ my_bug_id FILTER html %].
- [% ELSIF error == "flags_not_available" %]
- [% title = "Flag Editing not Allowed" %]
- [% IF type == "b" %]
- Flags cannot be set or changed when
- changing several [% terms.bugs %] at once.
- [% ELSE %]
- References to existing flags when creating
- a new attachment are invalid.
- [% END %]
+ [% ELSIF error == "flag_unexpected_object" %]
+ [% title = "Object Not Recognized" %]
+ Flags cannot be set for objects of type [% caller FILTER html %].
+ They can only be set for [% terms.bugs %] and attachments.
[% ELSIF error == "flag_requestee_disabled" %]
[% title = "Flag not Requestable from Specific Person" %]
diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl
index 69811f210..a30f29706 100644
--- a/template/en/default/global/user-error.html.tmpl
+++ b/template/en/default/global/user-error.html.tmpl
@@ -568,12 +568,6 @@
<br>Alternately, if your attachment is an image, you could convert
it to a compressible format like JPG or PNG and try again.
- [% ELSIF error == "flag_not_multiplicable" %]
- [% docslinks = {'flags-overview.html' => 'An overview on Flags',
- 'flags.html' => 'Using Flags'} %]
- You can't ask more than one person at a time for
- <em>[% type.name FILTER html %]</em>.
-
[% ELSIF error == "flag_requestee_needs_privs" %]
[% title = "Flag Requestee Needs Privileges" %]
[% requestee.identity FILTER html %] does not have permission to set the
@@ -632,6 +626,12 @@
The name <em>[% name FILTER html %]</em> must be 1-50 characters long
and must not contain any spaces or commas.
+ [% ELSIF error == "flag_type_not_multiplicable" %]
+ [% docslinks = {'flags-overview.html' => 'An overview on Flags',
+ 'flags.html' => 'Using Flags'} %]
+ You cannot have several <em>[% type.name FILTER html %]</em> flags
+ for this [% IF attachment %] attachment [% ELSE %] [%+ terms.bug %] [% END %].
+
[% ELSIF error == "flag_update_denied" %]
[% title = "Flag Modification Denied" %]
[% admindocslinks = {'flags-overview.html#flags-admin' => 'Administering Flags',
@@ -1158,9 +1158,11 @@
[% ELSIF error == "no_bugs_in_list" %]
[% title = "Delete Tag?" %]
This will remove all [% terms.bugs %] from the
- [% tag FILTER html %] tag. This will delete the tag completely. Click
+ <em>[% name FILTER html %]</em> tag. This will delete the tag completely. Click
<a href="buglist.cgi?cmdtype=dorem&amp;remaction=forget&amp;namedcmd=
- [%- tag FILTER url_quote %]">here</a> if you really want to delete it.
+ [%- name FILTER url_quote %]&amp;token=
+ [%- issue_hash_token([query_id, name]) FILTER url_quote %]">here</a>
+ if you really want to delete it.
[% ELSIF error == "no_bugs_to_remove" %]
[% title = "No Tag Selected" %]
@@ -1742,6 +1744,10 @@
milestone
[% ELSIF class == "Bugzilla::Status" %]
status
+ [% ELSIF class == "Bugzilla::Flag" %]
+ flag
+ [% ELSIF class == "Bugzilla::FlagType" %]
+ flagtype
[% ELSIF class == "Bugzilla::Field" %]
field
[% ELSIF ( matches = class.match('^Bugzilla::Field::Choice::(.+)') ) %]
diff --git a/template/en/default/request/email.txt.tmpl b/template/en/default/request/email.txt.tmpl
index 81948c42c..adc0faa1c 100644
--- a/template/en/default/request/email.txt.tmpl
+++ b/template/en/default/request/email.txt.tmpl
@@ -24,28 +24,31 @@
[% bugidsummary = bug.bug_id _ ': ' _ bug.short_desc %]
[% attidsummary = attachment.id _ ': ' _ attachment.description %]
+[% flagtype_name = flag ? flag.type.name : old_flag.type.name %]
[% statuses = { '+' => "granted" , '-' => 'denied' , 'X' => "canceled" ,
'?' => "asked" } %]
[% to_identity = "" %]
[% on_behalf_of = 0 %]
-[% IF flag.status == '?' %]
+[% action = flag.status || 'X' %]
+
+[% IF flag && flag.status == '?' %]
[% subject_status = "requested" %]
- [% IF flag.setter.id == user.id %]
+ [% IF flag.setter_id == user.id %]
[% to_identity = flag.requestee.identity _ " for" %]
[% ELSE %]
[% on_behalf_of = 1 %]
[% IF flag.requestee %][% to_identity = " to " _ flag.requestee.identity %][% END %]
[% END %]
[% ELSE %]
- [% IF flag.requester %]
- [% to_identity = flag.requester.identity _ "'s request for" %]
+ [% IF old_flag && old_flag.status == '?' %]
+ [% to_identity = old_flag.setter.identity _ "'s request for" %]
[% END %]
- [% subject_status = statuses.${flag.status} %]
+ [% subject_status = statuses.$action %]
[% END %]
From: [% Param('mailfrom') %]
To: [% to %]
-Subject: [% flag.type.name %] [%+ subject_status %]: [[% terms.Bug %] [%+ bug.bug_id %]] [% bug.short_desc %]
+Subject: [% flagtype_name %] [%+ subject_status %]: [[% terms.Bug %] [%+ bug.bug_id %]] [% bug.short_desc %]
[%- IF attachment %] :
[Attachment [% attachment.id %]] [% attachment.description %][% END %]
X-Bugzilla-Type: request
@@ -55,10 +58,10 @@ X-Bugzilla-Type: request
[%- FILTER bullet = wrap(80) -%]
[% IF on_behalf_of %]
-[% user.identity %] has reassigned [% flag.setter.identity %]'s request for [% flag.type.name %]
+[% user.identity %] has reassigned [% flag.setter.identity %]'s request for [% flagtype_name %]
[% to_identity %]:
[% ELSE %]
-[% user.identity %] has [% statuses.${flag.status} %] [%+ to_identity %] [%+ flag.type.name %]:
+[% user.identity %] has [% statuses.$action %] [%+ to_identity %] [%+ flagtype_name %]:
[% END %]
[% terms.Bug %] [%+ bugidsummary %]