summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--template/en/default/filterexceptions.pl4
-rw-r--r--template/en/default/global/common-links.html.tmpl3
-rw-r--r--template/en/default/global/useful-links.html.tmpl71
3 files changed, 51 insertions, 27 deletions
diff --git a/template/en/default/filterexceptions.pl b/template/en/default/filterexceptions.pl
index 2057e3974..f8590fc28 100644
--- a/template/en/default/filterexceptions.pl
+++ b/template/en/default/filterexceptions.pl
@@ -260,6 +260,10 @@
'email',
],
+'global/useful-links.html.tmpl' => [
+ 'sep',
+],
+
# You are not permitted to add any values here. Everything in this file should
# be filtered unless there's an extremely good reason why not, in which case,
# use the "none" dummy filter.
diff --git a/template/en/default/global/common-links.html.tmpl b/template/en/default/global/common-links.html.tmpl
index cfb7458e0..8c536d1fe 100644
--- a/template/en/default/global/common-links.html.tmpl
+++ b/template/en/default/global/common-links.html.tmpl
@@ -55,8 +55,7 @@
[% END %]
[% IF user.login %]
- [% '<li><span class="separator">| </span><a href="sanitycheck.cgi">Sanity&nbsp;check</a></li>'
- IF user.groups.tweakparams %]
+ <li><span class="separator">| </span><a href="userprefs.cgi">Preferences</a></li>
<li>
<span class="separator">| </span>
[% IF user.authorizer.can_logout %]
diff --git a/template/en/default/global/useful-links.html.tmpl b/template/en/default/global/useful-links.html.tmpl
index 5e3e521d5..9439c2b8b 100644
--- a/template/en/default/global/useful-links.html.tmpl
+++ b/template/en/default/global/useful-links.html.tmpl
@@ -28,37 +28,58 @@
<ul id="useful-links">
<li id="links-actions">
- <div class="label">Actions:</div>
+ <div class="label">Actions: </div>
[% PROCESS "global/common-links.html.tmpl" btn_id = "find_bottom" %]
</li>
-
- [% IF user.login %]
+
+ [%# We have no other choices than enumerating all required privileges to have
+ # at least one link in this section. %]
+ [% IF user.login
+ && (user.groups.tweakparams || user.groups.editusers || user.can_bless
+ || (Param('useclassification') && user.groups.editclassifications)
+ || user.groups.editcomponents || user.groups.admin || user.groups.creategroups
+ || user.groups.editkeywords || user.groups.bz_canusewhines) %]
+
+ [% sep = "" FILTER html %]
<li id="links-edit">
- <div class="label">Edit:</div>
+ <div class="label">Edit: </div>
<ul class="links">
- <li><a href="userprefs.cgi">Prefs</a></li>
- [% ' <li><span class="separator">| </span><a href="editparams.cgi">Parameters</a></li>' _
- ' <li><span class="separator">| </span><a href="editsettings.cgi">User Preferences</a></li>'
- IF user.groups.tweakparams %]
- [% ' <li><span class="separator">| </span><a href="editusers.cgi">Users</a></li>' IF user.groups.editusers
- || user.can_bless %]
+ [% IF user.groups.tweakparams %]
+ <li><span class="separator">[% sep %]</span><a href="editparams.cgi">Parameters</a></li>
+ [% sep = "| " %]
+ <li><span class="separator">[% sep %]</span><a href="editsettings.cgi">User Preferences</a></li>
+ <li><span class="separator">[% sep %]</span><a href="sanitycheck.cgi">Sanity Check</a></li>
+ [% END %]
+ [% IF user.groups.editusers || user.can_bless %]
+ <li><span class="separator">[% sep %]</span><a href="editusers.cgi">Users</a></li>
+ [% sep = "| " %]
+ [% END %]
[% IF Param('useclassification') && user.groups.editclassifications %]
- [% ' <li><span class="separator">| </span><a href="editclassifications.cgi">Classifications</a></li>' %]
+ <li><span class="separator">[% sep %]</span><a href="editclassifications.cgi">Classifications</a></li>
+ [% sep = "| " %]
+ [% END %]
+ [% IF user.groups.editcomponents %]
+ <li><span class="separator">[% sep %]</span><a href="editproducts.cgi">Products</a></li>
+ [% sep = "| " %]
+ <li><span class="separator">[% sep %]</span><a href="editflagtypes.cgi">Flags</a></li>
+ [% END %]
+ [% IF user.groups.admin %]
+ <li><span class="separator">[% sep %]</span><a href="editfields.cgi">Custom Fields</a></li>
+ [% sep = "| " %]
+ <li><span class="separator">[% sep %]</span><a href="editvalues.cgi">Field Values</a></li>
+ [% END %]
+ [% IF user.groups.creategroups %]
+ <li><span class="separator">[% sep %]</span><a href="editgroups.cgi">Groups</a></li>
+ [% sep = "| " %]
+ [% END %]
+ [% IF user.groups.editkeywords %]
+ <li><span class="separator">[% sep %]</span><a href="editkeywords.cgi">Keywords</a></li>
+ [% sep = "| " %]
+ [% END %]
+ [% IF user.groups.bz_canusewhines %]
+ <li><span class="separator">[% sep %]</span><a href="editwhines.cgi">Whining</a></li>
+ [% sep = "| " %]
[% END %]
- [% ' <li><span class="separator">| </span><a href="editproducts.cgi">Products</a></li>'
- IF user.groups.editcomponents %]
- [% ' <li><span class="separator">| </span><a href="editflagtypes.cgi">Flags</a></li>'
- IF user.groups.editcomponents %]
- [% ' <li><span class="separator">| </span><a href="editfields.cgi">Custom Fields</a></li>'
- IF user.groups.admin %]
- [% ' <li><span class="separator">| </span><a href="editvalues.cgi">Field Values</a></li>'
- IF user.groups.admin %]
- [% ' <li><span class="separator">| </span><a href="editgroups.cgi">Groups</a></li>'
- IF user.groups.creategroups %]
- [% ' <li><span class="separator">| </span><a href="editkeywords.cgi">Keywords</a></li>'
- IF user.groups.editkeywords %]
- [% ' <li><span class="separator">| </span><a href="editwhines.cgi">Whining</a></li>'
- IF user.groups.bz_canusewhines %]
</ul>
</li>
[% END %]