foodsoft/app/views/home/profile.html.haml
wvengen 7841245795 migrate to Rails 4.0 (closes foodcoops#214)
Conflicts:
	Gemfile.lock
2014-02-24 12:46:28 +01:00

23 lines
1 KiB
Text

- title t('.title'), false
.row-fluid
.span7
%h3
= h(t('.user.title', user: show_user))
%small= t '.user.since', when: distance_of_time_in_words(Time.now, @current_user.created_on)
= simple_form_for(@current_user, :url => update_profile_path) do |f|
= render :partial => 'shared/user_form_fields', :locals => {:f => f, :password_autocomplete => 'store-only'}
.form-actions
= submit_tag t('ui.save'), class: 'btn'
.span5
%h2= t '.groups.title'
%table.table.table-striped
- @current_user.memberships.each do |membership|
%tr
%td= membership.group.name
%td= link_to t('.groups.invite'), new_invite_path(id: membership.group_id),
remote: true, class: 'btn btn-success btn-small'
- if membership.group.type != 'Ordergroup'
%td= link_to t('.groups.cancel'), cancel_membership_path(membership_id: membership),
:data => {confirm: t('.groups.cancel_confirm')}, method: :post,
class: 'btn btn-danger btn-small'