summaryrefslogtreecommitdiffstats
path: root/template/en/default
diff options
context:
space:
mode:
Diffstat (limited to 'template/en/default')
-rw-r--r--template/en/default/attachment/create.html.tmpl3
-rw-r--r--template/en/default/bug/show.xml.tmpl2
-rw-r--r--template/en/default/flag/list.html.tmpl2
-rw-r--r--template/en/default/global/useful-links.html.tmpl30
-rw-r--r--template/en/default/list/quips.html.tmpl4
-rw-r--r--template/en/default/request/email.txt.tmpl4
-rw-r--r--template/en/default/search/knob.html.tmpl2
-rw-r--r--template/en/default/sidebar.xul.tmpl25
8 files changed, 33 insertions, 39 deletions
diff --git a/template/en/default/attachment/create.html.tmpl b/template/en/default/attachment/create.html.tmpl
index a298df5a9..56bad7fae 100644
--- a/template/en/default/attachment/create.html.tmpl
+++ b/template/en/default/attachment/create.html.tmpl
@@ -123,7 +123,8 @@
[% END %]
</td>
</tr>
- [% IF (user.userid != bugassignee_id) AND UserInGroup("editbugs") %]
+
+ [% IF (user.id != bugassignee_id) AND user.groups.editbugs %]
<tr>
<th>Reassignment:</th>
<td>
diff --git a/template/en/default/bug/show.xml.tmpl b/template/en/default/bug/show.xml.tmpl
index 618745902..45ef1712a 100644
--- a/template/en/default/bug/show.xml.tmpl
+++ b/template/en/default/bug/show.xml.tmpl
@@ -25,7 +25,7 @@
<bugzilla version="[% VERSION %]"
urlbase="[% Param('urlbase') %]"
maintainer="[% Param('maintainer') FILTER xml %]"
-[% IF user.login %]
+[% IF user %]
exporter="[% user.login FILTER xml %]"
[% END %]
>
diff --git a/template/en/default/flag/list.html.tmpl b/template/en/default/flag/list.html.tmpl
index 9ca1c25c7..50752a0df 100644
--- a/template/en/default/flag/list.html.tmpl
+++ b/template/en/default/flag/list.html.tmpl
@@ -116,7 +116,7 @@
id="requestee-[% flag.id %]"
name="requestee-[% flag.id %]"
[% IF flag.status == "?" && flag.requestee %]
- value="[% flag.requestee.email FILTER html %]"
+ value="[% flag.requestee.login FILTER html %]"
[% END %]
>)
</span>
diff --git a/template/en/default/global/useful-links.html.tmpl b/template/en/default/global/useful-links.html.tmpl
index fac714b0e..e7588db7d 100644
--- a/template/en/default/global/useful-links.html.tmpl
+++ b/template/en/default/global/useful-links.html.tmpl
@@ -19,19 +19,6 @@
# Contributor(s): Gervase Markham <gerv@gerv.net>
#%]
-[%# INTERFACE:
- # user: hash. Information about the user. If the user is not logged in,
- # user.login is undefined.
- # login: string. The user's Bugzilla login email address.
- # showmybugslink: boolean. True if user wants My Bugs in the footer.
- # queries: list of strings. The names of those of the user's named
- # queries which should be displayed in the footer.
- # groups: hash. Keys are group names, values are true if user in that group.
- # The keys used in this template are
- # tweakparams, editcomponents, creategroups, editkeywords, confirm,
- # editbugs, editusers.
- #%]
-
[%# Migration note: this whole file corresponds to the old %commandmenu%
substitution param in 'footerhtml' %]
@@ -51,14 +38,14 @@
<a href="report.cgi">Reports</a>
- [% IF user.login %]
+ [% IF user %]
[% email = user.login FILTER url_quote %]
| <a href="request.cgi?requester=[% email %]&amp;requestee=[% email %]&amp;do_union=1&amp;group=type">My Requests</a>
[% ELSE %]
| <a href="request.cgi">Requests</a>
[% END %]
- [% IF user.login && Param('usevotes') %]
+ [% IF user && Param('usevotes') %]
| <a href="votes.cgi?action=show_user">My Votes</a>
[% END %]
</td>
@@ -72,7 +59,7 @@
[% ', <a href="editparams.cgi">parameters</a>'
IF user.groups.tweakparams %]
[% ', <a href="editusers.cgi">users</a>' IF user.groups.editusers
- || user.canblessany %]
+ || user.can_bless %]
[% ', <a href="editproducts.cgi">products</a>'
IF user.groups.editcomponents %]
[% ', <a href="editflagtypes.cgi">flags</a>'
@@ -91,9 +78,14 @@
[%# Preset queries %]
[% preset_queries = user.showmybugslink %]
- [% FOREACH q = user.queries %]
- [% SET preset_queries = 1 IF q.linkinfooter %]
- [% END %]
+ [% IF NOT preset_queries %]
+ [% FOREACH q = user.queries %]
+ [% IF q.linkinfooter %]
+ [% preset_queries = 1 %]
+ [% LAST %]
+ [% END %]
+ [% END %]
+ [% END %]
<tr>
[% IF preset_queries %]
diff --git a/template/en/default/list/quips.html.tmpl b/template/en/default/list/quips.html.tmpl
index 4a6ef1ad5..d9f092db2 100644
--- a/template/en/default/list/quips.html.tmpl
+++ b/template/en/default/list/quips.html.tmpl
@@ -35,7 +35,7 @@
<p>
<font color="red">
Your quip '<tt>[% added_quip FILTER html %]</tt>' has been added.
- [% IF Param("enablequips") == "approved" AND !UserInGroup('admin') %]
+ [% IF Param("enablequips") == "approved" AND !user.groups.admin %]
It will be used as soon as it gets approved.
[% END %]
</font>
@@ -58,7 +58,7 @@
Bugzilla will pick a random quip for the headline on each bug list, and
you can extend the quip list. Type in something clever or funny or boring
(but not obscene or offensive, please) and bonk on the button.
- [% IF Param("enablequips") == "approved" AND !UserInGroup('admin') %]
+ [% IF Param("enablequips") == "approved" AND !user.groups.admin %]
Note that your quip has to be approved before it is used.
[% END %]
</p>
diff --git a/template/en/default/request/email.txt.tmpl b/template/en/default/request/email.txt.tmpl
index e35132181..cd7e43358 100644
--- a/template/en/default/request/email.txt.tmpl
+++ b/template/en/default/request/email.txt.tmpl
@@ -43,7 +43,7 @@ Subject: [% flag.type.name %] [%+ subject_status %]: [Bug [% flag.target.bug.id
[%+ USE wrap -%]
[%- FILTER bullet = wrap(80) -%]
-[% user.realname %] <[% user.login %]> has [% statuses.${flag.status} %] [%+ to_identity %] for [% flag.type.name %]:
+[% user.identity %] has [% statuses.${flag.status} %] [%+ to_identity %] for [% flag.type.name %]:
Bug [% bugidsummary %]
[% END %]
@@ -58,7 +58,7 @@ Attachment [% attidsummary %]
[%- FILTER bullet = wrap(80) %]
[% IF form.comment.length > 0 %]
-------- Additional Comments from [% user.realname %] <[% user.login %]>
+------- Additional Comments from [% user.identity %]
[%+ form.comment %]
[% END %]
diff --git a/template/en/default/search/knob.html.tmpl b/template/en/default/search/knob.html.tmpl
index 50e8fc646..2c99c3f82 100644
--- a/template/en/default/search/knob.html.tmpl
+++ b/template/en/default/search/knob.html.tmpl
@@ -30,7 +30,7 @@
"Last Changed" => "Last Changed" } %]
<br>
-[% IF NOT userid %]
+[% IF NOT user %]
<input type="hidden" name="cmdtype" value="doit">
[% ELSE %]
<script type="text/javascript"> <!--
diff --git a/template/en/default/sidebar.xul.tmpl b/template/en/default/sidebar.xul.tmpl
index a065d447a..97b3fe4c0 100644
--- a/template/en/default/sidebar.xul.tmpl
+++ b/template/en/default/sidebar.xul.tmpl
@@ -72,37 +72,38 @@ function normal_keypress_handler( aEvent ) {
<text class="text-link" onclick="load_relative_url('enter_bug.cgi')" value="new bug"/>
<separator class="thin"/>
-[% IF username %]
+[% IF user %]
<text class="text-link" onclick="load_relative_url('userprefs.cgi')" value="edit prefs"/>
- [%- IF UserInGroup('tweakparams') %]
+ [%- IF user.groups.tweakparams %]
<text class="text-link" onclick="load_relative_url('editparams.cgi')" value="edit params"/>
[%- END %]
- [%- IF UserInGroup('editusers') || canblessany %]
+ [%- IF user.groups.editusers || user.can_bless %]
<text class="text-link" onclick="load_relative_url('editusers.cgi')" value="edit users"/>
[%- END %]
- [%- IF UserInGroup('editcomponents') %]
+ [%- IF user.groups.editcomponents %]
<text class="text-link" onclick="load_relative_url('editcomponents.cgi')" value="edit components"/>
[%- END %]
- [%- IF UserInGroup('creategroups') %]
+ [%- IF user.groups.creategroups %]
<text class="text-link" onclick="load_relative_url('editgroups.cgi')" value="edit groups"/>
[%- END %]
- [%- IF UserInGroup('editkeywords') %]
+ [%- IF user.groups.editkeywords %]
<text class="text-link" onclick="load_relative_url('editkeywords.cgi')" value="edit keywords"/>
[%- END %]
- [%- IF UserInGroup('tweakparams') %]
+ [%- IF user.groups.tweakparams %]
<text class="text-link" onclick="load_relative_url('sanitycheck.cgi')" value="sanity check"/>
[%- END %]
- <text class="text-link" onclick="load_relative_url('relogin.cgi')" value="logout [% username FILTER html %]"/>
+ <text class="text-link" onclick="load_relative_url('relogin.cgi')" value="logout [% user.login FILTER html %]"/>
<separator class="thin"/>
- [%- IF mybugsurl %]
- <text class="text-link" onclick="load_relative_url('[% mybugsurl FILTER html %]')" value="my bugs"/>
+ [%- IF user.showmybugslink %]
+ [% filtered_username = user.login FILTER url_quote %]
+ <text class="text-link" onclick="load_relative_url('[% Param('mybugstemplate').replace('%userid%', filtered_username) FILTER js FILTER html %]')" value="my bugs"/>
[%- END %]
[%- IF Param('usevotes') %]
<text class="text-link" onclick="load_relative_url('votes.cgi?action=show_user')" value="my votes"/>
[%- END %]
- [%- FOREACH name = namedqueries %]
- <text class="text-link" onclick="load_relative_url('buglist.cgi?cmdtype=runnamed&amp;namedcmd=[% name FILTER url_quote %]')" value="[% name FILTER html %]"/>
+ [%- FOREACH q = user.queries %]
+ <text class="text-link" onclick="load_relative_url('buglist.cgi?cmdtype=runnamed&amp;namedcmd=[% q.name FILTER url_quote %]')" value="[% q.name FILTER html %]"/>
[% END %]
[% ELSE %]