Class: Precious::Views::Edit

Inherits:
Layout
  • Object
show all
Includes:
Editable, HasMath, HasPage
Defined in:
lib/gollum/views/edit.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

#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

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

#contentObject (readonly)

Returns the value of attribute content.



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

def content
  @content
end

#pageObject (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_uploadsObject



68
69
70
# File 'lib/gollum/views/edit.rb', line 68

def allow_uploads
  @allow_uploads
end

#etagObject



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 footer
  if @footer.nil?
    if page = @page.footer
      @footer = page.text_data
    else
      @footer = false
    end
  end
  @footer
end

#formatObject



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

#headerObject



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_pageObject



56
57
58
# File 'lib/gollum/views/edit.rb', line 56

def is_create_page
  false
end

#is_edit_pageObject



60
61
62
# File 'lib/gollum/views/edit.rb', line 60

def is_edit_page
  true
end

#page_nameObject



19
20
21
# File 'lib/gollum/views/edit.rb', line 19

def page_name
  @name
end

#pathObject

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 sidebar
  if @sidebar.nil?
    if page = @page.sidebar
      @sidebar = page.text_data
    else
      @sidebar = false
    end
  end
  @sidebar
end

#titleObject



15
16
17
# File 'lib/gollum/views/edit.rb', line 15

def title
  "#{@page.title}"
end