Sha256: 449affc9094a093aadbcc0dae21b8d8a021960b10e9be7e941f8d2c70f00a5cc

Contents?: true

Size: 1.94 KB

Versions: 8

Compression:

Stored size: 1.94 KB

Contents

<%= render :partial => 'admin/shared/product_sub_menu' %>

<%= render :partial => 'admin/shared/product_tabs', :locals => {:current => 'Images'} %>

<table class="index sortable" data-hook="images_table">
  <tr data-hook="images_header">
    <th><%= t(:thumbnail) %></th>
    <% if @product.has_variants? %>
      <th><%= Variant.model_name.human %></th>
    <% end %>
    <th><%= t(:alt_text) %></th>
    <th><%= t(:action) %></th>
  </tr>

  <% @product.images.each do |image| %>
    <tr id="<%= dom_id(image) %>" data-hook="images_row">
      <td>
        <span class="handle"></span>
        <%= link_to image_tag(image.attachment.url(:mini)), image.attachment.url(:product) %>
      </td>
      <% if @product.has_variants? %>
        <td><%= t(:all) %></td>
      <% end %>
      <td><%= image.alt %></td>
      <td class="actions">
        <%= link_to_with_icon 'edit', t(:edit), edit_admin_product_image_url(@product, image), :class => 'edit' %>
        &nbsp;
        <%= link_to_delete image, {:url => admin_product_image_url(@product, image) }%>
      </td>
    </tr>
  <% end %>

  <% @product.variants.each do |variant| %>
    <% variant.images.each do |image| %>
      <tr id="<%= dom_id(image) %>" data-hook="images_row">
        <td><span class="handle"></span><%= link_to image_tag(image.attachment.url(:mini)), image.attachment.url(:product) %></td>
        <% if @product.has_variants? %>
          <td><%= variant.options_text %></td>
        <% end %>
        <td><%= image.alt %></td>
        <td class="actions">
          <%= link_to_with_icon 'edit', t(:edit), edit_admin_product_image_url(@product, image) %>
          &nbsp;
          <%= link_to_delete image, {:url => admin_product_image_url(@product, image) }%>
        </td>
      </tr>
    <% end %>
  <% end %>
</table>

<div id="images" data-hook></div>
<br />
<p data-hook="links">
    <%= link_to icon('add') + ' ' + t(:new_image), new_admin_product_image_url(@product), :id => 'new_image_link' %>
</p>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
spree_core-0.70.7 app/views/admin/images/index.html.erb
spree_core-0.70.6 app/views/admin/images/index.html.erb
spree_core-0.70.5 app/views/admin/images/index.html.erb
spree_core-0.70.4 app/views/admin/images/index.html.erb
spree_core-0.70.3 app/views/admin/images/index.html.erb
spree_core-0.70.2 app/views/admin/images/index.html.erb
spree_core-0.70.1 app/views/admin/images/index.html.erb
spree_core-0.70.0 app/views/admin/images/index.html.erb