foodsoft/app/views/admin/users/show.html.haml

40 lines
1.1 KiB
Text
Raw Normal View History

- title @user.nick
.row-fluid
.span3
.well
%h4 Person
%p Mitglied seit #{distance_of_time_in_words(Time.now, @user.created_on)}
%dl
%dt Nick
%dd= @user.nick
%dt Name
%dd= h @user.name
%dt Email
%dd= @user.email
%dt Telefon
%dd= @user.phone
%dt Zugriff auf
%dd= format_roles(@user)
.span5
.well
%h4 Einstellungen
%table.table
- for setting in User::setting_keys.keys
%tr
%td= User::setting_keys[setting]
%td= @user.settings[setting] == '1' ? 'ja' : 'nein'
.span3
.well
%h4 Gruppenabos
%ul.unstyled
- for membership in Membership.find_all_by_user_id(@user.id)
%li= link_to(membership.group.name, [:admin, membership.group])
%hr/
%p
= link_to 'Bearbeiten', edit_admin_user_path(@user), class: 'btn'
= link_to 'Löschen', [:admin, @user], :confirm => "Willst du #{@user.first_name} wirklich rausschmeißen?",
:method => :delete, class: 'btn btn-danger'
= link_to "Nachricht senden", new_message_path(:message => {:mail_to => @user.id}), class: 'btn'