Class: ODDB::View::CompanyLogo

Inherits:
HtmlGrid::Component show all
Defined in:
src/view/sponsorlogo.rb

Instance Method Summary (collapse)

Methods inherited from HtmlGrid::Component

#additional_javascripts, #dynamic_html

Instance Method Details

- (Object) init



9
10
11
12
13
14
# File 'src/view/sponsorlogo.rb', line 9

def init
  if(name = @model.logo_filename)
    @attributes['src'] = @lookandfeel.resource_global(:company_logo, name)
    @attributes['alt'] = @model.name
  end
end

- (Object) to_html(context)



15
16
17
# File 'src/view/sponsorlogo.rb', line 15

def to_html(context)
  context.img(@attributes)
end