Sha256: 73bba1ce4fdcc974c4d8a9120206e16fbe74cfcfc0e86a1239c2d31c63d8d079

Contents?: true

Size: 996 Bytes

Versions: 28

Compression:

Stored size: 996 Bytes

Contents

<%- if @elements.blank? -%>
  <div class="info">
    <%= render_icon('info') %>
    <%= Alchemy.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? && @parent_element.blank? -%>
    <%= form.input :name,
      label: Alchemy.t(:element_of_type),
      collection: grouped_elements_for_select(@elements),
      as: :grouped_select,
      group_method: :second,
      prompt: Alchemy.t(:select_element),
      input_html: {class: 'alchemy_selectbox', autofocus: true} %>
  <%- else -%>
    <%= form.input :name,
      label: Alchemy.t(:element_of_type),
      collection: elements_for_select(@elements),
      prompt: Alchemy.t(:select_element),
      input_html: {class: 'alchemy_selectbox', autofocus: true} %>
  <%- end -%>
    <%= form.hidden_field :parent_element_id, value: @parent_element.try(:id) %>
    <%= form.submit Alchemy.t(:add) %>
  <%- end -%>
<%- end -%>

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
alchemy_cms-4.0.6 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-3.6.7 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-3.6.6 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-4.0.5 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-4.0.4 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-4.0.3 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-3.6.5 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-4.0.2 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-4.0.1 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-3.6.4 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-4.0.0 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-3.6.3 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-3.6.2 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-4.0.0.rc2 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-4.0.0.rc1 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-3.6.1 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-4.0.0.beta app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-3.6.0 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-3.5.0 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-3.4.2 app/views/alchemy/admin/elements/_new_element_form.html.erb