osem-fcy/app/views/admin/users/show.html.haml

14 lines
374 B
Text

- if can? :edit, @user
.pull-right
= link_to "Edit", edit_admin_user_path(@user), class: 'btn btn-primary'
%table.table
- @show_attributes.each do |attr|
%tr
%td{class: 'table20'}
%b
= attr.capitalize.gsub('_', ' ')
- if attr == 'roles'
%td
= show_roles(@user.get_roles)
- else
%td= @user.send(attr)