Class: Precious::Views::Create

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

Constant Summary

Constants included from RouteHelpers

RouteHelpers::ROUTES

Constants included from LocaleHelpers

LocaleHelpers::NO_METHOD_MESSAGE, LocaleHelpers::YAML_VARIABLE_REGEXP

Instance Attribute Summary collapse

Attributes inherited from Layout

#path

Instance Method Summary collapse

Methods included from HasMath

#mathjax, #mathjax_config

Methods included from Editable

#has_editor

Methods inherited from Layout

#base_url, #critic_markup, #css, #custom_css, #custom_js, #custom_path, #escaped_name, #has_path, #history, #js, #latest_changes, #mathjax_config_path, #mathjax_js, #overview, #partial, #per_page_uploads, #search, #show_local_time

Methods included from TemplateCascade

#first_path_available, #template_file, #template_priority_path, #template_priority_path=

Methods included from OcticonHelpers

included, #octicon, #rocticon, #rocticon_css

Methods included from RouteHelpers

#clean_url, included, #page_route, parse_routes

Methods included from SprocketsHelpers

included, #sprockets_asset_path, #sprockets_image_path, #sprockets_javascript_tag, #sprockets_stylesheet_tag

Methods included from LocaleHelpers

#t

Methods included from AppHelpers

#extract_page_dir

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#pageObject (readonly)

Returns the value of attribute page.



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

def page
  @page
end

Instance Method Details

#allow_uploadsObject



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

def allow_uploads
  @allow_uploads
end

#contentObject

QND - sets default template page if specified



42
43
44
# File 'lib/gollum/views/create.rb', line 42

def content
  @template_page
end

#default_markupObject



37
38
39
# File 'lib/gollum/views/create.rb', line 37

def default_markup
  Precious::App.settings.default_markup
end

#formatObject



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

def format
  @format ||= find_format.to_s.downcase
end

#formatsObject



33
34
35
# File 'lib/gollum/views/create.rb', line 33

def formats
  super(find_format)
end

#is_create_pageObject



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

def is_create_page
  true
end

#is_edit_pageObject



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

def is_edit_page
  false
end

#page_nameObject



29
30
31
# File 'lib/gollum/views/create.rb', line 29

def page_name
  @name
end

#titleObject



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

def title
  "Create a new page"
end