-
Notifications
You must be signed in to change notification settings - Fork 194
/
index.html.erb
36 lines (33 loc) · 1.25 KB
/
index.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<% page_title "Groups" %>
<section>
<h1>Groups</h1>
<p class="warning remove-top-margin">Do not create groups without consulting GDS.</p>
<%= link_to "Create group", new_admin_policy_group_path, class: "btn btn-default new_resource", title: "Create a group" %>
<table class="policy_groups table table-striped table-bordered add-top-margin">
<thead>
<tr class="table-header">
<th width="30%">Name</th>
<th>Email</th>
<th></th>
</tr>
</thead>
<tbody>
<% @policy_groups.each do |policy_group| %>
<%= content_tag_for(:tr, policy_group) do %>
<td class="name"><%= link_to policy_group.name, edit_admin_policy_group_path(policy_group), title: "Edit group #{policy_group.name}" %></td>
<td class="email"><%= policy_group.email %></td>
<td>
<% if can?(:delete, PolicyGroup) %>
<%= button_to 'Delete',
admin_policy_group_path(policy_group),
method: :delete,
title: "Delete",
data: { confirm: "Are you sure you want to delete the group?" },
class: "btn btn-danger" %>
<% end %>
</td>
<% end %>
<% end %>
</tbody>
</table>
</section>