Sha256: 0b3004817c183e55f95141967bd412280a3f1813a13fdc4e2a8cccee5c46ee1e

Contents?: true

Size: 562 Bytes

Versions: 49

Compression:

Stored size: 562 Bytes

Contents

module Para
  module OrderingHelper
    def reorder_anchor(options = {})
      options[:class] ||= ''
      options[:class] = [options[:class], 'order-anchor'].join(' ')

      field = if (form = options.delete(:form))
        form.hidden_field(:position, class: 'resource-position-field')
      else
        value = options.delete(:value) || 0
        hidden_field_tag(:position, value, class: 'resource-position-field')
      end

      content_tag(:span, options) do
        content_tag(:i, '', class: 'sort-dots') +
        field
      end
    end
  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
para-0.12.4 app/helpers/para/ordering_helper.rb
para-0.12.3 app/helpers/para/ordering_helper.rb
para-0.12.2 app/helpers/para/ordering_helper.rb
para-0.12.1 app/helpers/para/ordering_helper.rb
para-0.12.0 app/helpers/para/ordering_helper.rb
para-0.11.4 app/helpers/para/ordering_helper.rb
para-0.11.3 app/helpers/para/ordering_helper.rb
para-0.11.2 app/helpers/para/ordering_helper.rb
para-0.11.1 app/helpers/para/ordering_helper.rb
para-0.11.0 app/helpers/para/ordering_helper.rb
para-0.10.0 app/helpers/para/ordering_helper.rb
para-0.9.4 app/helpers/para/ordering_helper.rb
para-0.9.3.3 app/helpers/para/ordering_helper.rb
para-0.9.3.2 app/helpers/para/ordering_helper.rb
para-0.9.3.1 app/helpers/para/ordering_helper.rb
para-0.9.2 app/helpers/para/ordering_helper.rb
para-0.9.0 app/helpers/para/ordering_helper.rb
para-0.8.15 app/helpers/para/ordering_helper.rb
para-0.8.14 app/helpers/para/ordering_helper.rb
para-0.8.13 app/helpers/para/ordering_helper.rb