2013-09-20 22:40:13 +02:00
|
|
|
- title show_user(@user)
|
2012-10-15 21:19:17 +02:00
|
|
|
|
|
|
|
.row-fluid
|
|
|
|
.span3
|
|
|
|
.well
|
2013-02-03 19:38:18 +01:00
|
|
|
%h4= t '.person'
|
|
|
|
%p= t '.member_since', time: distance_of_time_in_words(Time.now, @user.created_on)
|
2012-10-15 21:19:17 +02:00
|
|
|
%dl
|
2013-09-20 22:40:13 +02:00
|
|
|
- if FoodsoftConfig[:use_nick]
|
2013-12-12 00:13:19 +01:00
|
|
|
%dt= heading_helper User, :nick
|
2013-09-20 22:40:13 +02:00
|
|
|
%dd= @user.nick
|
2013-12-12 00:13:19 +01:00
|
|
|
%dt= heading_helper User, :name
|
2012-10-15 21:19:17 +02:00
|
|
|
%dd= h @user.name
|
2013-12-12 00:13:19 +01:00
|
|
|
%dt= heading_helper User, :email
|
2012-10-15 21:19:17 +02:00
|
|
|
%dd= @user.email
|
2013-12-12 00:13:19 +01:00
|
|
|
%dt= heading_helper User, :phone
|
2012-10-15 21:19:17 +02:00
|
|
|
%dd= @user.phone
|
2015-03-03 14:55:30 +01:00
|
|
|
%dt= heading_helper User, :last_login
|
|
|
|
%dd= format_time(@user.last_login)
|
|
|
|
%dt= heading_helper User, :last_activity
|
|
|
|
%dd= format_time(@user.last_activity)
|
2013-02-03 19:38:18 +01:00
|
|
|
%dt= t 'admin.access_to'
|
2012-10-15 21:19:17 +02:00
|
|
|
%dd= format_roles(@user)
|
|
|
|
.span5
|
|
|
|
.well
|
2013-02-03 19:38:18 +01:00
|
|
|
%h4= t '.preference'
|
2012-10-15 21:19:17 +02:00
|
|
|
%table.table
|
2013-06-06 04:29:53 +02:00
|
|
|
- @user.settings.profile.each do |key, setting|
|
2012-10-15 21:19:17 +02:00
|
|
|
%tr
|
2013-06-06 04:29:53 +02:00
|
|
|
%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'))
|
2012-10-15 21:19:17 +02:00
|
|
|
.span3
|
|
|
|
.well
|
2013-02-03 19:38:18 +01:00
|
|
|
%h4= t '.groupabos'
|
2012-10-15 21:19:17 +02:00
|
|
|
%ul.unstyled
|
2014-02-20 15:04:53 +01:00
|
|
|
- for membership in Membership.where(user: @user)
|
2012-10-15 21:19:17 +02:00
|
|
|
%li= link_to(membership.group.name, [:admin, membership.group])
|
|
|
|
|
|
|
|
%hr/
|
|
|
|
%p
|
2013-04-04 02:49:52 +02:00
|
|
|
= link_to t('ui.edit'), edit_admin_user_path(@user), class: 'btn'
|
2014-10-18 17:52:06 +02:00
|
|
|
= link_to t('ui.delete'), [:admin, @user], method: :delete, class: 'btn btn-danger',
|
2016-03-04 23:13:28 +01:00
|
|
|
data: {confirm: t('ui.confirm_delete', name: @user.first_name)}
|
2014-10-18 17:52:06 +02:00
|
|
|
= link_to t('.sudo'), sudo_admin_user_path(@user), method: :post, class: 'btn',
|
|
|
|
data: {confirm: t('.confirm_sudo', user: @user.first_name)}
|