]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 369982: Meaningless column in userprefs.cgi if the user cannot share his saved...
authorlpsolit%gmail.com <>
Tue, 27 Feb 2007 00:22:59 +0000 (00:22 +0000)
committerlpsolit%gmail.com <>
Tue, 27 Feb 2007 00:22:59 +0000 (00:22 +0000)
template/en/default/account/prefs/saved-searches.html.tmpl

index e4bbc51aeb1eb753c8f6490ebb72a74fc94b03e9..399f31b17193d6a51a550a8ddd809999d7c8a775 100644 (file)
         Show in
         Footer
       </th>
-      [% 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 %]
         <th>
-          Share With
-          a Group
-          [% UNLESS queryshare_groups.size %]
-            (there are no groups you may share queries with)
-          [% END %]
+          Share With a Group
         </th>
       [% END %]
     </tr>
                value="1"
                [% " checked" IF user.showmybugslink %]>
       </td>
-      <td>
-        &mdash;
-      </td>
+      [% IF may_share %]
+        <td>
+          &mdash;
+        </td>
+      [% END %]
     </tr>
     [% FOREACH q = user.queries %]
       <tr>
                  alt="[% q.name FILTER html %]"
                  [% " checked" IF q.link_in_footer %]>
         </td>
-        <td>
-          [% IF queryshare_groups.size %]
+        [% IF may_share %]
+          <td>
             <select name="share_[% q.id FILTER html %]">
               <option value="">Don't share</option>
               [% FOREACH group = queryshare_groups %]
                 >[% group.name FILTER html %]</option>
               [% END %]
             </select>
-          [% ELSE %]
-            &mdash;
-          [% END %]
-        </td>
+          </td>
+        [% END %]
       </tr>
     [% END %]
   </table>