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

41 lines
1.3 KiB
Text
Raw Normal View History

2013-09-20 22:40:13 +02:00
- title show_user(@user)
.row-fluid
.span3
.well
%h4= t '.person'
%p= t '.member_since', time: distance_of_time_in_words(Time.now, @user.created_on)
%dl
2013-09-20 22:40:13 +02:00
- if FoodsoftConfig[:use_nick]
%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
- @user.settings.profile.each do |key, setting|
%tr
%td= t("simple_form.labels.settings.profile.#{key}")
%td= (setting != true and setting != false) ? setting : (setting === true ? 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('ui.edit'), edit_admin_user_path(@user), class: 'btn'
= link_to t('ui.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'