X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fcustomer-table.html;h=3c3f8b2ee32531b36310965ed9ddbd4d1324efa8;hb=f7e5e7625b04164ce2e0aac77a85bc03a7d48a6f;hp=fc298b03e0de99a199ab398bdc3f3acb296623a5;hpb=1b19010429786e0a2987573dc9dbff351091911e;p=freeside.git diff --git a/httemplate/elements/customer-table.html b/httemplate/elements/customer-table.html index fc298b03e..3c3f8b2ee 100644 --- a/httemplate/elements/customer-table.html +++ b/httemplate/elements/customer-table.html @@ -1,15 +1,43 @@ -% # options example... -% # -% # #listrefs... -% # 'header' => [ '#', 'Item' ], -% # 'fields' => [ -% # 'column', -% # sub { my ($row,$param) = @_; $param->{"column$row"}; }, -% # ], -% # 'sizes' => [], # sizes ignored for immutable -% # 'types' => ['immutable', ''], # immutable or ''/text -% # 'param' => { column0 => 1 }, # preset column of row 0 to 1 -% # +<%doc> + +Example: + + include( '/elements/customer-table.html', + + ### + # required + ### + + #listrefs... + 'header' => [ '#', 'Item' ], + 'fields' => [ + 'column', + sub { my ($row,$param) = @_; + $param->{"column$row"}; + }, + ], + + ### + # optional + ### + + 'name_singular' => 'customer', #label + 'custnum_update_callback' => 'name_of_js_callback' #passed a rownum + + #listrefs + 'types' => ['immutable', ''], # immutable or ''/text + 'align' => [ 'c', 'l', 'r', '' ], + 'size' => [], # sizes ignored for immutable + 'color' => [], + 'footer' => ['string', '_TOTAL'], # strings or the special + #value _TOTAL + 'footer_align' => [ 'c', 'l', 'r', '' ], + + 'param' => { column0 => 1 }, # preset column of row 0 to 1 + + ) + +%doc> + " + rownum = "<% $row %>" + > +