Class: ODDB::View::Doctors::DoctorComposite

Inherits:
HtmlGrid::Composite show all
Includes:
VCardMethods
Defined in:
src/view/doctors/doctor.rb

Direct Known Subclasses

RootDoctorComposite

Constant Summary

COMPONENTS =
{
  [0,0,0] =>  :title,
  [0,0,1] =>  :nbsp,
  [0,0,2] =>  :firstname,
  [0,0,3] =>  :nbsp,
  [0,0,4] =>  :name,
  [0,1]   => DoctorInnerComposite,
  [0,2]   => :addresses,
  [0,3]   => :vcard,
}
SYMBOL_MAP =
{
  :nbsp           => HtmlGrid::Text,
}
CSS_MAP =
{
  [0,0] => 'th',
  [0,2] => 'top',
  [0,3] => 'list',
}
CSS_CLASS =
'composite'
DEFAULT_CLASS =
HtmlGrid::Value
LEGACY_INTERFACE =
false

Instance Method Summary (collapse)

Methods included from VCardMethods

#vcard

Methods inherited from HtmlGrid::Composite

event_link, #hash_insert_col, #hash_insert_row

Instance Method Details

- (Object) addresses(model)



158
159
160
161
162
163
164
165
166
167
# File 'src/view/doctors/doctor.rb', line 158

def addresses(model)
  addrs = model.addresses
  if(addrs.empty?)
    addrs = addrs.dup
    addr = Address2.new
    addr.pointer = model.pointer + [:address, 0]
    addrs.push(addr)
  end
  Addresses.new(addrs, @session, self)
end