Sha256: 362f373d666084071867af06be927bf9175af9f31b680d328c92ea3ac3e718e6
Contents?: true
Size: 928 Bytes
Versions: 3
Compression:
Stored size: 928 Bytes
Contents
#!/usr/bin/env ruby # encoding: utf-8 # Html::View::Debitors -- ydim -- 12.01.2006 -- hwyss@ywesee.com require 'ydim/html/view/template' require 'htmlgrid/formlist' module YDIM module Html module View class DebitorList < HtmlGrid::FormList 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 def debitor_type(model) @lookandfeel.lookup(model.debitor_type) end def next_invoice_date(model) if(date = model.next_invoice_date) @lookandfeel.format_date(date) end end 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 links :debitor, :name, :unique_id end class Debitors < Template CONTENT = DebitorList end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ydim-html-1.0.3 | lib/ydim/html/view/debitors.rb |
ydim-html-1.0.2 | lib/ydim/html/view/debitors.rb |
ydim-html-1.0.1 | lib/ydim/html/view/debitors.rb |