Sha256: 62b9a4731e9c0825e6cde8d27b8f9e9d2c0c8cda7bbb4542d72c3cef8d4fd2b0

Contents?: true

Size: 404 Bytes

Versions: 31

Compression:

Stored size: 404 Bytes

Contents

module Gollum
  class Macro
    class GlobalTOC < Gollum::Macro
      def render(title = "Global Table of Contents")
        if @wiki.pages.size > 0
          result = '<ul>' + @wiki.pages.map { |p| "<li><a href=\"/#{p.url_path}\">#{p.url_path_display}</a></li>" }.join + '</ul>'
        end
        "<div class=\"toc\"><div class=\"toc-title\">#{title}</div>#{result}</div>"
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 2 rubygems

Version Path
gitlab-gollum-lib-4.2.7.10.gitlab.2 lib/gollum-lib/macro/global_toc.rb
gitlab-gollum-lib-4.2.7.10.gitlab.1 lib/gollum-lib/macro/global_toc.rb
gitlab-gollum-lib-4.2.7.9 lib/gollum-lib/macro/global_toc.rb
gitlab-gollum-lib-4.2.7.8 lib/gollum-lib/macro/global_toc.rb
gitlab-gollum-lib-4.2.7.7 lib/gollum-lib/macro/global_toc.rb
gitlab-gollum-lib-4.2.7.6 lib/gollum-lib/macro/global_toc.rb
gollum-lib-4.2.10-java lib/gollum-lib/macro/global_toc.rb
gollum-lib-4.2.10 lib/gollum-lib/macro/global_toc.rb
gollum-lib-4.2.9-java lib/gollum-lib/macro/global_toc.rb
gollum-lib-4.2.9 lib/gollum-lib/macro/global_toc.rb
gitlab-gollum-lib-4.2.7.5 lib/gollum-lib/macro/global_toc.rb
gitlab-gollum-lib-4.2.7.4 lib/gollum-lib/macro/global_toc.rb
gitlab-gollum-lib-4.2.7.3 lib/gollum-lib/macro/global_toc.rb
gitlab-gollum-lib-4.2.7.2 lib/gollum-lib/macro/global_toc.rb
gitlab-gollum-lib-4.2.7.1 lib/gollum-lib/macro/global_toc.rb
gitlab-gollum-lib-4.2.7 lib/gollum-lib/macro/global_toc.rb
gollum-lib-4.2.7-java lib/gollum-lib/macro/global_toc.rb
gollum-lib-4.2.7 lib/gollum-lib/macro/global_toc.rb
gollum-lib-4.2.5-java lib/gollum-lib/macro/global_toc.rb
gollum-lib-4.2.5 lib/gollum-lib/macro/global_toc.rb