Sha256: 78b247e998cbd9a9a913096c69c29bbf437519a411ef5ca059c4c93a49db5872

Contents?: true

Size: 1.44 KB

Versions: 15

Compression:

Stored size: 1.44 KB

Contents

%ul.nav.nav-list.nav-list-panel.space-list
  %li
    = link_to wiki_pages_path, class: "space-link" do
      All Spaces
      %i.fa.fa-arrow-circle-right
  %li.divider

  - if @space.present? && @space.persisted?
    %li.nav-header.with-link 
      = link_to @space.title, wiki_page_path(@space)
    - @space.children.order(:position).each do |page|
      = render 'wiki/spaces/page_list_item', page: page, end_page: @page
      -# %li.page-list-item{data: {page_id: page.id}}
      -#   = link_to wiki_page_path(page) do
      -#     - if page.has_children?
      -#       %i.fa.fa-plus-square
      -#     = page.title
  - else
    - Page.roots.order(:position).each do |page|
      = render 'wiki/spaces/page_list_item', page: page, end_page: @page
  -# %li
  -#   = link_to new_wiki_space_path do 
  -#     %i.fa.fa-plus

:coffeescript
  $ ->
    $(document).on "click", ".page-list-item a i.fa-plus-square", ->
      $i = $(this)
      $i.toggleClass("fa-plus-square").toggleClass('fa-minus-square')
      page_id = $i.closest(".page-list-item").data("page-id")
      $.ajax
        method: "GET"
        url: "/wiki/spaces/" + page_id + "/space_list"
        success: (data) ->
          $i.closest("a").after data
      false

    $(document).on "click", ".page-list-item a i.fa-minus-square", ->
      $i = $(this)
      $i.toggleClass("fa-plus-square").toggleClass('fa-minus-square')
      $i.closest(".page-list-item").find("ul.nav-list-sub").remove()
      false

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
tawork-0.0.50 app/views/layouts/_spaces.html.haml
tawork-0.0.49 app/views/layouts/_spaces.html.haml
tawork-0.0.48 app/views/layouts/_spaces.html.haml
tawork-0.0.47 app/views/layouts/_spaces.html.haml
tawork-0.0.46 app/views/layouts/_spaces.html.haml
tawork-0.0.45 app/views/layouts/_spaces.html.haml
tawork-0.0.44 app/views/layouts/_spaces.html.haml
tawork-0.0.43 app/views/layouts/_spaces.html.haml
tawork-0.0.42 app/views/layouts/_spaces.html.haml
tawork-0.0.41 app/views/layouts/_spaces.html.haml
tawork-0.0.40 app/views/layouts/_spaces.html.haml
tawork-0.0.39 app/views/layouts/_spaces.html.haml
tawork-0.0.38 app/views/layouts/_spaces.html.haml
tawork-0.0.37 app/views/layouts/_spaces.html.haml
tawork-0.0.36 app/views/layouts/_spaces.html.haml