X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fpackages%2Flocation.html;h=ab961b79eb96df15a8c4436673bf1e4929d0df56;hb=d1ef14dc43b37960ce08aae9b795b593a24cdc15;hp=6658415b51f41e54fd3ec99a10ec40bad02b52dd;hpb=998f029ef805c73e90543b34192e16d38a23c69c;p=freeside.git diff --git a/httemplate/view/cust_main/packages/location.html b/httemplate/view/cust_main/packages/location.html index 6658415b5..ab961b79e 100644 --- a/httemplate/view/cust_main/packages/location.html +++ b/httemplate/view/cust_main/packages/location.html @@ -1,45 +1,59 @@ - - -% unless ( $cust_pkg->locationnum ) { - (<% mt('default service address') |h %>)
+% if ( $default ) { +
% } - <% $loc->location_label( 'join_string' => '
', - 'double_space' => '   ', - 'escape_function' => \&encode_entities, - 'countrydefault' => $countrydefault, - ) - %> + <% $loc->location_label( 'join_string' => '
', + 'double_space' => '   ', + 'escape_function' => \&encode_entities, + 'countrydefault' => $countrydefault, + ) + %> + +% if ( $loc->latitude && $loc->longitude ) { +
+ + <% $loc->latitude %>, <% $loc->longitude %> + <& /elements/coord-links.html, + $loc->latitude, + $loc->longitude, + $opt{'cust_main'}->name_short. ': '. $opt{'part_pkg'}->pkg, + $opt{'cust_main'}->agentnum, + &> + +% } -% unless ( $cust_pkg->locationnum ) { -
+% if ( $default ) { +
% } % if ( ! $cust_pkg->get('cancel') % && $FS::CurrentUser::CurrentUser->access_right('Change customer package') % ) % { +
- ( <%pkg_change_location_link($cust_pkg)%> ) -% if ( $cust_pkg->locationnum ) { - ( <%edit_location_link($cust_pkg->locationnum)%> ) +% unless ( $opt{no_links} ) { + ( <%pkg_change_location_link($cust_pkg)%> ) +% } +% if ( $cust_pkg->locationnum && ! $opt{no_links} ) { + ( <%edit_location_link($cust_pkg->locationnum)%> ) % } % } - <%init> my $conf = new FS::Conf; my %opt = @_; -my $bgcolor = $opt{'bgcolor'}; my $cust_pkg = $opt{'cust_pkg'}; my $countrydefault = $opt{'countrydefault'} || 'US'; my $statedefault = $opt{'statedefault'} || ($countrydefault eq 'US' ? 'CA' : ''); my $loc = $cust_pkg->cust_location_or_main; +# dubious--they should all have a location now +my $default = $cust_pkg->locationnum == $opt{'cust_main'}->ship_locationnum; sub pkg_change_location_link { my $cust_pkg = shift; @@ -51,6 +65,8 @@ sub pkg_change_location_link { 'label' => emt('Change location'), 'actionlabel' => emt('Change'), 'cust_pkg' => $cust_pkg, + 'width' => 763, + 'height' => 380, ); } @@ -60,7 +76,9 @@ sub edit_location_link { 'action' => $p. "edit/cust_location.cgi?locationnum=$locationnum", 'label' => emt('Edit location'), 'actionlabel' => emt('Edit'), - ); + 'width' => 700, + 'height' => 355, + ); }