Sha256: c46ade522fef0df441ae57b3b7b0d24dca4ff1c2ad14058a22bd2e2e4398bd78
Contents?: true
Size: 1.12 KB
Versions: 16
Compression:
Stored size: 1.12 KB
Contents
<% if resource.linked_resource %> <% resorce_holder = [resource.linked_resource] %> <% id_holder = :id %> <% name_holder = :title %> <% active_id_holder = resource.linked_resource.id %> <% end %> <%= f.field_container :linked_resource_id do %> <%= f.label :linked_resource_id, Spree.t('page') %> <%= f.select :linked_resource_id, options_from_collection_for_select(resorce_holder || [], id_holder, name_holder, active_id_holder || nil), { include_blank: true }, class: 'select2autocomplete', data: { autocomplete_placeholder_value: Spree.t('admin.linkable.search_for_a_page'), autocomplete_clear_value: true, autocomplete_url_value: 'pages_api_v2', autocomplete_return_attr_value: 'title', autocomplete_search_query_value: 'title_i_cont', autocomplete_additional_url_params_value: 'filter[type_not_eq]=Spree::Cms::Pages::Homepage' } %> <%= f.error_message_on :linked_resource_id %> <small class="form-text text-muted"><%= resource.link %></small> <% end %>
Version data entries
16 entries across 16 versions & 1 rubygems