Class: YDIM::Html::View::DebitorList

Inherits:
HtmlGrid::FormList
  • Object
show all
Defined in:
lib/ydim/html/view/debitors.rb

Constant Summary collapse

COMPONENTS =
{
	[0,0]	=>	:unique_id,
	[1,0]	=>	:name,
	[2,0]	=>	:email,
	[3,0]	=>	:phone,
	[4,0]	=>	:next_invoice_date,
	[5,0]	=>	:debitor_type,
}
EVENT =
:create_debitor
SORT_DEFAULT =
nil

Instance Method Summary collapse

Instance Method Details

#debitor_type(model) ⇒ Object



22
23
24
# File 'lib/ydim/html/view/debitors.rb', line 22

def debitor_type(model)
	@lookandfeel.lookup(model.debitor_type)
end

#next_invoice_date(model) ⇒ Object



25
26
27
28
29
# File 'lib/ydim/html/view/debitors.rb', line 25

def next_invoice_date(model)
	if(date = model.next_invoice_date)
		@lookandfeel.format_date(date)
	end
end

#phone(model) ⇒ Object



30
31
32
33
34
35
36
37
# File 'lib/ydim/html/view/debitors.rb', line 30

def phone(model)
	if(phone = model.phone)
		link = HtmlGrid::Link.new(:phone, model, @session, self)
		link.href = "callto://#{phone.delete(' ')}"
		link.value = phone
		link
	end
end