foodsoft/app/views/foodcoop/users/_users.html.haml

26 lines
1.0 KiB
Plaintext
Raw Normal View History

- if User.count > 20
= items_per_page
= pagination_links_remote @users
%table.table.table-striped
2009-01-06 11:49:19 +01:00
%thead
%tr
2013-09-20 22:40:13 +02:00
- if FoodsoftConfig[:use_nick]
%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
2009-01-06 11:49:19 +01:00
%tbody
- for user in @users
%tr
2013-09-20 22:40:13 +02:00
- if FoodsoftConfig[:use_nick]
%td= user.nick
2013-10-02 23:43:09 +02:00
%td= user.name if @current_user.role_admin? || user.settings.profile["name_is_public"] || !FoodsoftConfig[:use_nick]
%td= user.email if @current_user.role_admin? || user.settings.profile["email_is_public"]
%td= user.phone if @current_user.role_admin? || user.settings.profile["phone_is_public"]
%td= user.ordergroup_name
%td= user.workgroups.collect(&:name).join(', ')
%td= link_to_new_message(message_params: {mail_to: user.id})
2009-01-06 11:49:19 +01:00