Sha256: 2d8d5c194ae31e15fda8e7dfa47d04423b6236eb65ca5acd695c3dc7e212ffb5

Contents?: true

Size: 1.17 KB

Versions: 43

Compression:

Stored size: 1.17 KB

Contents

module Precious
  module Views
    class Edit < Layout
      include Editable
      include HasPage

      attr_reader :page, :content

       # return path set in app.rb not @page.path
       def path
         @path
       end

      def title
        "#{@page.title}"
      end

      def page_name
        @name.gsub('-', ' ')
      end

      def header
        if @header.nil?
          if page = @page.header
            @header = page.raw_data
          else
            @header = false
          end
        end
        @header
      end

      def footer
        if @footer.nil?
          if page = @page.footer
            @footer = page.raw_data
          else
            @footer = false
          end
        end
        @footer
      end

      def sidebar
        if @sidebar.nil?
          if page = @page.sidebar
            @sidebar = page.raw_data
          else
            @sidebar = false
          end
        end
        @sidebar
      end

      def is_create_page
        false
      end

      def is_edit_page
        true
      end

      def format
        @format = (@page.format || false) if @format.nil?
        @format.to_s.downcase
      end
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
gollum-2.5.0 lib/gollum/views/edit.rb
gollum-2.4.15 lib/gollum/views/edit.rb
gollum-2.4.14 lib/gollum/views/edit.rb
gollum-2.4.13 lib/gollum/views/edit.rb
gollum-2.4.12 lib/gollum/views/edit.rb
gollum-2.4.11 lib/gollum/frontend/views/edit.rb
gollum-2.4.10 lib/gollum/frontend/views/edit.rb
gollum-2.4.9 lib/gollum/frontend/views/edit.rb
gollum-2.4.8 lib/gollum/frontend/views/edit.rb
gollum-2.4.7 lib/gollum/frontend/views/edit.rb
gollum-2.4.6 lib/gollum/frontend/views/edit.rb
gollum-2.4.5 lib/gollum/frontend/views/edit.rb
gollum-2.4.4 lib/gollum/frontend/views/edit.rb
gollum-2.4.3 lib/gollum/frontend/views/edit.rb
gollum-2.4.2 lib/gollum/frontend/views/edit.rb
gollum-2.4.1 lib/gollum/frontend/views/edit.rb
gollum-2.4.0 lib/gollum/frontend/views/edit.rb
gollum-2.3.12 lib/gollum/frontend/views/edit.rb
gollum-2.3.11 lib/gollum/frontend/views/edit.rb
gollum-2.3.10 lib/gollum/frontend/views/edit.rb