2009-01-06 11:49:19 +01:00
|
|
|
- unless params[:sort_by_ordergroups]
|
|
|
|
%p
|
|
|
|
%table{:style => "width:100%"}
|
|
|
|
%tr
|
|
|
|
%td
|
2009-01-15 12:14:01 +01:00
|
|
|
= pagination_links_remote @users, :update => :users
|
2009-01-06 11:49:19 +01:00
|
|
|
%td{:style => "text-align:right"}
|
2011-05-15 23:43:23 +02:00
|
|
|
- if @users.size > 20
|
2009-01-15 12:14:01 +01:00
|
|
|
= items_per_page :update => :users
|
2009-01-06 11:49:19 +01:00
|
|
|
%table.list
|
|
|
|
%thead
|
|
|
|
%tr
|
2009-03-22 13:25:32 +01:00
|
|
|
%th Benutzername
|
2009-02-02 16:35:43 +01:00
|
|
|
%th Name
|
2009-01-06 11:49:19 +01:00
|
|
|
%th Email
|
|
|
|
%th Telefon
|
|
|
|
%th Bestellgruppe
|
|
|
|
%th Arbeitsgruppe(n)
|
|
|
|
%tbody
|
2011-05-15 23:43:23 +02:00
|
|
|
- users = params[:sort_by_ordergroups] ? @users.sort { |a,b| a.ordergroup.name <=> b.ordergroup.name } : @users
|
|
|
|
- for user in users
|
2009-01-06 11:49:19 +01:00
|
|
|
%tr{:class => cycle('even','odd', :name => 'users')}
|
2012-04-15 19:59:39 +02:00
|
|
|
%td= link_to user.nick, new_message_path(:message => {:mail_to => user.id}), :title => 'Send user an email'
|
2009-02-02 16:35:43 +01:00
|
|
|
%td=h user.name if @current_user.role_admin? || user.settings["profile.nameIsPublic"] == '1'
|
2009-01-06 11:49:19 +01:00
|
|
|
%td=h user.email if @current_user.role_admin? || user.settings["profile.emailIsPublic"] == '1'
|
|
|
|
%td=h user.phone if @current_user.role_admin? || user.settings["profile.phoneIsPublic"] == '1'
|
2009-02-02 16:35:43 +01:00
|
|
|
%td=h user.ordergroup_name
|
2009-02-02 17:12:08 +01:00
|
|
|
%td=h user.workgroups.collect(&:name).join(', ')
|
2009-01-06 11:49:19 +01:00
|
|
|
|