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"}
|
|
|
|
- if @total > 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
|
|
|
|
%th Nick
|
|
|
|
%th Vorname
|
|
|
|
%th Nachname
|
|
|
|
%th Email
|
|
|
|
%th Telefon
|
|
|
|
%th Bestellgruppe
|
|
|
|
%th Arbeitsgruppe(n)
|
|
|
|
%tbody
|
|
|
|
- for user in @users
|
|
|
|
%tr{:class => cycle('even','odd', :name => 'users')}
|
|
|
|
- groups = user.groups
|
2009-01-14 12:46:01 +01:00
|
|
|
- ordergroup = groups.detect { |group| group.is_a?(Ordergroup) }
|
|
|
|
- workgroups = groups.select { |group| !group.is_a?(Ordergroup) }.collect(&:name)
|
2009-01-06 11:49:19 +01:00
|
|
|
%td= link_to user.nick, {:controller => "messages", :action => "user", :id => user}, :title => _('Send user an email')
|
|
|
|
%td=h user.first_name if @current_user.role_admin? || user.settings["profile.nameIsPublic"] == '1'
|
|
|
|
%td=h user.last_name if @current_user.role_admin? || user.settings["profile.nameIsPublic"] == '1'
|
|
|
|
%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'
|
|
|
|
%td=h ordergroup.name if ordergroup
|
|
|
|
%td=h workgroups.join(', ')
|
|
|
|
|