Sha256: 50258b7320d4ee6cf5ac57c1419f20b279814bae882bf24b751ff28f6ed6c8a6

Contents?: true

Size: 830 Bytes

Versions: 5

Compression:

Stored size: 830 Bytes

Contents

<%= form_for [:admin, @category] do |f| %>
  <%= render "shared/error_messages", :target => @category %>
  <div>
    <%= f.label :name, t('categories.name'), :class => "desc required" %>
    <%= f.text_field :name, :size => "80" %>
  </div>
  
  <div>
    <%= f.label :parent_id, t('categories.parent') %>
    <%= f.select :parent_id, nested_set_options(Category, @category) {|i, level| "#{'-' * level} #{i.name}" } %>
  </div>
  
  <div>
    <%= f.submit t('categories.submit') %>
    <%= link_to t('cancel'), admin_categories_path %>
  </div>
<% end %>

<% if @category.id && !@category.parent_id.nil? %>
  <%= form_for [:admin, @category], :html => { :method => "delete" } do |f| %>
    <input type="hidden" name="_method" value="delete" />
    <button type="submit"><%= t('categories.delete') %></button>
  <% end %>
<% end %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
merrycms-0.1.7 app/views/admin/categories/_form.erb
merrycms-0.1.4 app/views/admin/categories/_form.erb
merrycms-0.1.2 app/views/admin/categories/_form.erb
merrycms-0.1.1 app/views/admin/categories/_form.erb
merrycms-0.1.0 app/views/admin/categories/_form.erb