X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fbrowse%2Fpart_pkg.cgi;h=57a4297476e0e13e5c12088c5cbe0c4b621a6a5d;hb=d7e62d5ea2b5d3f3c7b8ba3da39cce1a606dc3d3;hp=766806044848ffc3349d7712cc906ea1c9624e1e;hpb=077bb34b3467c3320440c49b76064f664c0eee98;p=freeside.git diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index 766806044..57a429747 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -45,6 +45,7 @@ my $select = '*'; my $orderby = 'pkgpart'; my %hash = (); my $extra_count = ''; +my $family_pkgpart; if ( $cgi->param('active') ) { $orderby = 'num_active DESC'; @@ -77,6 +78,16 @@ if ( $cgi->param('missing_recur_fee') ) { )"; } +if ( $cgi->param('family') =~ /^(\d+)$/ ) { + $family_pkgpart = $1; + push @where, "family_pkgpart = $1"; + # Hiding disabled or one-time charges and limiting by classnum aren't + # very useful in this mode, so all links should still refer back to the + # non-family-limited display. + $cgi->param('showdisabled', 1); + $cgi->delete('family'); +} + push @where, FS::part_pkg->curuser_pkgs_sql unless $acl_edit_global; @@ -125,7 +136,7 @@ my $html_init; One or more service definitions are grouped together into a package definition and given pricing information. Customers purchase packages rather than purchase services directly.

-
+ Add a new package definition or !.include('/elements/select-part_pkg.html', 'element_name' => 'clone' ). qq! @@ -209,6 +220,16 @@ push @fields, sub { $part_pkg->part_pkg_discount; [ + ( !$family_pkgpart && + $part_pkg->pkgpart == $part_pkg->family_pkgpart ? () : [ + { + 'align'=> 'center', + 'colspan' => 2, + 'size' => '-1', + 'data' => 'Show all versions', + 'link' => $p.'browse/part_pkg.cgi?family='.$part_pkg->family_pkgpart, + } + ] ), [ { data =>$plan, align=>'center', @@ -415,7 +436,7 @@ push @fields, [ map { [ - { 'data' => $_, + { 'data' => "$_: ", 'align' => 'right', }, { 'data' => $part_pkg->format($_,$options{$_}),