summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbugreport%peshkin.net <>2004-07-27 14:53:26 +0200
committerbugreport%peshkin.net <>2004-07-27 14:53:26 +0200
commit667a7abdb6d998df719317e101eb08860f1b78d1 (patch)
tree50a3dcc69d4ed09b40c19878768b675b6e4b2836
parent9a63d0051976d8b781c3a96aece9edece34bdc89 (diff)
downloadbugzilla-667a7abdb6d998df719317e101eb08860f1b78d1.tar.gz
bugzilla-667a7abdb6d998df719317e101eb08860f1b78d1.tar.xz
Bug 251837: Add UI to add/remove 'My Bugs' link in footer
r=joel a=justdave
-rw-r--r--template/en/default/account/prefs/saved-searches.html.tmpl39
-rwxr-xr-xuserprefs.cgi6
2 files changed, 35 insertions, 10 deletions
diff --git a/template/en/default/account/prefs/saved-searches.html.tmpl b/template/en/default/account/prefs/saved-searches.html.tmpl
index a11c1c380..5055565e3 100644
--- a/template/en/default/account/prefs/saved-searches.html.tmpl
+++ b/template/en/default/account/prefs/saved-searches.html.tmpl
@@ -25,10 +25,6 @@
<table border="1" cellpadding="3">
<tr>
<th>
- Show in <br>
- Footer
- </th>
- <th>
Search
</th>
<th>
@@ -40,15 +36,32 @@
<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>
@@ -60,6 +73,12 @@
<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>
diff --git a/userprefs.cgi b/userprefs.cgi
index cd73678c9..f71fdec02 100755
--- a/userprefs.cgi
+++ b/userprefs.cgi
@@ -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;
}