foodsoft/app/views/index/myProfile.rhtml

31 lines
1.3 KiB
Plaintext

<h1><%= _('edit my profile')%></h1>
<%= _('Here you can change your preferences. For example you can change your phone number or your password.
<br>
You can also see in which workgroups you are.
<p></p>
')%>
<div class="left_column" style="width: 60%;">
<div class="box_title"><h2>Nickname: <%= h @user.nick %><small> (Mitglied seit: <%= distance_of_time_in_words(Time.now, @user.created_on) -%>)</small></h2></div>
<div class="column_content">
<% form_tag(:action => 'updateProfile') do %>
<%= render :partial => 'users/form' %>
<p style="clear:both">
<%= submit_tag 'Speichern' %> | <%= link_to 'Abbrechen', :action => 'myProfile' %></p>
<% end %>
</div>
</div>
<div class="right_column" style="width: 35%;">
<div class="box_title"><h2>Du bist Mitglied in folgenden Gruppen</h2></div>
<div class="column_content">
<% for membership in Membership.find_all_by_user_id(@user.id) %>
<p>
<%= link_to(membership.group.name, :action => 'showGroup', :id => membership.group) %>
<% if membership.group.type != 'OrderGroup' %>
(<%= link_to _("Cancel membership"), { :action => 'cancel_membership', :id => membership }, :confirm => _("Are you sure to cancel this membership?"), :method => :post %>)
<% end %>
</p>
<% end %>
</div>
</div>