Sha256: 1e3e18a4a662a9dfead2dbb95dbaf644ce293cc3f44f2c88b4cd4035f69da322

Contents?: true

Size: 1.22 KB

Versions: 36

Compression:

Stored size: 1.22 KB

Contents

<% has_level_select = headline_editor.level_options.many? %>
<% has_size_select = headline_editor.size_options.many? %>

<%= content_tag :div,
  class: headline_editor.css_classes,
  data: headline_editor.data_attributes do %>
  <%= element_form.fields_for(:ingredients, headline_editor.ingredient) do |f| %>
    <%= ingredient_label(headline_editor) %>
    <%= f.text_field :value, id: headline_editor.form_field_id %>

    <% if headline_editor.settings[:anchor] %>
      <%= render "alchemy/ingredients/shared/anchor", ingredient_editor: headline_editor %>
    <% end %>

    <% if has_level_select %>
      <div class="input-addon right<%= " second" if has_size_select %>">
        <%= f.select :level,
          options_for_select(headline_editor.level_options, headline_editor.level),
          {},
          { class: "custom-select", title: f.object.class.human_attribute_name(:level) } %>
      </div>
    <% end %>

    <% if has_size_select %>
      <div class="input-addon right">
        <%= f.select :size, options_for_select(headline_editor.size_options, headline_editor.size),
          {},
          { class: "custom-select", title: f.object.class.human_attribute_name(:size) } %>
      </div>
    <% end %>
  <% end %>
<% end %>

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
alchemy_cms-7.1.0.pre.rc1 app/views/alchemy/ingredients/_headline_editor.html.erb
alchemy_cms-7.1.0.pre.b2 app/views/alchemy/ingredients/_headline_editor.html.erb
alchemy_cms-7.1.0.pre.b1 app/views/alchemy/ingredients/_headline_editor.html.erb
alchemy_cms-7.0.8 app/views/alchemy/ingredients/_headline_editor.html.erb
alchemy_cms-7.0.7 app/views/alchemy/ingredients/_headline_editor.html.erb
alchemy_cms-7.0.6 app/views/alchemy/ingredients/_headline_editor.html.erb
alchemy_cms-7.0.5 app/views/alchemy/ingredients/_headline_editor.html.erb
alchemy_cms-7.0.4 app/views/alchemy/ingredients/_headline_editor.html.erb
alchemy_cms-7.0.3 app/views/alchemy/ingredients/_headline_editor.html.erb
alchemy_cms-7.0.2 app/views/alchemy/ingredients/_headline_editor.html.erb
alchemy_cms-7.0.1 app/views/alchemy/ingredients/_headline_editor.html.erb
alchemy_cms-7.0.0 app/views/alchemy/ingredients/_headline_editor.html.erb
alchemy_cms-7.0.0.pre.rc1 app/views/alchemy/ingredients/_headline_editor.html.erb
alchemy_cms-7.0.0.pre.c app/views/alchemy/ingredients/_headline_editor.html.erb
alchemy_cms-7.0.0.pre.b app/views/alchemy/ingredients/_headline_editor.html.erb
alchemy_cms-7.0.0.pre.a app/views/alchemy/ingredients/_headline_editor.html.erb