Sha256: 0487f8ca3de478f646e227e19ccb189e04b83eca38c6d2db10ea85ea5052df74

Contents?: true

Size: 948 Bytes

Versions: 2

Compression:

Stored size: 948 Bytes

Contents

%ul.block
  - nodes.each do |node|
    %li
      .node{ :style => "background-color:rgba(188,224,178,#{[ 1-level.to_f/10, 0.3 ].max});", :class => params[:id].to_i == node.id ? :active : nil }
        %a.create{:href => url_for(:action => :new, :parent_id => node.id)}><
          = image_tag("releaf/add.png")
        %input{:name => "ids[]", :type => "checkbox", :value => node.id}/
        - if node.children.empty?
          .toggle{:style => "margin-left:#{15*level}px;"}><
        - else
          %button.no_styling.toggle.open{"data-id" => node.id, :type => "button", :style => "margin-left:#{15*level}px;"}>< Toggle
        %a.edit{:href => url_for(:action => :edit, :id => node.id), :title => node.url, :style=> "left: #{43+15*level}px;"}><
          = image_tag "releaf/language_root.png", :alt => ''
          %span= node.name
      - if !node.children.empty?
        = render 'tree_level', :nodes => node.children, :level => level + 1

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
releaf-0.1.2 app/views/releaf/content/_tree_level.html.haml
releaf-0.1.1 app/views/releaf/content/_tree_level.haml