25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

31 lines
770 B

  1. <p id="notice"><%= notice %></p>
  2. <h1>Categories</h1>
  3. <table>
  4. <thead>
  5. <tr>
  6. <th>Name</th>
  7. <th># documents</th>
  8. <th colspan="4"></th>
  9. </tr>
  10. </thead>
  11. <tbody>
  12. <% @categories.order(:name).each do |category| %>
  13. <tr>
  14. <td><%= category.get_fqcn %></td>
  15. <td><%= category.documents.count %></td>
  16. <td><%= link_to 'Show', category %></td>
  17. <td><%= link_to 'Show documents in category', documents_path(category: category.id) %></td>
  18. <td><%= link_to 'Edit', edit_category_path(category) %></td>
  19. <td><%= link_to 'Destroy', category, method: :delete, data: { confirm: 'Are you sure?' } %></td>
  20. </tr>
  21. <% end %>
  22. </tbody>
  23. </table>
  24. <br>
  25. <%= link_to 'New Category', new_category_path %>