Sha256: e172c0f68c479cbbea1667f1a810612a3414f7547c7198150692f618c1f499f5
Contents?: true
Size: 1.02 KB
Versions: 5
Compression:
Stored size: 1.02 KB
Contents
<h2>Create a new section</h2> <%= form_for @section, as: :section, url: admin_sections_path do |f| %> <fieldset> <div class="col"> <%= f.text_field :title, label: "Title" %> </div> <div class="col"> <%= f.collection_select :type, Section.types, :to_s, :to_s, {}, label: "Type" %> </div> </fieldset> <% unless @site.sections.size < 2 %> <fieldset> <h3>Parent settings</h3> <%= f.select :parent_id, @site.sections.collect {|s| s == @section ? nil : [ s.title, s.id ]}.compact, { include_blank: true, label: true } %> <span class="hint" for="section_parent_id"> Choosing a parent for your section will nest this section under the chosen parent. Leave empty if you want to create this section as a root section. </span> </fieldset> <% end %> <p class="buttons"> <%= submit_tag "Save", id: 'commit' %> <%= submit_tag "Save and create another section", id: 'save_and_create_new' %> or <%= link_to "Cancel", admin_sections_path %> </p> <% end %>
Version data entries
5 entries across 5 versions & 1 rubygems