27 lines
729 B
Text
27 lines
729 B
Text
<h2>Edit <%= resource_name.to_s.humanize %></h2>
|
|
<%= render 'flash' %>
|
|
|
|
<%= f_form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
|
|
<%= f.error_messages %>
|
|
|
|
<%= f.password_field :password %>
|
|
<%= f.password_field :password_confirmation %>
|
|
|
|
<%= f.password_field :current_password %>
|
|
|
|
<%= f.file_field :avatar %>
|
|
|
|
<%= f.submit "Update" %>
|
|
<% end %>
|
|
|
|
<% if current_user.dagschotel.present? %>
|
|
<h3>Current Dagschotel:</h3>
|
|
<div>
|
|
<%= image_tag current_user.dagschotel.avatar %>
|
|
</div>
|
|
<% end %>
|
|
|
|
<h4>Choose new Dagschotel:</h4>
|
|
<% Product.all.each do |p| %>
|
|
<%= link_to image_tag(p.avatar), user_dagschotel_path(current_user, p) %>
|
|
<% end %>
|