# Copyright (c) 2001-2009 bivio Software, Inc. All rights reserved. # # Visit http://www.bivio.biz for more info. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; If not, you may get a copy from: # http://www.opensource.org/licenses/lgpl-license.html # # $Id: order-commit.bview,v 2.5 2009/11/28 02:59:08 nagler Exp $ # # Order detail # view_parent('menu'); view_put( header_title => 'Order Shipped', header_page_print => 1, ); # Returns a address widget which renders the specified Address. my($address_widget) = sub { my($heading, $location) = @_; $location = Bivio::Type::Location->from_name($location); return Join([ String($heading, 'page_heading'), '
',
String($location->get_short_desc),
String(':'),
'
',
String(['Model.Order', lc($location->get_name) . '_name']),
'
',
[sub {
my($req) = @_;
Bivio::Biz::Model->new($req, 'Address')->load({
location => $location,
}),
return '';
}],
String(['Model.Address', 'street1']),
'
',
If(['Model.Address', 'street2'],
Join([String(['Model.Address', 'street2']), '
',]),
Join([''])),
String(['Model.Address', 'city']),
String(', '),
String(['Model.Address', 'state']),
vs_blank_cell(2),
String(['Model.Address', 'zip']),
'