Sha256: 8442cbefaedf2942f463f30059d6dfde9ecff385c978d3e203ae8aed9e561c7f

Contents?: true

Size: 1.24 KB

Versions: 6

Compression:

Stored size: 1.24 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>

      <% I18n.available_locales.each do |locale| %>
          <div class="control-group">
            <%= f.label :name, "Name for #{locale}", :class => 'control-label' %>
            <div class="controls">
              <%= f.text_field "i18n_#{locale.to_s}_name", :class => 'text_field' %>
            </div>
          </div>

      <% end %>

      <div class="control-group">
        <%= f.label :order, :class => 'control-label' %>
        <div class="controls">
          <%= f.text_field :order, :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

6 entries across 6 versions & 1 rubygems

Version Path
how_to-0.0.6 app/views/how_to/sections/_form.html.erb
how_to-0.0.5 app/views/how_to/sections/_form.html.erb
how_to-0.0.4 app/views/how_to/sections/_form.html.erb
how_to-0.0.3 app/views/how_to/sections/_form.html.erb
how_to-0.0.2 app/views/how_to/sections/_form.html.erb
how_to-0.0.1 app/views/how_to/sections/_form.html.erb