Class: Precious::Views::Edit

Inherits:
Layout
  • Object
show all
Includes:
Editable
Defined in:
lib/gollum/frontend/views/edit.rb

Instance Attribute Summary collapse

Attributes inherited from Layout

#name

Instance Method Summary collapse

Methods included from Editable

#formats

Methods inherited from Layout

#escaped_name

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



6
7
8
# File 'lib/gollum/frontend/views/edit.rb', line 6

def content
  @content
end

#pageObject (readonly)

Returns the value of attribute page.



6
7
8
# File 'lib/gollum/frontend/views/edit.rb', line 6

def page
  @page
end

Instance Method Details



16
17
18
19
20
21
22
23
24
25
# File 'lib/gollum/frontend/views/edit.rb', line 16

def footer
  if @footer.nil?
    if page = @page.footer
      @footer = page.raw_data
    else
      @footer = false
    end
  end
  @footer
end

#formatObject



46
47
48
49
# File 'lib/gollum/frontend/views/edit.rb', line 46

def format
  @format = (@page.format || false) if @format.nil?
  @format.to_s.downcase
end

#is_create_pageObject



38
39
40
# File 'lib/gollum/frontend/views/edit.rb', line 38

def is_create_page
  false
end

#is_edit_pageObject



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

def is_edit_page
  true
end

#page_nameObject



12
13
14
# File 'lib/gollum/frontend/views/edit.rb', line 12

def page_name
  @name.gsub('-', ' ')
end


27
28
29
30
31
32
33
34
35
36
# File 'lib/gollum/frontend/views/edit.rb', line 27

def sidebar
  if @sidebar.nil?
    if page = @page.sidebar
      @sidebar = page.raw_data
    else
      @sidebar = false
    end
  end
  @sidebar
end

#titleObject



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

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