Sha256: d2ac370ea15f34d474dab40513b531c650c89203298f90c468cd88cc86d86207

Contents?: true

Size: 802 Bytes

Versions: 26

Compression:

Stored size: 802 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_version_id %>
    <%= form.input :name,
      label: Alchemy.t(:element_of_type),
      collection: elements_for_select(@elements),
      prompt: Alchemy.t(:select_element),
      selected: (@elements.first if @elements.count == 1),
      input_html: {is: 'alchemy-select', autofocus: true, disabled: @elements.count == 1} %>
    <% if @elements.count == 1 %>
      <%= form.hidden_field :name, value: @elements.first[:name] %>
    <% end %>
    <%= form.hidden_field :parent_element_id, value: @parent_element.try(:id) %>
    <%= form.submit Alchemy.t(:add) %>
  <%- end -%>
<%- end -%>

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
alchemy_cms-7.2.9 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.2.8 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.1.13 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.2.7 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.2.6 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.2.5 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.1.12 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.2.4 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.1.11 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.2.3 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.1.10 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.2.2 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.1.9 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.2.1 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.1.8 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.1.7 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.1.6 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.1.5 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.1.4 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.1.3 app/views/alchemy/admin/elements/_form.html.erb