Commit 4827e4de authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 369982: Meaningless column in userprefs.cgi if the user cannot share his…

Bug 369982: Meaningless column in userprefs.cgi if the user cannot share his saved searches - Patch by Fré©ric Buclin <LpSolit@gmail.com> r=wicked a=LpSolit
parent 79dd4816
...@@ -45,15 +45,10 @@ ...@@ -45,15 +45,10 @@
Show in Show in
Footer Footer
</th> </th>
[% querysharegroup_regexp = '^' _ Param('querysharegroup') _ '$' %] [% may_share = user.in_group(Param('querysharegroup')) && queryshare_groups.size %]
[% may_share = user.groups.keys.grep($querysharegroup_regexp).size %]
[% IF may_share %] [% IF may_share %]
<th> <th>
Share With Share With a Group
a Group
[% UNLESS queryshare_groups.size %]
(there are no groups you may share queries with)
[% END %]
</th> </th>
[% END %] [% END %]
</tr> </tr>
...@@ -75,9 +70,11 @@ ...@@ -75,9 +70,11 @@
value="1" value="1"
[% " checked" IF user.showmybugslink %]> [% " checked" IF user.showmybugslink %]>
</td> </td>
<td> [% IF may_share %]
&mdash; <td>
</td> &mdash;
</td>
[% END %]
</tr> </tr>
[% FOREACH q = user.queries %] [% FOREACH q = user.queries %]
<tr> <tr>
...@@ -104,8 +101,8 @@ ...@@ -104,8 +101,8 @@
alt="[% q.name FILTER html %]" alt="[% q.name FILTER html %]"
[% " checked" IF q.link_in_footer %]> [% " checked" IF q.link_in_footer %]>
</td> </td>
<td> [% IF may_share %]
[% IF queryshare_groups.size %] <td>
<select name="share_[% q.id FILTER html %]"> <select name="share_[% q.id FILTER html %]">
<option value="">Don't share</option> <option value="">Don't share</option>
[% FOREACH group = queryshare_groups %] [% FOREACH group = queryshare_groups %]
...@@ -115,10 +112,8 @@ ...@@ -115,10 +112,8 @@
>[% group.name FILTER html %]</option> >[% group.name FILTER html %]</option>
[% END %] [% END %]
</select> </select>
[% ELSE %] </td>
&mdash; [% END %]
[% END %]
</td>
</tr> </tr>
[% END %] [% END %]
</table> </table>
......
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