Sha256: cd15172c5bdf8ad18907deac2aaecb4bfbea9da8dcd4e66842e7b1a4d9e56b91
Contents?: true
Size: 1011 Bytes
Versions: 1
Compression:
Stored size: 1011 Bytes
Contents
<% # name: headmin/forms/fields/list # # ==== Options # * +form+ - Form object # * +name+ - Name for the field # * +label+ - Text to show as label. Label will be hidden if value is false # # ==== Examples # Basic version # <%= render 'headmin/forms/fields/list', form: form, name: :websites do |list| %#> # <%= render 'headmin/forms/fields/text', form: list, name: :url do |field, attribute, label| %#> # <%= render 'headmin/forms/text', form: field, attribute: attribute, label: label %#> # <% end %#> # <% end %#> label = local_assigns.has_key?(:label) ? label : nil show_label = label != false %> <%= render 'headmin/forms/fields/base', form: form, name: name, field_type: :list do |list, field_label| %> <%= render 'headmin/forms/repeater', form: list, attribute: :fields, label: show_label ? label || field_label : false, flush: false do |field| %> <%= field.hidden_field :field_type, value: :group %> <%= yield field %> <% end %> <% end %>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
headmin-0.5.2 | app/views/headmin/forms/fields/_list.html.erb |