Sha256: e452d5be09b82ec2f78ff73cad45b669e321ddb38ebec393b835f01d26b33ee9
Contents?: true
Size: 563 Bytes
Versions: 10
Compression:
Stored size: 563 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: 'fa fa-bars') + field end end end end
Version data entries
10 entries across 10 versions & 1 rubygems