Class: Precious::Views::Create

Inherits:
Layout
  • Object
show all
Includes:
Editable
Defined in:
lib/gollum/frontend/views/create.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Layout

#escaped_name

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/gollum/frontend/views/create.rb', line 6

def name
  @name
end

#pageObject (readonly)

Returns the value of attribute page.



6
7
8
# File 'lib/gollum/frontend/views/create.rb', line 6

def page
  @page
end

Instance Method Details

#formatObject



20
21
22
23
# File 'lib/gollum/frontend/views/create.rb', line 20

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

#formatsObject



39
40
41
# File 'lib/gollum/frontend/views/create.rb', line 39

def formats
  super(:markdown)
end


25
26
27
28
# File 'lib/gollum/frontend/views/create.rb', line 25

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

#has_sidebarObject



30
31
32
33
# File 'lib/gollum/frontend/views/create.rb', line 30

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

#is_create_pageObject



12
13
14
# File 'lib/gollum/frontend/views/create.rb', line 12

def is_create_page
  true
end

#is_edit_pageObject



16
17
18
# File 'lib/gollum/frontend/views/create.rb', line 16

def is_edit_page
  false
end

#page_nameObject



35
36
37
# File 'lib/gollum/frontend/views/create.rb', line 35

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

#titleObject



8
9
10
# File 'lib/gollum/frontend/views/create.rb', line 8

def title
  "Create a new page"
end