]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 251837: Add UI to add/remove 'My Bugs' link in footer
authorbugreport%peshkin.net <>
Tue, 27 Jul 2004 12:54:12 +0000 (12:54 +0000)
committerbugreport%peshkin.net <>
Tue, 27 Jul 2004 12:54:12 +0000 (12:54 +0000)
r=joel
a=justdave

template/en/default/account/prefs/saved-searches.html.tmpl
userprefs.cgi

index a11c1c380f66eeee247c4331d3e7776718edeec4..5055565e3c5e8318cf6055e835b553aae736f6f2 100644 (file)
 <blockquote>
   <table border="1" cellpadding="3">  
     <tr>
-      <th>
-        Show in <br>
-        Footer
-      </th>
       <th>
         Search
       </th>
       <th>
         Forget
       </th>
+      <th>
+        Show in
+        Footer
+      </th>
+    </tr>
+    <tr>
+      <td>My Bugs</td>
+      <td>
+        [% filtered_username = user.login FILTER url_quote %]
+        <a href="[% Param('mybugstemplate').replace('%userid%', filtered_username) %]">Run</a>
+      </td>
+      <td>
+        &nbsp;
+      </td>
+      <td>
+        &nbsp;
+      </td>
+      <td align="center">
+        <input type="checkbox" 
+               name="showmybugslink"
+               value="1"
+               [% " checked" IF user.showmybugslink %]>
+      </td>
     </tr>
     [% FOREACH q = queries %]
       <tr>
-        <td>
-          <input type="checkbox" 
-                 name="linkinfooter_[% q.name FILTER html %]"
-                 value="1"
-                 [% " checked" IF q.linkinfooter %]>
-        </td>
         <td>[% q.name FILTER html %]</td>
         <td>
           <a href="buglist.cgi?[% q.query FILTER html %]">Run</a>
           <a href="buglist.cgi?cmdtype=dorem&amp;remaction=forget&amp;namedcmd=
                    [% q.name FILTER html %]">Forget</a>
         </td>
+        <td align="center">
+          <input type="checkbox" 
+                 name="linkinfooter_[% q.name FILTER html %]"
+                 value="1"
+                 [% " checked" IF q.linkinfooter %]>
+        </td>
       </tr>
     [% END %]
   </table>
index cd73678c9b3749602086144394193343c8762229..f71fdec02cd7dd0c0530b6c6836bbaecd1735483 100755 (executable)
@@ -298,6 +298,7 @@ sub DoPermissions {
 
 
 sub DoSavedSearches() {
+    $vars->{'user'} = Bugzilla->user;
     $vars->{'queries'} = Bugzilla->user->queries;
 }
 
@@ -315,6 +316,11 @@ sub SaveSavedSearches() {
     }
 
     Bugzilla->user->flush_queries_cache;
+    
+    my $showmybugslink = defined($cgi->param("showmybugslink")) ? 1 : 0;
+    $dbh->do("UPDATE profiles SET mybugslink = $showmybugslink " . 
+             "WHERE userid = " . Bugzilla->user->id);    
+    Bugzilla->user->{'showmybugslink'} = $showmybugslink;
 }