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

24 lines
1 KiB
Text

- title "Mein Profil", false
.row-fluid
.span7
%h3
= h @current_user.nick
%small
(Mitglied seit: #{distance_of_time_in_words(Time.now, @current_user.created_on)})
= simple_form_for(@current_user, :url => { :action => 'update_profile'}) do |f|
= render :partial => 'shared/user_form_fields', :locals => {:f => f}
.form-actions
= submit_tag 'Speichern', class: 'btn'
.span5
%h2 Du bist Mitglied in folgenden Gruppen
%table.table.table-striped
- @current_user.memberships.each do |membership|
%tr
%td= membership.group.name
%td= link_to "Neue Mitglieder einladen", new_invite_path(id: membership.group_id),
remote: true, class: 'btn btn-success btn-small'
- if membership.group.type != 'Ordergroup'
%td= link_to "Mitgliedschaft beenden", cancel_membership_path(membership_id: membership),
confirm: "Bist Du sicher, dass Du Deine Mitgliedschaft beenden willst?", method: :post,
class: 'btn btn-danger btn-small'