From: lpsolit%gmail.com <> Date: Tue, 27 Feb 2007 00:22:59 +0000 (+0000) Subject: Bug 369982: Meaningless column in userprefs.cgi if the user cannot share his saved... X-Git-Tag: bugzilla-3.0~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a12607eec5f06ea742fe6e93e4a4e0fce192554f;p=thirdparty%2Fbugzilla.git Bug 369982: Meaningless column in userprefs.cgi if the user cannot share his saved searches - Patch by Frédéric Buclin r=wicked a=LpSolit --- diff --git a/template/en/default/account/prefs/saved-searches.html.tmpl b/template/en/default/account/prefs/saved-searches.html.tmpl index e4bbc51aeb..399f31b171 100644 --- a/template/en/default/account/prefs/saved-searches.html.tmpl +++ b/template/en/default/account/prefs/saved-searches.html.tmpl @@ -45,15 +45,10 @@ Show in Footer - [% querysharegroup_regexp = '^' _ Param('querysharegroup') _ '$' %] - [% may_share = user.groups.keys.grep($querysharegroup_regexp).size %] + [% may_share = user.in_group(Param('querysharegroup')) && queryshare_groups.size %] [% IF may_share %] - Share With - a Group - [% UNLESS queryshare_groups.size %] - (there are no groups you may share queries with) - [% END %] + Share With a Group [% END %] @@ -75,9 +70,11 @@ value="1" [% " checked" IF user.showmybugslink %]> - - — - + [% IF may_share %] + + — + + [% END %] [% FOREACH q = user.queries %] @@ -104,8 +101,8 @@ alt="[% q.name FILTER html %]" [% " checked" IF q.link_in_footer %]> - - [% IF queryshare_groups.size %] + [% IF may_share %] + - [% ELSE %] - — - [% END %] - + + [% END %] [% END %]