app/views/guts/groups/index.html.erb in guts-1.3.6 vs app/views/guts/groups/index.html.erb in guts-1.4.0

- old
+ new

@@ -1,9 +1,9 @@ <div class="row"> <div class="small-12 columns"> <h1>User Groups</h1> - <%= link_to 'New', new_group_path, class: 'button' %> + <%= link_to('New', new_group_path, class: 'button') if can? :create, Guts::Group %> </div> </div> <% if notice %> <div class="row"> @@ -23,17 +23,19 @@ <% @groups.each do |group| %> <tr> <td><%= group.title %></td> <td><%= link_to pluralize(group.users.size, 'user', 'users'), users_path(group: group.id) %></td> <td align="right" class="action_links"> - <%= link_to 'Edit', edit_group_path(group) %> - <%= link_to_destroy 'Destroy', group %> + <%= link_to 'Full Info', group_path(group) %> + <%= link_to('Permissions', group_permissions_path(group)) if can? :read, Guts::Permission %> + <%= link_to('Edit', edit_group_path(group)) if can? :update, Guts::Group %> + <%= link_to_destroy('Destroy', group) if can? :delete, Guts::Group %> </td> </tr> <% end %> </tbody> </table> <% else %> <p>No groups have been added.</p> <% end %> </div> -</div> \ No newline at end of file +</div>