Sha256: 363666bb3bbcbe345cee9f0c0fec48d240a578bb499f1b54146157720b1604a3
Contents?: true
Size: 770 Bytes
Versions: 5
Compression:
Stored size: 770 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} %> <% 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
5 entries across 5 versions & 1 rubygems