ensl.org/app/views/categories/index.html.erb

30 lines
1 KiB
Text
Raw Permalink Normal View History

2014-04-27 00:47:53 +00:00
<div class="categories">
<h1 class="title">Listing Categories</h1>
2014-04-27 00:47:53 +00:00
<% Category.new.domains.each do |key, domain| %>
<h3 class="title"><%=h domain %></h3>
2014-04-27 00:47:53 +00:00
<table class="categories striped">
<tr>
<th class="name">Name</th>
<th class="actions"></th>
</tr>
<% @categories.each do |category| %>
<% if category.domain == key %>
<tr>
<td><%=h category.name %></td>
<td class="actions">
<%= link_to icon('chevron-up'), controller: :categories, action: "up", id: category.id %>
<%= link_to icon('chevron-down'), controller: :categories, action: "down", id: category.id %>
<%= link_to icon('pencil'), edit_category_path(category) %>
<%= link_to icon('times'), category, :confirm => 'Are you sure?', :method => :delete %>
</td>
</tr>
<% end %>
<% end %>
2014-04-27 00:47:53 +00:00
</table>
<% end %>
2014-04-27 00:47:53 +00:00
<%= link_to 'New Category', new_category_path, class: 'button' %>
</div>