Sha256: 756f5431a15a10e23c3eeeffe0d9ae155c75fadae8d73ec7b16cdc7949e19c82

Contents?: true

Size: 927 Bytes

Versions: 16

Compression:

Stored size: 927 Bytes

Contents

<% if resource.linked_resource %>
   <% resorce_holder = [resource.linked_resource] %>
   <% id_holder = :id %>
   <% name_holder = :name %>
   <% active_id_holder = resource.linked_resource.id %>
 <% end %>
 <%= f.field_container :linked_resource_id do %>
    <%= f.label :linked_resource_id, Spree.t('product') %>
    <%= 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.navigation.search_for_a_product'),
                 autocomplete_clear_value: true,
                 autocomplete_url_value: 'products_api_v2' } %>

   <%= 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

Version Path
spree_backend-4.8.4 app/views/spree/admin/shared/linkables/_spree_product.html.erb
spree_backend-4.8.3 app/views/spree/admin/shared/linkables/_spree_product.html.erb
spree_backend-4.8.2 app/views/spree/admin/shared/linkables/_spree_product.html.erb
spree_backend-4.8.1 app/views/spree/admin/shared/linkables/_spree_product.html.erb
spree_backend-4.7.2 app/views/spree/admin/shared/linkables/_spree_product.html.erb
spree_backend-4.6.2 app/views/spree/admin/shared/linkables/_spree_product.html.erb
spree_backend-4.7.1 app/views/spree/admin/shared/linkables/_spree_product.html.erb
spree_backend-4.7.0 app/views/spree/admin/shared/linkables/_spree_product.html.erb
spree_backend-4.6.1 app/views/spree/admin/shared/linkables/_spree_product.html.erb
spree_backend-4.6.0 app/views/spree/admin/shared/linkables/_spree_product.html.erb
spree_backend-4.5.1 app/views/spree/admin/shared/linkables/_spree_product.html.erb
spree_backend-4.5.0 app/views/spree/admin/shared/linkables/_spree_product.html.erb
spree_backend-4.4.1 app/views/spree/admin/shared/linkables/_spree_product.html.erb
spree_backend-4.4.0 app/views/spree/admin/shared/linkables/_spree_product.html.erb
spree_backend-4.4.0.rc2 app/views/spree/admin/shared/linkables/_spree_product.html.erb
spree_backend-4.4.0.rc1 app/views/spree/admin/shared/linkables/_spree_product.html.erb