internetee-registry/app/views/admin/admin_users/index.haml
2015-04-16 16:31:22 +03:00

31 lines
962 B
Text

- content_for :actions do
= link_to(t(:create_new_user), new_admin_admin_user_path, class: 'btn btn-primary')
= render 'shared/title', name: t(:admin_users)
.row
.col-md-12
.table-responsive
%table.table.table-hover.table-bordered.table-condensed
%thead
%tr
%th{class: 'col-xs-2'}
= sort_link(@q, 'username')
%th{class: 'col-xs-2'}
= sort_link(@q, 'email', t(:email))
%th{class: 'col-xs-2'}
= sort_link(@q, 'identity_code', t(:identity_code))
%th{class: 'col-xs-2'}
= sort_link(@q, 'role', t(:role))
%tbody
- @admin_users.each do |x|
%tr
%td= link_to(x, [:admin, x])
%td= x.email
%td= x.identity_code
- if x.roles
%td= t(x.roles.first)
- else
%td
.row
.col-md-12
= paginate @admin_users