Sha256: c96d88b1f8dbbc99b3778969a9752af3463efefd8b285ee117212810ed8375eb
Contents?: true
Size: 1.28 KB
Versions: 16
Compression:
Stored size: 1.28 KB
Contents
<%= content_tag :div, class: 'add-nested-element', data: { element_id: element.id } do %> <% if element.nestable_elements.length == 1 && (nestable_element = element.nestable_elements.first) && Alchemy::Element.all_from_clipboard_for_parent_element(get_clipboard("elements"), element).none? %> <%= form_for [:admin, Alchemy::Element.new(name: nestable_element)], remote: true, html: { class: 'add-nested-element-form', id: nil } do |f| %> <%= f.hidden_field :name %> <%= f.hidden_field :page_version_id, value: element.page_version_id %> <%= f.hidden_field :parent_element_id, value: element.id %> <button class="add-nestable-element-button" is="alchemy-button"> <%= Alchemy.t(:add_nested_element, name: Alchemy.t(nestable_element.to_sym, scope: 'element_names')) %> </button> <% end %> <% else %> <%= link_to_dialog (nestable_element ? Alchemy.t(:add_nested_element, name: Alchemy.t(nestable_element.to_sym, scope: 'element_names')) : Alchemy.t("New Element")), alchemy.new_admin_element_path( parent_element_id: element.id, page_version_id: element.page_version_id ), { size: "320x125", title: Alchemy.t("New Element") }, class: "button add-nestable-element-button" %> <% end %> <% end %>
Version data entries
16 entries across 16 versions & 1 rubygems