Sha256: 53e50af6f651f75416180f315572f7fc7f04a12e8ffc29ae85ae131d799e84f5

Contents?: true

Size: 1.03 KB

Versions: 37

Compression:

Stored size: 1.03 KB

Contents

<% select_values = select_editor.settings[:select_values] %>

<%= content_tag :div,
  class: [
    select_editor.css_classes,
    select_editor.settings[:display_inline] ? 'display_inline' : ''
  ], data: select_editor.data_attributes do %>
  <%= element_form.fields_for(:ingredients, select_editor.ingredient) do |f| %>
    <%= ingredient_label(select_editor) %>

    <% if select_values.nil? %>
      <%= warning(':select_values is nil',
      "<strong>No select values given.</strong>
      <br>Please provide <code>select_values</code> on the
      content definition <code>settings</code> in
      <code>elements.yml</code>.") %>
    <% else %>
      <%
      if select_values.is_a?(Hash)
        options_tags = grouped_options_for_select(select_values, select_editor.value)
      else
        options_tags = options_for_select(select_values, select_editor.value)
      end %>
      <%= f.select :value, options_tags, {}, {
        id: nil,
        class: ["alchemy_selectbox", "ingredient-editor-select"]
      } %>
    <% end %>
  <% end %>
<% end %>

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
alchemy_cms-6.1.10 app/views/alchemy/ingredients/_select_editor.html.erb
alchemy_cms-6.1.9 app/views/alchemy/ingredients/_select_editor.html.erb
alchemy_cms-6.1.8 app/views/alchemy/ingredients/_select_editor.html.erb
alchemy_cms-6.1.7 app/views/alchemy/ingredients/_select_editor.html.erb
alchemy_cms-6.1.6 app/views/alchemy/ingredients/_select_editor.html.erb
alchemy_cms-6.1.5 app/views/alchemy/ingredients/_select_editor.html.erb
alchemy_cms-6.0.14 app/views/alchemy/ingredients/_select_editor.html.erb
alchemy_cms-6.1.4 app/views/alchemy/ingredients/_select_editor.html.erb
alchemy_cms-6.0.13 app/views/alchemy/ingredients/_select_editor.html.erb
alchemy_cms-6.1.3 app/views/alchemy/ingredients/_select_editor.html.erb
alchemy_cms-6.1.2 app/views/alchemy/ingredients/_select_editor.html.erb
alchemy_cms-6.1.1 app/views/alchemy/ingredients/_select_editor.html.erb
alchemy_cms-6.1.0 app/views/alchemy/ingredients/_select_editor.html.erb
alchemy_cms-6.0.12 app/views/alchemy/ingredients/_select_editor.html.erb
alchemy_cms-6.0.11 app/views/alchemy/ingredients/_select_editor.html.erb
alchemy_cms-6.0.10 app/views/alchemy/ingredients/_select_editor.html.erb
alchemy_cms-6.0.9 app/views/alchemy/ingredients/_select_editor.html.erb
alchemy_cms-6.0.8 app/views/alchemy/ingredients/_select_editor.html.erb
alchemy_cms-6.0.7 app/views/alchemy/ingredients/_select_editor.html.erb
alchemy_cms-6.0.6 app/views/alchemy/ingredients/_select_editor.html.erb