Class: ODDB::View::Doctors::DoctorList

Inherits:
HtmlGrid::List show all
Includes:
AddressMap, VCardMethods
Defined in:
src/view/doctors/doctorlist.rb

Constant Summary

COMPONENTS =
{
  [0,0] =>  :name,
  [1,0] =>  :firstname,
  [2,0] =>  :tel,
  [3,0] =>  :praxis_address,
  [4,0] =>  :specialities,
  [5,0] =>  :map,
  [6,0] =>  :vcard,
}
DEFAULT_CLASS =
HtmlGrid::Value
CSS_CLASS =
'composite'
CSS_MAP =
{
  [0,0,7] =>  'top list',
}
DEFAULT_HEAD_CLASS =
'th'
SORT_DEFAULT =
:name
SORT_REVERSE =
false
LEGACY_INTERFACE =
false

Constants inherited from HtmlGrid::List

BACKGROUND_SUFFIX

Instance Method Summary (collapse)

Methods included from VCardMethods

#vcard

Methods included from AddressMap

#mapsearch_format

Instance Method Details

- (Object) init



40
41
42
43
44
45
# File 'src/view/doctors/doctorlist.rb', line 40

def init
  if(@session.state.paged?)
    extend(View::AlphaHeader)
  end
  super
end

- (Object) map(doctor)



55
56
57
58
59
# File 'src/view/doctors/doctorlist.rb', line 55

def map(doctor)  
  if(address = doctor.praxis_address)
    super(address)
  end
end

- (Object) name(model)



60
61
62
# File 'src/view/doctors/doctorlist.rb', line 60

def name(model)
  View::PointerLink.new(:name, model, @session, self)
end

- (Object) praxis_address(model)



46
47
48
49
50
51
52
53
54
# File 'src/view/doctors/doctorlist.rb', line 46

def praxis_address(model)
  if(address = model.praxis_address)
    emails = model.
    if(!emails.is_a?(Array))
      emails = [emails]
    end
    (address.lines + emails).join("<br>")
  end
end

- (Object) specialities(model)



68
69
70
71
# File 'src/view/doctors/doctorlist.rb', line 68

def specialities(model)
  spc = model.specialities
  spc.join('<br>') unless spc.nil?
end

- (Object) tel(model)



63
64
65
66
67
# File 'src/view/doctors/doctorlist.rb', line 63

def tel(model)
  if(address = model.praxis_address)
    address.fon.join("<br>")
  end
end