Sha256: 7014bfd1012b0e1020ba9362f292087ca86e736b4f76d5c1e5584e916be95ebe

Contents?: true

Size: 966 Bytes

Versions: 18

Compression:

Stored size: 966 Bytes

Contents

<%= f.label a.keys.first, class: "form-control-label #{required?(f.object, a) ? 'required' : ''}" %>
<%= render 'slash_admin/shared/tooltip', a: a %>
<% if a[a.keys.first][:multiple].present? %>
  <%= f.select(a.keys.first, a[a.keys.first][:choices],
               { include_blank: a[a.keys.first][:include_blank], required: required?(f.object, a) },
               'data-placeholder': t('slash_admin.view.select_model', model_name: @model_class.human_attribute_name(a.keys.first).singularize.downcase),
               class: 'form-control select2-multiple', multiple: true) %>
<% else %>
  <%= f.select(a.keys.first, a[a.keys.first][:choices],
               { include_blank: a[a.keys.first][:include_blank], required: required?(f.object, a) },
               'data-placeholder': t('slash_admin.view.select_model', model_name: @model_class.human_attribute_name(a.keys.first).singularize.downcase),
               class: 'form-control select2-single') %>
<% end %>

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
slash_admin-1.5.11 app/views/slash_admin/custom_fields/_select.html.erb
slash_admin-1.5.10 app/views/slash_admin/custom_fields/_select.html.erb
slash_admin-1.5.9 app/views/slash_admin/custom_fields/_select.html.erb
slash_admin-1.5.8 app/views/slash_admin/custom_fields/_select.html.erb
slash_admin-1.5.7 app/views/slash_admin/custom_fields/_select.html.erb
slash_admin-1.5.6 app/views/slash_admin/custom_fields/_select.html.erb
slash_admin-1.5.5 app/views/slash_admin/custom_fields/_select.html.erb
slash_admin-1.5.4 app/views/slash_admin/custom_fields/_select.html.erb
slash_admin-1.5.3 app/views/slash_admin/custom_fields/_select.html.erb
slash_admin-1.5.2 app/views/slash_admin/custom_fields/_select.html.erb
slash_admin-1.5.1 app/views/slash_admin/custom_fields/_select.html.erb
slash_admin-1.5 app/views/slash_admin/custom_fields/_select.html.erb
slash_admin-1.4.1 app/views/slash_admin/custom_fields/_select.html.erb
slash_admin-1.4 app/views/slash_admin/custom_fields/_select.html.erb
slash_admin-1.3.5 app/views/slash_admin/custom_fields/_select.html.erb
slash_admin-1.3.4 app/views/slash_admin/custom_fields/_select.html.erb
slash_admin-1.3.3 app/views/slash_admin/custom_fields/_select.html.erb
slash_admin-1.3.2 app/views/slash_admin/custom_fields/_select.html.erb