2013-02-04 00:46:22 +01:00
|
|
|
- title t('.title'), false
|
2012-11-12 09:03:23 +01:00
|
|
|
|
|
|
|
.row-fluid
|
|
|
|
.span7
|
|
|
|
%h3
|
2013-09-20 22:40:13 +02:00
|
|
|
= h(t('.user.title', user: show_user))
|
2013-02-04 00:46:22 +01:00
|
|
|
%small= t '.user.since', when: distance_of_time_in_words(Time.now, @current_user.created_on)
|
2013-10-30 01:56:23 +01:00
|
|
|
= simple_form_for(@current_user, :url => update_profile_path) do |f|
|
2014-12-10 21:27:53 +01:00
|
|
|
= render :partial => 'shared/user_form_fields', :locals => {:f => f, :password_autocomplete => 'store-only', with_address: true}
|
2012-11-12 09:03:23 +01:00
|
|
|
.form-actions
|
2013-04-04 02:49:52 +02:00
|
|
|
= submit_tag t('ui.save'), class: 'btn'
|
2014-12-16 21:09:04 +01:00
|
|
|
|
2012-11-12 09:03:23 +01:00
|
|
|
.span5
|
2014-12-16 21:09:04 +01:00
|
|
|
- if @current_user.ordergroup
|
|
|
|
%h3= User.human_attribute_name(:ordergroup, count: 1)
|
|
|
|
%table.table.table-striped
|
2012-11-12 09:03:23 +01:00
|
|
|
%tr
|
2014-12-16 21:09:04 +01:00
|
|
|
%td
|
|
|
|
- if @current_user.ordergroup.users.count > 1
|
|
|
|
%strong= @current_user.ordergroup.name + ':'
|
|
|
|
= @current_user.ordergroup.users.map{|u| show_user u}.join(', ')
|
|
|
|
- else
|
|
|
|
= @current_user.ordergroup.name
|
|
|
|
%td.right
|
2016-03-06 13:56:33 +01:00
|
|
|
- unless FoodsoftConfig[:disable_invite]
|
|
|
|
= link_to t('.groups.invite'), new_invite_path(id: @current_user.ordergroup),
|
|
|
|
remote: true, class: 'btn btn-success btn-small'
|
2016-03-04 17:39:06 +01:00
|
|
|
- if @current_user.workgroups.any?
|
2014-12-16 21:09:04 +01:00
|
|
|
%h3= User.human_attribute_name(:workgroup, count: 2)
|
|
|
|
%table.table.table-striped
|
|
|
|
- @current_user.workgroups.each do |workgroup|
|
|
|
|
%tr
|
|
|
|
%td= workgroup.name
|
|
|
|
%td.right
|
|
|
|
= link_to t('.groups.cancel'), cancel_membership_path(group_id: workgroup),
|
|
|
|
:data => {confirm: t('.groups.cancel_confirm')}, method: :post,
|
|
|
|
class: 'btn btn-danger btn-small'
|