Sha256: bec1c5aa4c4c4dd3974685d9dcd307fb62698437f29f79f806d66eef9489d73b

Contents?: true

Size: 811 Bytes

Versions: 1

Compression:

Stored size: 811 Bytes

Contents

module Alchemy::Custom::Model::Admin::OrdersHelper
  def order_path(options = {})
    new_polymorphic_path([:admin, base_class.to_s.pluralize.underscore, :order], options)
  end

  def index_ordered_path(obj = nil, options = {})
    if obj.nil?
      polymorphic_path([:admin, base_class], options)
    else
      polymorphic_path([:admin, obj], options)
    end
  end

  def update_order_path(options = {})
    polymorphic_path([:admin, base_class.to_s.pluralize.underscore, :order], options)
  end

  def print_order_identify(el)
    "el_#{el.id}"
  end

  def printelement_to_order(el)
    content_tag(:span, class: "el_title name") do
      el.name
    end
  end

  def print_sort_icon(el)
    content_tag(:span, class: "icon") do
      content_tag(:i, nil, {class: "fa fa-arrow-right"})
    end
  end


end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
alchemy-custom-model-0.1.9 app/helpers/alchemy/custom/model/admin/orders_helper.rb