Sha256: 94d5f0af0ccd8d571cfd1e38b4803c3c11e06efb0be44895897977acfb5b89b7

Contents?: true

Size: 1.11 KB

Versions: 2

Compression:

Stored size: 1.11 KB

Contents

<%
  output = {
    :sEcho => params[:sEcho],
    :iTotalRecords => @product_types.total_entries || 0,
    :iTotalDisplayRecords => @product_types.size,
    :aaData => @product_types.collect do |product_type|
      products_count = product_type.products.count
      [
        content_tag(:div, content_tag(:div, '', :class=>'handler') + content_tag(:div, '', :class => 'small-icons product-types'), :id => polymorphic_html_id(product_type), :class => 'handler_container'),
        content_tag(:div, link_to(product_type.name, [forgeos_commerce, :edit, :admin, product_type]), :class => 'product-name'),
        "#{products_count} #{t :product, :count => products_count}",
        link_to('', [forgeos_commerce, :edit, :admin, product_type], :class => 'small-icons edit-link') +
        link_to('', [forgeos_commerce, :admin, product_type],
          :remote => true,
          :method => :delete,
          :confirm => t('product_type.destroy.confirm').capitalize,
          :class => 'small-icons destroy-link',
          :id => polymorphic_html_id(product_type, 'destroy')
        )
      ]
    end
  }
-%>
<%= raw output.to_json -%>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
forgeos_commerce-1.9.1.rc1 app/views/admin/product_types/index.json.erb
forgeos_commerce-1.9.0 app/views/admin/product_types/index.json.erb