Sha256: 4e1d27ea1c77360f7d2c0a806c6e7155c05b97f2f59e7099cd0efd02ba4e60a5
Contents?: true
Size: 1.39 KB
Versions: 2
Compression:
Stored size: 1.39 KB
Contents
<div id="image_upload"> <%= form_for(:image, :url => { :controller => 'suppliers', :action => 'upload_image', :method => :post}, :html => { :multipart => true }) do |f| %> <%= render :partial => 'upload_image', :locals => { :f => f } %> <p class="form-buttons"> <% if @status == true %> <button id="upload" type="submit"> <span>Upload Image</span> </button> <% else %> <%= button t("upload") %> <% end %> <%= t('or') %> <%= link_to t("cancel"), "#", :id => "cancel_link" %> </p> <% end %> <h3>Current images:</h3> <% @supplier.images.each do |image| %> <ul> <li><%= sized_image(image, '100x100#') %></li> <li><%= link_to "destroy", { :action => 'destroy_image', :id => image.id}, :method => :delete %></li> <% if image.logo == true %> <li>This image is the current logo.</li> <% else %> <li><%= link_to "appoint logo", { :action => "make_logo", :id => image.id} %></li> <% end %> <% if image.featured == true %> <li>This image is currently featured</li> <% else %> <li><%= link_to "make featured", { :action => "feature_image", :id => image.id} %></li> <% end %> </ul> <% end %> <script> $("#upload").click(function(event){ event.preventDefault(); alert("You are not allowed to create an image without first creating a supplier"); }); </script> </div>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
spree_suppliers-0.0.1 | app/views/admin/suppliers/_image_form.html.erb |
spree_suppliers-0.60.3 | app/views/admin/suppliers/_image_form.html.erb |