admin global nav

This commit is contained in:
Mark Moser
2016-09-22 16:29:19 -05:00
parent aeef75bf8b
commit 5398a8ea8b
14 changed files with 64 additions and 67 deletions

View File

@ -11,7 +11,7 @@
<td><%= link_to user.name, admin_user_path(user.to_i) %></td>
<td><%= mail_to(user.email) %></td>
<td><%= user.role %></td>
<td><%= link_to 'edit', admin_edit_user_path(user.to_i), { class: 'btn tertiary-btn' } %></td>
<td><%= link_to 'edit', admin_edit_user_path(user.to_i), { class: 'btn tertiary-btn' } if policy(user).edit? %></td>
</tr>
<% end %>
</table>

View File

@ -4,4 +4,4 @@
<h1>Users</h1>
<%= render partial: 'admin/user/table_list', locals: { users: @users } %>
<%= link_to('New User', admin_new_user_path, { class: 'btn' }) %>
<%= link_to('New User', admin_new_user_path, { class: 'btn' }) if policy(User).create? %>