Skip to content

Instantly share code, notes, and snippets.

@mitchellhenke
Created December 17, 2013 04:42
Show Gist options
  • Select an option

  • Save mitchellhenke/8000163 to your computer and use it in GitHub Desktop.

Select an option

Save mitchellhenke/8000163 to your computer and use it in GitHub Desktop.
module Review
module Account
class ReviewImagesController < ApplicationController
def create
puts params
render :json => {:stuff=>params}.to_json
end
end
end
end
<section id="upload-wrapper" style="display:none;">
<div id="upload-content">
<%= form_for Review::ReviewImage.new, :url => account_create_review_images_path(@order.id), :id => "fileupload", :method => :post do |f| %>
<%= f.hidden_field :item, :value => "" %>
<div class="span5">
<!-- The global progress bar -->
<div class="progress progress-success progress-striped active fade">
<div class="bar" style="width:0%;"></div>
</div>
</div>
<!-- The loading indicator is shown during image processing -->
<div class="fileupload-loading"></div>
<br>
<%= f.file_field :attachment, :multipart => true, :name=>"review_image[attachment]" %>
<!-- The table listing the files available for upload/download -->
<div id="launchpad" class="launchpad">
<div class="table table-striped" style="position:absolute; z-index: 11;"><div class="files" data-toggle="modal-gallery" data-target="#modal-gallery"></div></div>
<span>Drag and drop images here</span>
</div>
<!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
<div class="clear"></div>
<div class="row fileupload-buttonbar">
<button type="submit" class="btn btn-primary start button dark" id="upload_photos">
<span aria-hidden="true" class="upload">upload photos</span>
</button>
<%= f.submit "CLICK" %>
<button type="reset" class="btn btn-warning cancel button dark cancel_upload">
<span aria-hidden="true" class="upload">cancel upload</span>
</button>
</div>
<% end %>
</div>
</section>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment