Class: ODDB::View::Admin::AddressList

Inherits:
HtmlGrid::List show all
Defined in:
src/view/admin/addresses.rb

Constant Summary

COMPONENTS =
{
  [0,0] =>  :time,
  [1,0] =>  :parent_class,
  [2,0] =>  :address_type,
  [3,0] =>  :title,
  [4,0] =>  :name,
  [5,0] =>  :address,
  [6,0] =>  :location,
}
CSS_CLASS =
'composite'
CSS_MAP =
{ 
  [0,0,7] =>  'list' 
}
DEFAULT_CLASS =
HtmlGrid::Value
DEFAULT_HEAD_CLASS =
'th'
LEGACY_INTERFACE =
false
SORT_DEFAULT =
:time
SORT_REVERSE =
true
SYMBOL_MAP =
{
  :name =>  PointerLink,
}

Constants inherited from HtmlGrid::List

BACKGROUND_SUFFIX

Instance Method Summary (collapse)

Instance Method Details

- (Object) address_type(model)



33
34
35
# File 'src/view/admin/addresses.rb', line 33

def address_type(model)
  @lookandfeel.lookup(model.type)
end

- (Object) parent_class(model)



36
37
38
39
40
# File 'src/view/admin/addresses.rb', line 36

def parent_class(model)
  ptr = model.address_pointer
  obj = ptr.parent.resolve(@session)
  @lookandfeel.lookup(obj.class)
end

- (Object) time(model)



41
42
43
44
45
46
47
48
# File 'src/view/admin/addresses.rb', line 41

def time(model)
  if(time = model.time)
    link = PointerLink.new(:time, model, @session,self)
    fmt = @lookandfeel.lookup(:time_format_long)
    link.value = time.strftime(fmt)
    link
  end
end