Class: ODDB::View::Hospitals::HospitalList

Inherits:
HtmlGrid::List show all
Includes:
UmlautSort, AddressMap, AlphaHeader, VCardMethods
Defined in:
src/view/hospitals/hospitallist.rb

Constant Summary

COMPONENTS =
{
  [0,0] =>  :name,
  [1,0] =>  :business_unit, 
  [2,0] =>  :city,
  [3,0] =>  :plz,
  [4,0] =>  :canton,
  [5,0] =>  :narcotics,
  [6,0] =>  :map,
  [7,0] =>  :vcard,
}
DEFAULT_CLASS =
HtmlGrid::Value
CSS_CLASS =
'composite'
CSS_MAP =
{
  [0,0] =>  'list',
  [1,0] =>  'list',
  [2,0] =>  'list',
  [3,0] =>  'list',
  [4,0] =>  'list',
  [5,0] =>  'list',
  [6,0] =>  'list',
  [7,0] =>  'list',
}
CSS_HEAD_MAP =
{
  [0,0] =>  'th',
  [1,0] =>  'th',
  [2,0] =>  'th',
  [3,0] =>  'th',
  [4,0] =>  'th',
  [5,0] =>  'th',
  [6,0] =>  'th',
  [7,0] =>  'th',
}
LOOKANDFEEL_MAP =
{
  :name           => :hospital_name,
  :canton         =>  :canton,
}
SORT_DEFAULT =
:name
SORT_REVERSE =
false
LEGACY_INTERFACE =
false

Constants included from UmlautSort

FILTER_PAIRS

Constants included from AlphaHeader

EMPTY_LIST_KEY

Constants inherited from HtmlGrid::List

BACKGROUND_SUFFIX

Instance Method Summary (collapse)

Methods included from VCardMethods

#vcard

Methods included from AddressMap

#mapsearch_format

Methods included from UmlautSort

#sort_model, #umlaut_filter

Methods included from AlphaHeader

#compose_header

Instance Method Details

- (Object) canton(model)



74
75
76
77
78
# File 'src/view/hospitals/hospitallist.rb', line 74

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

- (Object) city(model)



69
70
71
72
73
# File 'src/view/hospitals/hospitallist.rb', line 69

def city(model)
  if(addr = model.address(0))
    addr.city
  end
end

- (Object) map(model)



91
92
93
94
95
# File 'src/view/hospitals/hospitallist.rb', line 91

def map(model)
  if(addr = model.addresses.first)
    super(addr)
  end
end

- (Object) name(model)



79
80
81
82
83
# File 'src/view/hospitals/hospitallist.rb', line 79

def name(model)
  link = View::PointerLink.new(:name, model, @session, self)
  link.set_attribute('title', "EAN: #{model.ean13}")
  link
end

- (Object) narcotics(model)



84
85
86
87
88
89
90
# File 'src/view/hospitals/hospitallist.rb', line 84

def narcotics(model)
  if(model.narcotics == "Keine Betäubungsmittelbewilligung")
    @lookandfeel.lookup(:false)
  else
    @lookandfeel.lookup(:true)
  end
end

- (Object) plz(model)



64
65
66
67
68
# File 'src/view/hospitals/hospitallist.rb', line 64

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