Sha256: 64ab2bbecedf2a97a854b5f3364f9fa06066daba58f2cacdcb9ddef4f3dfad06

Contents?: true

Size: 1.12 KB

Versions: 10

Compression:

Stored size: 1.12 KB

Contents

<%= render :partial => 'admin/products/menu' %>

<%= link_to "Add Category", :controller => 'categories', :action => 'new' -%>
<br/><br/>

<h1>Listing categories</h1>

<div class="breadcrumb-nav">
  <%= link_to "Categories", :action => "list", :id => nil %>
  <% if @parent_category %>
    >
    <%= breadcrumb_nav @parent_category%>
  <% end %>
</div>

<style>
  .breadcrumb-nav {
    font-size: 12px;
    font-weight: bold;
    padding-top: 10px;
    padding-bottom: 10px;
  }
</style>

<table class="admin-report">
  <tr>
    <th width="75%">Name</th>
    <th>Action</th>
  </tr>
  
<% for category in @categories %>
  <tr>
    <td>
      <% if category.children.empty? %>
        <%= category.name %>
      <% else %>
        <%= link_to category.name, :id => category%>
      <% end %>
    </td>
    <td>
      <%= link_to 'Edit', :action => 'edit', :id => category %> | 
      <%= link_to 'Delete', { :action => 'destroy', :id => category }, :confirm => 'Are you sure you want to delete this category?' %>
    </td>
  </tr>
<% end %>
</table>
<%= render :partial => 'shared/paginate', :locals => {:collection => @categories, :options => {}} -%>

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
railscart-0.0.1 starter-app/vendor/plugins/railscart/app/views/admin/categories/list.rhtml
railscart-0.0.2 starter_app/vendor/plugins/railscart/app/views/admin/categories/list.rhtml
railscart-0.0.3 starter_app/vendor/plugins/railscart/app/views/admin/categories/list.rhtml
railscart-0.0.4 starter_app/vendor/plugins/railscart/app/views/admin/categories/list.rhtml
spree-0.0.5 starter-app/vendor/plugins/spree/app/views/admin/categories/list.rhtml
spree-0.0.6 starter-app/vendor/plugins/spree/app/views/admin/categories/list.rhtml
spree-0.0.9 app/views/admin/categories/list.rhtml
spree-0.0.7 starter-app/vendor/plugins/spree/app/views/admin/categories/list.rhtml
spree-0.0.8 starter-app/vendor/plugins/spree/app/views/admin/categories/list.rhtml
spree-0.2.0 app/views/admin/categories/list.rhtml