Commit 667a7abd authored by bugreport%peshkin.net's avatar bugreport%peshkin.net

Bug 251837: Add UI to add/remove 'My Bugs' link in footer

r=joel a=justdave
parent 9a63d005
...@@ -25,10 +25,6 @@ ...@@ -25,10 +25,6 @@
<table border="1" cellpadding="3"> <table border="1" cellpadding="3">
<tr> <tr>
<th> <th>
Show in <br>
Footer
</th>
<th>
Search Search
</th> </th>
<th> <th>
...@@ -40,15 +36,32 @@ ...@@ -40,15 +36,32 @@
<th> <th>
Forget Forget
</th> </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> </tr>
[% FOREACH q = queries %] [% FOREACH q = queries %]
<tr> <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>[% q.name FILTER html %]</td>
<td> <td>
<a href="buglist.cgi?[% q.query FILTER html %]">Run</a> <a href="buglist.cgi?[% q.query FILTER html %]">Run</a>
...@@ -60,6 +73,12 @@ ...@@ -60,6 +73,12 @@
<a href="buglist.cgi?cmdtype=dorem&amp;remaction=forget&amp;namedcmd= <a href="buglist.cgi?cmdtype=dorem&amp;remaction=forget&amp;namedcmd=
[% q.name FILTER html %]">Forget</a> [% q.name FILTER html %]">Forget</a>
</td> </td>
<td align="center">
<input type="checkbox"
name="linkinfooter_[% q.name FILTER html %]"
value="1"
[% " checked" IF q.linkinfooter %]>
</td>
</tr> </tr>
[% END %] [% END %]
</table> </table>
......
...@@ -298,6 +298,7 @@ sub DoPermissions { ...@@ -298,6 +298,7 @@ sub DoPermissions {
sub DoSavedSearches() { sub DoSavedSearches() {
$vars->{'user'} = Bugzilla->user;
$vars->{'queries'} = Bugzilla->user->queries; $vars->{'queries'} = Bugzilla->user->queries;
} }
...@@ -315,6 +316,11 @@ sub SaveSavedSearches() { ...@@ -315,6 +316,11 @@ sub SaveSavedSearches() {
} }
Bugzilla->user->flush_queries_cache; 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;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment