Class: BBMB::Html::View::Head

Inherits:
HtmlGrid::DivComposite
  • Object
show all
Defined in:
lib/bbmb/html/view/head.rb

Constant Summary collapse

COMPONENTS =
{
  [0,0] => :logo,
  [0,2] => 'welcome',
  [0,1] => :logged_in_as, # has float-right, needs to be before 'welcome'
}
CSS_ID_MAP =
{2 => 'welcome', 1 => 'logged-in-as'}

Instance Method Summary collapse

Instance Method Details

#logged_in_as(model) ⇒ Object



17
18
19
20
21
# File 'lib/bbmb/html/view/head.rb', line 17

def logged_in_as(model)
  if(@session.logged_in?)
    @lookandfeel.lookup(:logged_in_as, @session.auth_session.name)
  end
end

#logo(model) ⇒ Object



22
23
24
25
26
27
28
# File 'lib/bbmb/html/view/head.rb', line 22

def (model)
  img = HtmlGrid::Image.new(:logo, model, @session, self)
  link = HtmlGrid::Link.new(:home, model, @session, self)
  link.href = @lookandfeel._event_url(:home)
  link.value = img
  link
end