agenda-libre-ruby/app/views/users/index.html.haml

26 lines
708 B
Plaintext

%h1= User.model_name.human.pluralize
%table.index_table
%tr
%th= User.human_attribute_name :login
%th= User.human_attribute_name :email
%th= User.human_attribute_name :lastname
%th= User.human_attribute_name :firstname
%th
- @users.each do |user|
%tr(class="#{cycle('odd', 'even')}")
%td= user.login
%td= user.email
%td= user.lastname
%td= user.firstname
%td
= link_to t('show'), user, class: 'view_link'
= link_to t('edit'), edit_user_path(user), class: 'edit_link'
= link_to t('destroy'), user, method: :delete,
data: { confirm: 'Are you sure?' }, class: 'delete_link'
%br/
= link_to 'New User', new_user_path