Sha256: 5b3e3cf6690da8e653ae4a5f38001c30866c58382f6a9beb018a49b4f42b2520
Contents?: true
Size: 1.63 KB
Versions: 2
Compression:
Stored size: 1.63 KB
Contents
<% order_states_for_select = Order.aasm_states.collect{ |state| [state.name, t(state.name, :scope => [:order,:status])] } output = { :sEcho => params[:sEcho], :iTotalRecords => @orders.total_entries || 0, :iTotalDisplayRecords => @orders.size, :aaData => @orders.collect do |order| details_count = order.order_details.count product_names = details_count > 1 ? '<br/><p class="product-name" >'+order.order_details.collect(&:name).join('<br />')+'</p>' : '' [ (details_count > 1 ? content_tag(:div, content_tag(:div, ' ', :class => 'image'), :id => polymorphic_html_id(order), :class => 'some-variants plus') : content_tag(:div, '', :id => polymorphic_html_id(order))), order.id, price_with_currency order.total, content_tag(:div, link_to( details_count != 1 ? "#{details_count} #{t('product', :count => details_count)}" : order.order_details.first.name.capitalize, [forgeos_commerce, :admin,order] ), :class => 'product-name')+ product_names, order.created_at.to_s(:short), select_tag(:status, options_for_select(order_states_for_select, order.status), :class => 'customize'), link_to('', [forgeos_commerce, :edit, :admin, order], :class => 'small-icons edit-link') + link_to('', [forgeos_commerce, :admin, order], :remote => true, :method => :delete, :confirm => t('order.destroy.confirm').capitalize, :class => 'small-icons destroy-link', :id => polymorphic_html_id(order, '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/users/edit.json.erb |
forgeos_commerce-1.9.0 | app/views/admin/users/edit.json.erb |