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