Sha256: f2c28fc61425bbd47b457dfd8265e7612afcd25776380144e2af7853b4f7132a

Contents?: true

Size: 778 Bytes

Versions: 12

Compression:

Stored size: 778 Bytes

Contents

module Precious
  module Views
    class Create < Layout
      include Editable

      attr_reader :page, :name

      def title
        "Create a new page"
      end
      
      def is_create_page
        true
      end
      
      def is_edit_page
        false
      end
      
      def format
        @format = (@page.format || false) if @format.nil? && @page
        @format.to_s.downcase
      end

      def has_footer
        @footer = (@page.footer || false) if @footer.nil? && @page
        !!@footer
      end

      def has_sidebar
        @sidebar = (@page.sidebar || false) if @sidebar.nil? && @page
        !!@sidebar
      end

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

      def formats
        super(:markdown)
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
gollum-bibanon-1.4.4 lib/gollum/frontend/views/create.rb
gollum-bibanon-1.4.3 lib/gollum/frontend/views/create.rb
gollum-bibanon-1.4.2 lib/gollum/frontend/views/create.rb
gollum-bibanon-1.4.1 lib/gollum/frontend/views/create.rb
gollum-bibanon-1.3.2 lib/gollum/frontend/views/create.rb
gollum-bibanon-1.4.0 lib/gollum/frontend/views/create.rb
gollum-bibanon-1.3.1 lib/gollum/frontend/views/create.rb
gollum-1.3.1 lib/gollum/frontend/views/create.rb
jugyo-gollum-1.3.1 lib/gollum/frontend/views/create.rb
gollum-1.2.1 lib/gollum/frontend/views/create.rb
gollum-1.3.0 lib/gollum/frontend/views/create.rb
gollum-1.2.0 lib/gollum/frontend/views/create.rb