Sha256: 017c1b188071a61a10b08ed7ffe1849882d7440d7a35573e34219fd1de07993a

Contents?: true

Size: 847 Bytes

Versions: 25

Compression:

Stored size: 847 Bytes

Contents

<%- if @elements.blank? -%>
  <div class="info">
    <%= render_icon('info') %>
    <%= _t(:no_more_elements_to_add) %>
  </div>
<%- else -%>
  <%= alchemy_form_for [:admin, @element] do |form| %>
    <%= form.hidden_field :page_id %>
  <%- if @page.can_have_cells? -%>
    <%= form.input :name,
      label: _t(:element_of_type),
      collection: grouped_elements_for_select(@elements),
      as: :grouped_select,
      group_method: :second,
      prompt: _t(:select_element),
      input_html: {class: 'alchemy_selectbox', autofocus: true} %>
  <%- else -%>
    <%= form.input :name,
      label: _t(:element_of_type),
      collection: elements_for_select(@elements),
      prompt: _t(:select_element),
      input_html: {class: 'alchemy_selectbox', autofocus: true} %>
  <%- end -%>
    <%= form.submit _t(:add) %>
  <%- end -%>
<%- end -%>

Version data entries

25 entries across 25 versions & 2 rubygems

Version Path
alchemy_cms-3.2.1 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-3.1.3 app/views/alchemy/admin/elements/_new_element_form.html.erb
lc_alchemy_cms-3.2.1 app/views/alchemy/admin/elements/_new_element_form.html.erb
lc_alchemy_cms-3.2.0 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-3.2.0 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-3.2.0.rc1 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-3.2.0.beta app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-3.1.1 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-3.0.4 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-3.1.0 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-3.1.0.rc3 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-3.1.0.rc2 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-3.1.0.rc1 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-3.1.0.beta6 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-3.1.0.beta5 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-3.1.0.beta4 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-3.0.3 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-3.1.0.beta3 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-3.1.0.beta2 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-3.1.0.beta1 app/views/alchemy/admin/elements/_new_element_form.html.erb