- content_for :page_title do
=t :templates
- content_for :actions do
.span4.clearfix.text-right
= link_to " #{t :new_template}".html_safe, new_template_path, :class => "btn btn-link btn-large"
%section.b-tree.span8
%ul
- @roots.each do |root|
- level = root.level
- last_template = nil
- root.self_and_descendants.each do |template|
- if template.level > level
- elsif template.level < level
= raw "
" * (level-template.level)
- elsif !template.root?
%button.btn.disabled= template.name
.btn-group
- if not template.right_sibling.nil? and template.move_possible?(template.right_sibling)
= link_to "".html_safe, template_move_down_path(template), :method => :post, :class => "btn btn-mini"
- if not template.left_sibling.nil? and template.move_possible?(template.left_sibling)
= link_to "".html_safe, template_move_up_path(template), :method => :post, :class => "btn btn-mini"
= link_to "".html_safe, edit_template_path(template), :class => "btn btn-primary btn-mini"
- level = template.level
- last_template = template
= raw "" * last_template.level