app/views/droom/people/_form.html.haml in droom-0.2.1 vs app/views/droom/people/_form.html.haml in droom-0.4.1
- old
+ new
@@ -1,21 +1,9 @@
= form_for @person, :html => {:class => 'edit person'} do |f|
.image
- .upload
- - @person.build_image_upload unless @person.image_upload
- = f.fields_for :image_upload do |iuf|
- .uploadbox{:data => {:action => "upload", :url => cropper.uploads_path(:format => :js, :for => "person"), :scale => 2}}
- = iuf.file_field :file, :class => 'file_upload', :accept => "image"
- .img
- - if @person.image_upload.persisted?
- = link_to image_tag(@person.image.url(:cropped), :width => 260, :height => 260), cropper.edit_upload_url(@person.image_upload), :data => {:action => "recrop"}, :class => "recrop"
- = link_to t(:detach_upload), '#', :class => 'detach'
- .prompt
- = link_to t(:click_to_upload), cropper.new_upload_url, :class => 'picker'
- .droppable
- .note
- = t :drop_to_upload
+ - @person.build_image_upload unless @person.image_upload
+ = render :partial => "cropper/uploads/pick", :locals => {:upload => @person.image_upload, :holder => @person, :multiplier => 4}
- if Droom.use_forenames?
%p.name
= f.label :forename
%br
@@ -47,21 +35,29 @@
= f.label :mobile, :class => "optional"
%br
= f.text_field :mobile
- if admin?
+ - if Droom.use_organisations?
+ %p.organisation
+ = f.label :organisation_id
+ %br
+ = f.select :organisation_id, Droom::Organisation.for_selection, :class => 'preferences'
+
- if @person.new_record?
%p.admin
= f.check_box :invite_on_creation, :class => 'invite'
= f.label :invite_on_creation
= f.check_box :admin_user
= f.label :admin_user
- / %p.organisation
- / = f.label :organisation_id, :class => "optional"
- / %br
- / = f.select :organisation_id, Droom::Organisation.for_selection
-
+ - if Droom.use_biogs?
+ - @person.description = "<p></p>" unless @person.description?
+ .description.wysihtml
+ .toolbar#t1
+ = render 'droom/shared/toolbar'
+ = f.text_area :description
+
.buttons
- if current_user.is_person?(@person)
= f.submit t(:save_your_profile)
- else
= f.submit t(:save_person)