2009-01-06 11:49:19 +01:00
|
|
|
%p
|
|
|
|
%table{:style => "width:100%"}
|
|
|
|
%tr
|
|
|
|
%td
|
|
|
|
= pagination_links_remote @users
|
|
|
|
%td{:style => "text-align:right"}
|
|
|
|
- if @total > 20
|
|
|
|
= items_per_page
|
|
|
|
%table.list
|
|
|
|
%thead
|
|
|
|
%tr
|
|
|
|
%th= _('Username')
|
|
|
|
%th= _('First name')
|
|
|
|
%th= _('Last name')
|
|
|
|
%th= _('Email')
|
|
|
|
%th= _('Roles')
|
|
|
|
%th= _('Last Login')
|
|
|
|
%th{:style => "width:3em"}
|
|
|
|
%tbody
|
|
|
|
- for user in @users
|
|
|
|
- roles = Array.new
|
|
|
|
- roles << 'Admin' if user.role_admin?
|
|
|
|
- roles << 'Finanzen' if user.role_finance?
|
|
|
|
- roles << 'Lieferanten' if user.role_suppliers?
|
|
|
|
- roles << 'Artikel' if user.role_article_meta?
|
|
|
|
- roles << 'Bestellung' if user.role_orders?
|
|
|
|
%tr{:class => cycle('even','odd', :name => 'users')}
|
|
|
|
%td= link_to user.nick, :action => 'showUser', :id => user
|
|
|
|
%td=h user.first_name
|
|
|
|
%td=h user.last_name
|
|
|
|
%td=h user.email
|
|
|
|
%td=h roles.join(', ')
|
2009-01-06 15:45:19 +01:00
|
|
|
%td=h format_date_time(user.last_login)
|
2009-01-06 11:49:19 +01:00
|
|
|
%td
|
|
|
|
= link_to(image_tag('b_edit.png', :size => "16x16", :border => "0", :alt => 'Benutzer_in bearbeiten', :title => 'Benutzer_in bearbeiten'), :action => 'editUser', :id => user)
|
|
|
|
= link_to(image_tag('b_drop.png', :size => "16x16", :border => "0", :alt => 'Benutzer_in löschen', :title => 'Benutzer_in löschen'), |
|
|
|
|
{:action => 'destroyUser', :id => user}, |
|
|
|
|
:confirm => 'Willst du ' + user.first_name + ' wirklich löschen?', |
|
|
|
|
:method => "post") |
|