foodsoft/app/views/foodcoop/users/_users.html.haml
2013-02-22 00:19:22 +01:00

23 lines
937 B
Text

- if User.count > 20
= items_per_page
= pagination_links_remote @users
%table.table.table-striped
%thead
%tr
%th= t 'simple_form.labels.user.nick'
%th= t 'simple_form.labels.user.name'
%th= t 'simple_form.labels.user.email'
%th= t 'simple_form.labels.user.phone'
%th= t 'simple_form.labels.user.ordergroup'
%th= t 'simple_form.labels.user.workgroup', count: 3
%tbody
- for user in @users
%tr
%td= user.nick
%td= user.name if @current_user.role_admin? || user.settings["profile.nameIsPublic"] == '1'
%td= user.email if @current_user.role_admin? || user.settings["profile.emailIsPublic"] == '1'
%td= user.phone if @current_user.role_admin? || user.settings["profile.phoneIsPublic"] == '1'
%td= user.ordergroup_name
%td= user.workgroups.collect(&:name).join(', ')
%td= link_to_new_message(message_params: {mail_to: user.id})