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.0.2 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-3.0.1 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-3.0.0 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-3.0.0.rc8 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-3.0.0.rc5 app/views/alchemy/admin/elements/_new_element_form.html.erb