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

40 lines
1.2 KiB
Text
Raw Normal View History

- title @user.nick
.row-fluid
.span3
.well
%h4= t '.person'
%p= t '.member_since', time: distance_of_time_in_words(Time.now, @user.created_on)
%dl
%dt= t '.nick'
%dd= @user.nick
%dt= t '.name'
%dd= h @user.name
%dt= t '.email'
%dd= @user.email
%dt= t '.phone'
%dd= @user.phone
%dt= t 'admin.access_to'
%dd= format_roles(@user)
.span5
.well
%h4= t '.preference'
%table.table
- for setting in User::setting_keys.keys
%tr
%td= User::setting_keys[setting]
%td= @user.settings[setting] == '1' ? t('simple_form.yes') : t('simple_form.no')
.span3
.well
%h4= t '.groupabos'
%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 t('admin.edit'), edit_admin_user_path(@user), class: 'btn'
= link_to t('admin.delete'), [:admin, @user], :confirm => t('.confirm', user: @user.first_name),
:method => :delete, class: 'btn btn-danger'
= link_to t('.send_message'), new_message_path(:message => {:mail_to => @user.id}), class: 'btn'