Sha256: 5ebeb410fc03c04c87b174007b81b5954d6c3584820e92d6441dbaf0eb5ad42e
Contents?: true
Size: 1.39 KB
Versions: 2
Compression:
Stored size: 1.39 KB
Contents
<%= content_tag :div, class: spree_variant_editor.css_classes, data: spree_variant_editor.data_attributes do %> <%= element_form.fields_for(:ingredients, spree_variant_editor.ingredient) do |f| %> <%= ingredient_label(spree_variant_editor, :variant_id) %> <%= f.text_field :variant_id, value: spree_variant_editor.variant&.id, id: spree_variant_editor.form_field_id(:variant_id), class: 'alchemy_selectbox full_width' %> <% end %> <% end %> <style> .variant-select-result > * { display: flex; justify-content: space-between; min-height: 16px; > span { display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } &:last-child { color: hsl(224, 8%, 63%); } } </style> <script> $('#<%= spree_variant_editor.form_field_id(:variant_id) %>').alchemyVariantSelect({ placeholder: "<%= Alchemy.t(:search_variant, scope: 'solidus') %>", apiToken: "<%= current_alchemy_user.spree_api_key %>", baseUrl: "<%= spree.api_variants_path %>", query_params: <%== spree_variant_editor.settings[:query_params].to_json %>, <% if spree_variant_editor.variant %> initialSelection: { id: <%= spree_variant_editor.variant.id %>, name: "<%= spree_variant_editor.variant.name %>", options_text: "<%= spree_variant_editor.variant.options_text %>" } <% end %> }) </script>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
alchemy-solidus-7.4.0 | app/views/alchemy/ingredients/_spree_variant_editor.html.erb |
alchemy-solidus-7.3.2 | app/views/alchemy/ingredients/_spree_variant_editor.html.erb |