Sha256: ebe757709b43f31af4e9957fc59b8714abfbcc9fd932ea672eda2090e303e579

Contents?: true

Size: 811 Bytes

Versions: 8

Compression:

Stored size: 811 Bytes

Contents

<h2>New Category</h2>

<%= form_for [:admin, @section, @category] do |f| %>
  <fieldset>
    <div class="col">
      <%= f.text_field :title, label: true, hint: "Avoid names countaining only 4 or 2 digits!" %>
    </div>

    <% unless @section.categories.size < 2 %>
      <div class="col">
        <%= f.select :parent_id, @section.categories.collect {|p| [p.title, p.id] unless p == @category }.compact, { :include_blank => true, :label => true } %>
        <span class="hint" for="category_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>
      </div>
    <% end %>
  </fieldset>

  <% save_or_cancel_links(f, cancel_url: [:admin, @section, :categories]) %>
<% end %>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
adva-0.3.2 app/views/admin/page/categories/new.html.erb
adva-0.3.1 app/views/admin/page/categories/new.html.erb
adva-0.3.0 app/views/admin/page/categories/new.html.erb
adva-0.2.4 app/views/admin/page/categories/new.html.erb
adva-0.2.3 app/views/admin/page/categories/new.html.erb
adva-0.2.2 app/views/admin/page/categories/new.html.erb
adva-0.2.1 app/views/admin/page/categories/new.html.erb
adva-0.2.0 app/views/admin/page/categories/new.html.erb