applied my changes - initial import
[boxroom-stian.git] / app / views / group / list.rhtml
blob77f97d885398d22b5de0dd197abc0de681fd8b13
1 <p class="title">Groups</p>\r
2 \r
3 <% if flash[:group_error] %>\r
4 <div id="error"><%= flash[:group_error] %></div>\r
5 <% end %>\r
6 \r
7 <table>\r
8     <tr>\r
9         <th></th>\r
10         <th width="542">Name</th>\r
11         <th></th>\r
12         <th></th>\r
13     </tr>\r
14 <% @groups.each do |group| %>\r
15 <%cyc = cycle('even', 'odd')%>    <tr class="<%=cyc  %>">\r
16         <td><%= image_tag('group.png') %></td>\r
17         <td><%= h(group.name) %></td>\r
18     <% unless group.is_the_administrators_group? %>\r
19         <td><%= link_to image_tag('edit.png'), { :action => 'rename', :id => group }, { :title => 'Rename this group' } %></td>\r
20         <td><%= link_to image_tag('delete.png'), { :action => 'destroy', :id => group }, { :title => 'Delete this group', :confirm => 'Are you sure?' } %></td><tr class="<%=cyc  %>"><td colspan=4>\r
21 <%if params[:with_users]\r
22   group.users.each do |user|%>\r
23   <%=link_to user.name, { :controller => user, :action => :edit, :id => user.id }%><br>\r
24 <%end;end%>\r
25     <% else %></td></tr>\r
26         <td></td>\r
27         <td></td>\r
28     <% end %>\r
29     </tr>\r
30 <% end %>\r
31 </table>