Sha256: 0f50f7e96c999ce00314828ca0b5dc2c99294bb8149cd21da68b81d38b3f1506

Contents?: true

Size: 531 Bytes

Versions: 46

Compression:

Stored size: 531 Bytes

Contents

module Caboose
  module PagesHelper
    def pages_list(page)
      str = "<ul>"
      str << pages_list_helper(page)      
      str << "</ul>"
      return str
    end
    
    def pages_list_helper(page)
      str = "<li><a href='/admin/pages/#{page.id}/edit'>#{page.title}</a>"
      if page.children && page.children.count > 0
        str << "<ul>"
        page.children.each do |p|
          str << pages_list_helper(p)
        end
        str << "</ul>"
      end
      str << "</li>"
      return str
    end
    
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
caboose-cms-0.3.20 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.19 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.17 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.16 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.15 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.14 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.13 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.12 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.11 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.9 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.8 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.7 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.6 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.5 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.4 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.3 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.2 app/helpers/caboose/pages_helper.rb
caboose-cms-0.3.1 app/helpers/caboose/pages_helper.rb
caboose-cms-0.2.104 app/helpers/caboose/pages_helper.rb
caboose-cms-0.2.103 app/helpers/caboose/pages_helper.rb