Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %h3= "#{@profile.login.capitalize}'s Photos"
- #profile_photo_list
- - @profile.photos.each do |photo|
- =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)
- #photo_upload
- // Flash uploader goes in this div.
- - form_for (@photo||Photo.new), :action => Photos.url(:create), :multipart => true do
- %p= file_control :file, :label => "File:"
- %p= text_control :caption, :label => "Caption:"
- = hidden_control :profile_id, :value => @profile.id
- %p= submit_button "<span>Upload</span>"
- .clear
- :javascript
- var swfu;
- window.onload = function () {
- swfu = new SWFUpload({
- // Create the custom swfupload_photos_path in the routes.rb file
- upload_url : '<%= swfupload_album_photos_path(@album.id) -%>',
- flash_url : '/flash/swfupload_f9.swf',
- file_size_limit : '53072',
- file_types : '*.jpg',
- file_types_description : 'JPG Images',
- file_upload_limit : '0',
- file_queue_error_handler : fileQueueError,
- file_dialog_complete_handler : fileDialogComplete,
- upload_progress_handler : uploadProgress,
- upload_error_handler : uploadError,
- upload_success_handler : uploadSuccess,
- upload_complete_handler : uploadComplete,
- custom_settings : {
- upload_target : 'divFileProgressContainer'
- },
- debug: false
- });
- };
Add Comment
Please, Sign In to add comment