Module: ODDB::View::Personal

Included in:
CommonLogoHead, WelcomeHead
Defined in:
src/view/personal.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) welcome(model, session)



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'src/view/personal.rb', line 10

def welcome(model, session)
  user = session.user
  div = HtmlGrid::Div.new(model, session, self)
  div.css_class = 'personal'
  if(user.is_a?(ODDB::YusUser))
    name = [
      user.name_first, user.name_last
    ].compact.join(' ')
    if(name.empty?)
      name = user.name
    end
    div.value = @lookandfeel.lookup(:welcome, name)
    div
  end
end