Sha256: c5fbce507c0d4251b0113efc4fdfdf0447addb61019126c79db7a1986e211c00

Contents?: true

Size: 1.38 KB

Versions: 19

Compression:

Stored size: 1.38 KB

Contents

- content_for :page_title do
  Шаблоны

- content_for :actions do
  .span4.clearfix.text-right
    = link_to 'Создать шаблон', new_template_path, :class => "btn btn-success btn-large"

%section.span8
  %ul#tree.treeview-gray
    - @roots.each do |root|
      - level = root.level
      - last_template = nil

      - root.self_and_descendants.each do |template|
        - if template.level > level
          <ul>
        - elsif template.level < level
          </li>
          = raw "</ul></li>" * (level-template.level)
        - elsif !template.root?
          </li>

        <li>
        %button.btn.disabled= template.name

        .btn-group
          - if not template.right_sibling.nil? and template.move_possible?(template.right_sibling)
            = link_to "<i class='icon-arrow-down'></i>".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 "<i class='icon-arrow-up'></i>".html_safe, template_move_up_path(template), :method => :post, :class => "btn btn-mini"

        = link_to "<i class='icon-pencil icon-white'></i>".html_safe, edit_template_path(template), :class => "btn btn-primary btn-mini"


        - level = template.level
        - last_template = template
      </li>
      = raw "</ul></li>" * last_template.level

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
constructor-pages-0.3.3 app/views/constructor_pages/templates/index.haml
constructor-pages-0.3.2 app/views/constructor_pages/templates/index.haml
constructor-pages-0.3.1 app/views/constructor_pages/templates/index.haml
constructor-pages-0.3.0 app/views/constructor_pages/templates/index.haml
constructor-pages-0.2.14 app/views/constructor_pages/templates/index.haml
constructor-pages-0.2.13 app/views/constructor_pages/templates/index.haml
constructor-pages-0.2.12 app/views/constructor_pages/templates/index.haml
constructor-pages-0.2.11 app/views/constructor_pages/templates/index.haml
constructor-pages-0.2.10 app/views/constructor_pages/templates/index.haml
constructor-pages-0.2.9 app/views/constructor_pages/templates/index.haml
constructor-pages-0.2.8 app/views/constructor_pages/templates/index.haml
constructor-pages-0.2.7 app/views/constructor_pages/templates/index.haml
constructor-pages-0.2.6 app/views/constructor_pages/templates/index.haml
constructor-pages-0.2.5 app/views/constructor_pages/templates/index.haml
constructor-pages-0.2.4 app/views/constructor_pages/templates/index.haml
constructor-pages-0.2.3 app/views/constructor_pages/templates/index.haml
constructor-pages-0.2.2 app/views/constructor_pages/templates/index.haml
constructor-pages-0.2.1 app/views/constructor_pages/templates/index.haml
constructor-cms-0.2.1 pages/app/views/constructor_pages/templates/index.haml