Sha256: c1e2d5753211079678566fde42eefc5ea9148c7ca62077f8172137b21f615050

Contents?: true

Size: 1.21 KB

Versions: 7

Compression:

Stored size: 1.21 KB

Contents

<h2><%= t('images') %></h2>
<%=error_message_on :viewable, :images %>
<table class="index">
  <tr>
    <th><%= t('image') %></th>
    <th><%= t('action') %></th>
  </tr>
  <% viewable.images.each do |image| %>
  <tr>
    <td><%= image_tag image.attachment.url(:small) %></td>
    <td>
      <%= link_to_remote t('delete'),
          :url => admin_image_url(image),
          :method => 'delete',
          :before => "Element.show('img_busy_indicator')", 
          :complete => "Element.hide('img_busy_indicator')",
          :confirm => t("are_you_sure_delete_image"),
          :update => 'image-listing' %>
      <%= image_tag "spinner.gif", :plugin=>"spree", :style => "display:none", :id => 'img_busy_indicator' %>
    </td>
  </tr>
  <% end %>
  <% if viewable.images.empty? %>
    <tr>
      <td colspan="3"><%= t('none_available') %>.</td>
    </tr>
  <% end %>
</table>

<p>
  <%= button_link_to_function t("new_image"), "$('new-img-link').hide();$('new-image').show()", :icon => 'add', :id => "new-img-link" %>
</p>


<table id="new-image" style="display:none">
  <% fields_for :image do |image| %>
    <tr>
      <td>Filename:</td>
      <td><%= image.file_field :attachment, :size => 50 %></td>      
    </tr>
  <% end %>
</table>

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
kdmny-spree-0.0.1 app/views/admin/products/_images.html.erb
spree-0.8.4 app/views/admin/products/_images.html.erb
spree-0.8.5 app/views/admin/products/_images.html.erb
spree-0.8.0 app/views/admin/products/_images.html.erb
spree-0.8.1 app/views/admin/products/_images.html.erb
spree-0.8.2 app/views/admin/products/_images.html.erb
spree-0.8.3 app/views/admin/products/_images.html.erb