Guest User

Untitled

a guest
Feb 19th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. %h3= "#{@profile.login.capitalize}'s Photos"
  2.  
  3. #profile_photo_list
  4. - @profile.photos.each do |photo|
  5. =link_to(image_tag(photo.small, :alt => photo.caption, :title => photo.caption), photo.large, :rel => 'lightbox-profile', :class => 'thumb_small', :id => "photo_#{photo.id}", :title => photo.caption)
  6.  
  7. #photo_upload
  8. // Flash uploader goes in this div.
  9. - form_for (@photo||Photo.new), :action => Photos.url(:create), :multipart => true do
  10. %p= file_control :file, :label => "File:"
  11. %p= text_control :caption, :label => "Caption:"
  12. = hidden_control :profile_id, :value => @profile.id
  13. %p= submit_button "<span>Upload</span>"
  14.  
  15. .clear
  16.  
  17. :javascript
  18. var swfu;
  19.  
  20. window.onload = function () {
  21. swfu = new SWFUpload({
  22. // Create the custom swfupload_photos_path in the routes.rb file
  23. upload_url : '<%= swfupload_album_photos_path(@album.id) -%>',
  24. flash_url : '/flash/swfupload_f9.swf',
  25.  
  26. file_size_limit : '53072',
  27. file_types : '*.jpg',
  28. file_types_description : 'JPG Images',
  29. file_upload_limit : '0',
  30.  
  31. file_queue_error_handler : fileQueueError,
  32. file_dialog_complete_handler : fileDialogComplete,
  33. upload_progress_handler : uploadProgress,
  34. upload_error_handler : uploadError,
  35. upload_success_handler : uploadSuccess,
  36. upload_complete_handler : uploadComplete,
  37.  
  38. custom_settings : {
  39. upload_target : 'divFileProgressContainer'
  40. },
  41.  
  42. debug: false
  43.  
  44. });
  45. };
Add Comment
Please, Sign In to add comment