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

26 lines
708 B
Plaintext
Raw Normal View History

2013-11-24 16:11:44 +01:00
%h1= User.model_name.human.pluralize
2013-11-14 10:54:09 +01:00
2013-11-24 16:11:44 +01:00
%table.index_table
2013-11-14 10:54:09 +01:00
%tr
2013-11-24 16:11:44 +01:00
%th= User.human_attribute_name :login
%th= User.human_attribute_name :email
%th= User.human_attribute_name :lastname
%th= User.human_attribute_name :firstname
2013-11-14 10:54:09 +01:00
%th
- @users.each do |user|
2013-11-24 16:11:44 +01:00
%tr(class="#{cycle('odd', 'even')}")
2013-11-14 10:54:09 +01:00
%td= user.login
%td= user.email
%td= user.lastname
%td= user.firstname
2013-11-24 16:11:44 +01:00
%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'
2013-11-14 10:54:09 +01:00
2013-11-24 16:11:44 +01:00
%br/
2013-11-14 10:54:09 +01:00
= link_to 'New User', new_user_path