Sha256: ca708b038791e796b3989b3b4b6367a89e51b0973e60e3cf2e3502194b660808

Contents?: true

Size: 1.14 KB

Versions: 7

Compression:

Stored size: 1.14 KB

Contents

<%= form_for @section, :html => {:class => 'form-horizontal'} do |f| %>
    <fieldset>
      <legend><%= controller.action_name.capitalize %> Section</legend>

      <div class="control-group">
        <%= f.label :parent_section, :class => 'control-label' %>
        <div class="controls">
          <%= f.select :parent_id, nested_set_options(HowTo::Section.active.roots_only.without(@section.id)) { |i| "#{'-' * i.level} #{i.name}" }, {:prompt => 'select'}, :'chosen-enabled' => true %>
        </div>
      </div>

          <div class="control-group">
            <%= f.label :name, :class => 'control-label' %>
            <div class="controls">
              <%= f.text_field :name, :class => 'text_field' %>
            </div>
          </div>


      <div class="control-group">
        <%= f.label :position, :class => 'control-label' %>
        <div class="controls">
          <%= f.text_field :position, :class => 'text_field'%>
        </div>
      </div>
      <div class="form-actions">
        <%= f.submit nil, :class => 'btn btn-primary' %>
        <%= link_to 'Cancel', sections_path, :class => 'btn' %>
      </div>
    </fieldset>
<% end %>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
how_to-2.0.4 app/views/how_to/sections/_form.html.erb
how_to-2.0.3 app/views/how_to/sections/_form.html.erb
how_to-2.0.2 app/views/how_to/sections/_form.html.erb
how_to-2.0.1 app/views/how_to/sections/_form.html.erb
how_to-2.0.0 app/views/how_to/sections/_form.html.erb
how_to-1.0.3 app/views/how_to/sections/_form.html.erb
how_to-1.0.2 app/views/how_to/sections/_form.html.erb