Class: Precious::Views::Create
- Includes:
- Editable
- Defined in:
- lib/gollum/frontend/views/create.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#page ⇒ Object
readonly
Returns the value of attribute page.
Instance Method Summary collapse
- #default_markup ⇒ Object
- #format ⇒ Object
- #formats ⇒ Object
- #has_footer ⇒ Object
- #has_sidebar ⇒ Object
- #is_create_page ⇒ Object
- #is_edit_page ⇒ Object
- #page_name ⇒ Object
- #title ⇒ Object
Methods inherited from Layout
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/gollum/frontend/views/create.rb', line 6 def name @name end |
#page ⇒ Object (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
#default_markup ⇒ Object
43 44 45 |
# File 'lib/gollum/frontend/views/create.rb', line 43 def default_markup Precious::App.settings.default_markup end |
#format ⇒ Object
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 |
#formats ⇒ Object
39 40 41 |
# File 'lib/gollum/frontend/views/create.rb', line 39 def formats super(:markdown) end |
#has_footer ⇒ Object
25 26 27 28 |
# File 'lib/gollum/frontend/views/create.rb', line 25 def @footer = (@page. || false) if @footer.nil? && @page !!@footer end |
#has_sidebar ⇒ Object
30 31 32 33 |
# File 'lib/gollum/frontend/views/create.rb', line 30 def @sidebar = (@page. || false) if @sidebar.nil? && @page !!@sidebar end |
#is_create_page ⇒ Object
12 13 14 |
# File 'lib/gollum/frontend/views/create.rb', line 12 def is_create_page true end |
#is_edit_page ⇒ Object
16 17 18 |
# File 'lib/gollum/frontend/views/create.rb', line 16 def is_edit_page false end |
#page_name ⇒ Object
35 36 37 |
# File 'lib/gollum/frontend/views/create.rb', line 35 def page_name @name.gsub('-', ' ') end |
#title ⇒ Object
8 9 10 |
# File 'lib/gollum/frontend/views/create.rb', line 8 def title "Create a new page" end |