Class: OMF::Web::Theme::Page
Instance Attribute Summary
Attributes inherited from AbstractPage
#opts
Instance Method Summary
collapse
#collect_data_sources, #data_source_widgets, #initialize, #render_additional_headers, #render_data_source, #render_data_sources, #render_flash, #to_html
Instance Method Details
#content ⇒ Object
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# File 'lib/omf-web/theme/bright/page.rb', line 34
def content
super
div :id => 'doc3' do
div :id => 'hd' do
render_top_line
h1 @page_title || 'Missing :page_title'
end
div :id => 'bd' do
render_body
end
div :id => 'ft' do
end
end
end
|
#render_body ⇒ Object
76
77
78
79
|
# File 'lib/omf-web/theme/bright/page.rb', line 76
def render_body
render_flash
render_card_body
end
|
#render_card_body ⇒ Object
81
82
83
84
85
|
# File 'lib/omf-web/theme/bright/page.rb', line 81
def render_card_body
return unless @widget
Thread.current["top_renderer"] = self
rawtext @widget.content.to_html
end
|
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
# File 'lib/omf-web/theme/bright/page.rb', line 87
def
if @footer_right.is_a? Proc
widget(Erector.inline(&@footer_right))
else
span :style => 'float:right;margin-right:10pt' do
text @footer_right || OMF::Web::VERSION
end
end
if @footer_left.is_a? Proc
widget(Erector.inline(&@footer_left))
else
text @footer_left || 'Brought to you by the TEMPO Team'
end
end
|
57
58
59
60
61
62
63
64
65
66
67
68
|
# File 'lib/omf-web/theme/bright/page.rb', line 57
def
ol :id => :tab_menu do
@tabs.each do |h|
lopts = h[:id] == @tab ? {:class => :current} : {}
li lopts do
a :href => "#{@prefix}/#{h[:id]}?sid=#{Thread.current["sessionID"]}" do
span h[:name], :class => :tab_text
end
end
end
end
end
|
70
71
72
73
74
|
# File 'lib/omf-web/theme/bright/page.rb', line 70
def
div :id => :tools_menu do
a 'Log in', :href => '/login'
end
end
|
#render_top_line ⇒ Object
50
51
52
53
54
55
|
# File 'lib/omf-web/theme/bright/page.rb', line 50
def render_top_line
div :id => :top_line do
end
end
|