2016-03-04 19:03:52 +01:00
|
|
|
- if User.undeleted.count > 20
|
2012-10-08 16:20:24 +02:00
|
|
|
= items_per_page
|
|
|
|
= pagination_links_remote @users
|
2012-10-08 15:24:32 +02:00
|
|
|
%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]
|
2022-05-27 17:06:25 +02:00
|
|
|
%th= sort_link_helper heading_helper(User, :nick), "nick"
|
|
|
|
%th= sort_link_helper heading_helper(User, :name), "name"
|
|
|
|
%th= sort_link_helper heading_helper(User, :email), "email"
|
|
|
|
%th= sort_link_helper heading_helper(User, :phone), "phone"
|
|
|
|
%th= sort_link_helper heading_helper(User, :ordergroup), "ordergroup"
|
2013-10-09 23:00:07 +02:00
|
|
|
%th= heading_helper User, :workgroup, count: 3
|
2009-01-06 11:49:19 +01:00
|
|
|
%tbody
|
2012-10-08 15:24:32 +02:00
|
|
|
- for user in @users
|
|
|
|
%tr
|
2013-09-20 22:40:13 +02:00
|
|
|
- if FoodsoftConfig[:use_nick]
|
2013-10-29 18:58:04 +01:00
|
|
|
%td= show_user user
|
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]
|
2013-06-06 04:29:53 +02:00
|
|
|
%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"]
|
2012-10-08 15:24:32 +02:00
|
|
|
%td= user.ordergroup_name
|
|
|
|
%td= user.workgroups.collect(&:name).join(', ')
|
2009-01-06 11:49:19 +01:00
|
|
|
|