]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 355616: The "Actions" section of the footer should have "Preferences" and shouldn...
authorlpsolit%gmail.com <>
Wed, 1 Nov 2006 07:24:46 +0000 (07:24 +0000)
committerlpsolit%gmail.com <>
Wed, 1 Nov 2006 07:24:46 +0000 (07:24 +0000)
template/en/default/filterexceptions.pl
template/en/default/global/common-links.html.tmpl
template/en/default/global/useful-links.html.tmpl

index 2057e397401ca07aa200f44522b918ccb47c2754..f8590fc28e3daad8d9e33a63fc7cb05f73ce2ef9 100644 (file)
   '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.
index cfb7458e04b63513c80bb10a3fe89ab027b73be3..8c536d1fe2c7856ea7212b7b8ed612001d7b46b4 100644 (file)
@@ -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 %]
index 5e3e521d549c98fae03497c30af7879157869a8a..9439c2b8bb2c68af77ffd0db870e29905b90a0f9 100644 (file)
 
 <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 %]