Class: ODDB::View::Hospitals::HospitalInnerComposite

Inherits:
HtmlGrid::Composite show all
Includes:
AddressMap, VCardMethods
Defined in:
src/view/hospitals/hospital.rb

Constant Summary

COMPONENTS =
{
  [0,0,0] =>  :business_unit_header,
  [0,0,1] =>  :nbsp,
  [0,0,2] =>  :business_unit,
  [0,1,0] =>  :ean13_header,
  [0,1,1] =>  :nbsp,
  [0,1,2] =>  :ean13,
  [0,2]     =>  :address_header,
  [0,3]     =>  :address,
  #[0,12]   => :map,
  [0,4]   => :vcard,
}
SYMBOL_MAP =
{
  :business_unit_header =>  HtmlGrid::LabelText,
  :address_header =>  HtmlGrid::LabelText,
  :ean13_header   => HtmlGrid::LabelText,
  :fons_header    =>  HtmlGrid::LabelText,
  :fax_header     =>  HtmlGrid::LabelText,
  :nbsp           => HtmlGrid::Text,
  :url            =>  HtmlGrid::HttpLink,
}
CSS_MAP =
{
  [0,0,1,3] => 'list',
  [0,4,1,2] => 'list',
}
DEFAULT_CLASS =
HtmlGrid::Value
LEGACY_INTERFACE =
false

Instance Method Summary (collapse)

Methods included from AddressMap

#map

Methods included from VCardMethods

#vcard

Methods inherited from HtmlGrid::Composite

event_link, #hash_insert_col, #hash_insert_row

Instance Method Details

- (Object) address(model)



58
59
60
# File 'src/view/hospitals/hospital.rb', line 58

def address(model)
  Address.new(model.addresses.first, @session, self)
end

- (Object) location(model)



61
62
63
64
65
# File 'src/view/hospitals/hospital.rb', line 61

def location(model)
  if(addr = model.addresses.first)
    addr.location
  end
end

- (Object) mapsearch_format(*args)



55
56
57
# File 'src/view/hospitals/hospital.rb', line 55

def mapsearch_format(*args)
  args.compact.join('-').gsub(/\s+/u, '-')
end