Class: Precious::Views::Edit
- Defined in:
- lib/gollum/views/edit.rb
Constant Summary
Constants included from RouteHelpers
Constants included from LocaleHelpers
LocaleHelpers::NO_METHOD_MESSAGE, LocaleHelpers::YAML_VARIABLE_REGEXP
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#page ⇒ Object
readonly
Returns the value of attribute page.
Attributes inherited from Layout
Instance Method Summary collapse
- #allow_uploads ⇒ Object
- #etag ⇒ Object
- #footer ⇒ Object
- #format ⇒ Object
- #header ⇒ Object
- #is_create_page ⇒ Object
- #is_edit_page ⇒ Object
- #page_name ⇒ Object
-
#path ⇒ Object
return path set in app.rb not @page.path.
- #sidebar ⇒ Object
- #title ⇒ Object
Methods included from HasMath
#katex, #math_config, #mathjax
Methods included from HasPage
Methods included from Editable
#default_keybinding, #formats, #has_editor, #keybindings
Methods inherited from Layout
#base_url, #critic_markup, #css, #custom_css, #custom_js, #custom_path, #escaped_name, #has_path, #history, #js, #latest_changes, #mathjax_js, #mermaid, #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
Methods included from AppHelpers
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
8 9 10 |
# File 'lib/gollum/views/edit.rb', line 8 def content @content end |
#page ⇒ Object (readonly)
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 |
#footer ⇒ Object
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 |
#format ⇒ Object
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 |
#header ⇒ Object
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/gollum/views/edit.rb', line 23 def header if @header.nil? if page = @page.header @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 |
#sidebar ⇒ Object
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 |