|
1 |
| -= admin_widget_box "Filtering" do |
2 |
| - = render partial: "filtering", as: :q, object: @q |
3 |
| -= admin_widget_box "Categories" do |
4 |
| - .dataTables_wrapper |
5 |
| - div |
6 |
| - .dataTables_length |
7 |
| - = link_to "New Category", new_admin_category_path, class: "btn btn-primary btn-mini" |
8 |
| - table.table.table-bordered.table-striped.table-hover |
9 |
| - thead |
| 1 | +- append_page_button 'New Category', new_admin_category_path, class: 'btn-primary' |
| 2 | + |
| 3 | += admin_widget_box 'Filtering' do |
| 4 | + = render partial: 'filtering', as: :q, object: @q |
| 5 | + |
| 6 | += admin_widget_box 'Categories' do |
| 7 | + = render_admin_data_table(data: @categories) do |
| 8 | + thead |
| 9 | + tr |
| 10 | + th= '#' |
| 11 | + th= 'Name' |
| 12 | + th= 'Sort' |
| 13 | + th= 'Sorting' |
| 14 | + th= 'actions' |
| 15 | + tbody |
| 16 | + - @categories.each do |category| |
10 | 17 | tr
|
11 |
| - th= "#" |
12 |
| - th= "Name" |
13 |
| - th= "Sort" |
14 |
| - th= "Sorting" |
15 |
| - th= "actions" |
16 |
| - tbody |
17 |
| - - @categories.each do |category| |
18 |
| - tr |
19 |
| - td= category.id |
20 |
| - td= category.name |
21 |
| - td= category.sort |
22 |
| - td |
23 |
| - - unless category.deleted? |
24 |
| - = render_admin_sorting_buttons(category) |
25 |
| - td |
26 |
| - - if category.deleted? |
27 |
| - = link_to "restore", restore_admin_category_path(category), class: "btn btn-mini btn-danger", method: :post, "data-confirm" => "Restore?" |
28 |
| - - else |
29 |
| - = link_to "show", admin_category_path(category), class: "btn btn-mini" |
30 |
| - | |
31 |
| - = link_to "edit", edit_admin_category_path(category), class: "btn btn-mini btn-success" |
32 |
| - | |
33 |
| - = link_to "delete", admin_category_path(category), class: "btn btn-mini btn-danger", method: :delete, "data-confirm" => "Delete?" |
34 |
| - .ui-toolbar.ui-widget-header |
35 |
| - = paginate @categories, theme: :admin |
| 18 | + td= category.id |
| 19 | + td= category.name |
| 20 | + td= category.sort |
| 21 | + td |
| 22 | + - unless category.deleted? |
| 23 | + = render_admin_sorting_buttons(category) |
| 24 | + td |
| 25 | + - if category.deleted? |
| 26 | + = link_to 'restore', restore_admin_category_path(category), method: :post, 'data-confirm' => 'Restore?' |
| 27 | + - else |
| 28 | + = link_to 'show', admin_category_path(category) |
| 29 | + | | |
| 30 | + = link_to 'edit', edit_admin_category_path(category) |
| 31 | + | | |
| 32 | + = link_to 'delete', admin_category_path(category), method: :delete, 'data-confirm' => 'Delete?' |
0 commit comments