<% select_values = essence_select_editor.settings[:select_values] %> <%= content_tag :div, id: essence_select_editor.dom_id, class: [ essence_select_editor.css_classes, essence_select_editor.settings[:display_inline] ? 'display_inline' : '' ], data: essence_select_editor.data_attributes do %> <%= content_label(essence_select_editor) %> <% if select_values.nil? %> <%= warning(':select_values is nil', "No select values given.
Please provide select_values on the content definition settings in elements.yml.") %> <% else %> <% if select_values.is_a?(Hash) options_tags = grouped_options_for_select(select_values, essence_select_editor.ingredient) else options_tags = options_for_select(select_values, essence_select_editor.ingredient) end %> <%= select_tag essence_select_editor.form_field_name, options_tags, { class: ["alchemy_selectbox", "essence_editor_select"] } %> <% end %> <% end %>