forked from radar/rboard
/
_category.html.haml
18 lines (18 loc) · 1.28 KB
/
_category.html.haml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
%tr{ :class => stripe }
%td.icon
= link_to theme_image_tag("edit.jpg", :alt => t(:Edit), :title => t(:Edit)), edit_admin_category_path(category), :id => "edit_category_#{category.id}"
= link_to theme_image_tag("delete.jpg", :alt => t(:Delete), :title => t(:Delete)), admin_category_path(category), :method => "delete", :confirm => t(:confirm_deletion, :thing => "category")
%td{:style => "text-align:left !important"}
= theme_image_tag("extender.jpg", :style => "padding-left:#{depth*20}px") if extender
= link_to category.name, admin_category_path(category)
%td= category.description
%td= link_to(pluralize(category.forums.count, "forum"), admin_category_path(category))
%td
- unless category.first?
= link_to theme_image_tag("top.jpg"), move_to_top_admin_category_path(category), :method => :put
= link_to theme_image_tag("up.jpg"), move_up_admin_category_path(category), :method => :put
= category.position
- unless category.last?
= link_to theme_image_tag("down.jpg"), move_down_admin_category_path(category), :method => :put
= link_to theme_image_tag("bottom.jpg"), move_to_bottom_admin_category_path(category), :method => :put
= render :partial => category.children.sort_by(&:position), :locals => { :extender => true, :depth => depth+1 }