Sha256: 24752a6a1cca017216306b374715dd3a624c0e632f02e705ffc8a1545aa2741d

Contents?: true

Size: 974 Bytes

Versions: 5

Compression:

Stored size: 974 Bytes

Contents

<%- if @elements.blank? -%>
  <%= render_message do %>
    <%= Alchemy.t(:no_more_elements_to_add) %>
  <% end %>
<%- 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

5 entries across 5 versions & 1 rubygems

Version Path
alchemy_cms-4.1.2 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-4.1.1 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-4.1.0 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-4.1.0.rc1 app/views/alchemy/admin/elements/_new_element_form.html.erb
alchemy_cms-4.1.0.beta app/views/alchemy/admin/elements/_new_element_form.html.erb