Sha256: bd3b67b9281016330a7920c29a10cd80ca834ff0d567a5538f50fb3d2dad54a6

Contents?: true

Size: 1.14 KB

Versions: 2

Compression:

Stored size: 1.14 KB

Contents

<% 
  output = {
    :sEcho => params[:sEcho],
    :iTotalRecords => @special_offers.total_entries || 0,
    :iTotalDisplayRecords => @special_offers.size,
    :aaData => @special_offers.collect do |special_offer|
      klass = special_offer.active? ? 'see-on' : 'see-off'
      [
        content_tag(:div, content_tag(:div, '', :class => 'handler') + content_tag(:div, '', :class => 'small-icons offers'), :id => polymorphic_html_id(special_offer), :class => 'handler_container'),
        link_to(special_offer.name, [forgeos_commerce, :admin, special_offer]),
        link_to('', [forgeos_commerce, :activate, :admin, special_offer],
          :remote => true,
          :class => "small-icons #{klass}",
          :id => polymorphic_html_id(special_offer, 'show')
        ),
        special_offer.use,
        link_to('', [forgeos_commerce, :admin, special_offer],
          :remote => true,
          :method => :delete,
          :confirm => I18n.t('special_offer.destroy.confirm').capitalize,
          :class => 'small-icons destroy-link',
          :id => polymorphic_html_id(special_offer, '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/special_offers/index.json.erb
forgeos_commerce-1.9.0 app/views/admin/special_offers/index.json.erb