foodsoft/app/views/home/profile.html.haml

24 lines
1,010 B
Text
Raw Normal View History

2013-02-04 00:46:22 +01:00
- title t('.title'), false
.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)
= simple_form_for(@current_user, :url => { :action => 'update_profile'}) do |f|
2011-06-10 01:36:04 +02:00
= render :partial => 'shared/user_form_fields', :locals => {:f => f}
.form-actions
= submit_tag t('ui.save'), class: 'btn'
.span5
2013-02-04 00:46:22 +01:00
%h2= t '.groups.title'
%table.table.table-striped
- @current_user.memberships.each do |membership|
%tr
%td= membership.group.name
2013-02-04 00:46:22 +01:00
%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'
2013-02-04 00:46:22 +01:00
%td= link_to t('.groups.cancel'), cancel_membership_path(membership_id: membership),
confirm: t('.groups.cancel_confirm'), method: :post,
class: 'btn btn-danger btn-small'