Class: Precious::Views::Edit
Constant Summary
RouteHelpers::ROUTES
LocaleHelpers::NO_METHOD_MESSAGE, LocaleHelpers::YAML_VARIABLE_REGEXP
Instance Attribute Summary collapse
Attributes inherited from Layout
#name
Instance Method Summary
collapse
Methods included from HasMath
#mathjax, #mathjax_config
Methods included from HasPage
#escaped_url_path, #id
Methods included from Editable
#formats, #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
#first_path_available, #template_file, #template_priority_path, #template_priority_path=
included, #octicon, #rocticon, #rocticon_css
#clean_url, included, #page_route, parse_routes
included, #sprockets_asset_path, #sprockets_image_path, #sprockets_javascript_tag, #sprockets_stylesheet_tag
#t
Methods included from AppHelpers
#extract_page_dir
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
8
9
10
|
# File 'lib/gollum/views/edit.rb', line 8
def content
@content
end
|
#page ⇒ Object
Returns the value of attribute page.
8
9
10
|
# File 'lib/gollum/views/edit.rb', line 8
def page
@page
end
|
Instance Method Details
#allow_uploads ⇒ Object
68
69
70
|
# File 'lib/gollum/views/edit.rb', line 68
def allow_uploads
@allow_uploads
end
|
#etag ⇒ Object
64
65
66
|
# File 'lib/gollum/views/edit.rb', line 64
def etag
@etag
end
|
34
35
36
37
38
39
40
41
42
43
|
# File 'lib/gollum/views/edit.rb', line 34
def
if @footer.nil?
if page = @page.
@footer = page.text_data
else
@footer = false
end
end
@footer
end
|
72
73
74
75
|
# File 'lib/gollum/views/edit.rb', line 72
def format
@format = (@page.format || false) if @format.nil?
@format.to_s.downcase
end
|
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/gollum/views/edit.rb', line 23
def
if @header.nil?
if page = @page.
@header = page.text_data
else
@header = false
end
end
@header
end
|
#is_create_page ⇒ Object
56
57
58
|
# File 'lib/gollum/views/edit.rb', line 56
def is_create_page
false
end
|
#is_edit_page ⇒ Object
60
61
62
|
# File 'lib/gollum/views/edit.rb', line 60
def is_edit_page
true
end
|
#page_name ⇒ Object
19
20
21
|
# File 'lib/gollum/views/edit.rb', line 19
def page_name
@name
end
|
#path ⇒ Object
return path set in app.rb not @page.path
11
12
13
|
# File 'lib/gollum/views/edit.rb', line 11
def path
@path
end
|
45
46
47
48
49
50
51
52
53
54
|
# File 'lib/gollum/views/edit.rb', line 45
def
if @sidebar.nil?
if page = @page.
@sidebar = page.text_data
else
@sidebar = false
end
end
@sidebar
end
|
#title ⇒ Object
15
16
17
|
# File 'lib/gollum/views/edit.rb', line 15
def title
"#{@page.title}"
end
|