[freeside-commits] branch master updated. 847c27d7683856f420ed5306cb0ca395f1a6eb60
Mark Wells
mark at 420.am
Tue Aug 12 16:53:06 PDT 2014
The branch, master has been updated
via 847c27d7683856f420ed5306cb0ca395f1a6eb60 (commit)
from 6f8edbafb0401dd2224d3698397bcb16ffad1580 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 847c27d7683856f420ed5306cb0ca395f1a6eb60
Author: Mark Wells <mark at freeside.biz>
Date: Tue Aug 12 16:52:09 2014 -0700
popup view for collapsed packages, #25130, #27305
diff --git a/httemplate/view/cust_main/packages/contact.html b/httemplate/view/cust_main/packages/contact.html
index 0f0cde7..10c584c 100644
--- a/httemplate/view/cust_main/packages/contact.html
+++ b/httemplate/view/cust_main/packages/contact.html
@@ -10,10 +10,12 @@
( <%pkg_detach_link($cust_pkg)%> )
</FONT>
% }
+ <BR>
% } elsif ( $show_contact_link && ! $opt{no_links} ) {
<FONT SIZE=-1>
( <%pkg_add_contact_link($cust_pkg)%> )
</FONT>
+ <BR>
% }
<%init>
diff --git a/httemplate/view/cust_main/packages/hidden.html b/httemplate/view/cust_main/packages/hidden.html
index e3bd0fa..35eda8c 100644
--- a/httemplate/view/cust_main/packages/hidden.html
+++ b/httemplate/view/cust_main/packages/hidden.html
@@ -18,13 +18,13 @@
<B><% time2str('%b %o, %Y', $cust_pkg->get('cancel')) %></B>
</TD><TD>
% if ( $pkgpart_change ) {
- from <B><% $part_pkg->pkg |h %></B></A> - <% $part_pkg->custom_comment |h %>
+ from <% $popup_link |n %><B><% $part_pkg->pkg |h %></B> - <% $part_pkg->custom_comment |h %></A>
% }
% if ( $pkgpart_change and $location_change ) {
<BR>
% }
% if ( $location_change ) {
- from <I><% $cust_pkg->location_label %></I>
+ from <I><% $popup_link |n %><% $cust_pkg->location_label %></A></I>
% }
</TD>
</TR>
@@ -52,4 +52,14 @@ my $pkgpart_change = ($next->pkgpart != $cust_pkg->pkgpart);
my $location_change = ($next->locationnum != $cust_pkg->locationnum);
my $both_change = $pkgpart_change && $location_change;
+my $onclick =
+ include('/elements/popup_link_onclick.html',
+ 'action' => $fsurl.'view/cust_pkg-popup.html?' . $cust_pkg->pkgnum,
+ 'actionlabel' => 'Package #'.$cust_pkg->pkgnum,
+ 'width' => '1000',
+ 'height' => '310',
+ 'color' => $cust_pkg->statuscolor,
+ );
+my $popup_link = qq(<A HREF="#" onclick="$onclick">);
+
</%init>
diff --git a/httemplate/view/cust_main/packages/section.html b/httemplate/view/cust_main/packages/section.html
index 4980fee..217e8c5 100755
--- a/httemplate/view/cust_main/packages/section.html
+++ b/httemplate/view/cust_main/packages/section.html
@@ -4,17 +4,22 @@
<TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Package') |h %></TH>
<TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Status') |h %></TH>
<TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Contact/Location') |h %></TH>
+% if (!$opt{no_services}) {
<TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Services') |h %></TH>
+% }
</TR>
% #$FS::cust_pkg::DEBUG = 2;
% foreach my $cust_pkg (@$packages) {
+% # if requested, this can override cust_pkg-group_by_location
<& .packagerow, $cust_pkg,
+ %conf_opt,
( map { $_ => $opt{$_} } qw(
cust_main bgcolor no_links cust_location_cache
before_pkg_callback before_svc_callback after_svc_callback
+ cust_pkg-group_by_location
+ no_services
)),
- %conf_opt
&>
% }
% } else { # there are no packages
@@ -30,10 +35,12 @@
<& package.html, %iopt &>
<& status.html, %iopt &>
<TD CLASS="inv" BGCOLOR="<% $iopt{bgcolor} %>" WIDTH="20%" VALIGN="top">
- <& contact.html, %iopt &><BR>
+ <& contact.html, %iopt &>
<& location.html, %iopt &>
</TD>
+% if (!$iopt{no_services}) {
<& services.html, %iopt &>
+% }
</TR>
% # insert hidden predecessors to this package, if any
% # and a rolldown button to show them
diff --git a/httemplate/view/cust_pkg-popup.html b/httemplate/view/cust_pkg-popup.html
new file mode 100644
index 0000000..96956c7
--- /dev/null
+++ b/httemplate/view/cust_pkg-popup.html
@@ -0,0 +1,27 @@
+<& /elements/header-popup.html &>
+<TABLE STYLE="width: 100%">
+<& cust_main/packages/section.html,
+ 'cust_main' => $cust_main,
+ 'packages' => [ $cust_pkg ],
+ 'cust_pkg-group_by_location' => 0,
+ 'no_services' => 1,
+&>
+</TABLE>
+</BODY>
+</HTML>
+<%init>
+my $curuser = $FS::CurrentUser::CurrentUser;
+my ($pkgnum) = $cgi->keywords;
+$pkgnum =~ /^\d+$/ or die "bad pkgnum $pkgnum";
+
+my $cust_pkg = qsearchs({
+ 'table' => 'cust_pkg',
+ 'addl_from' => 'JOIN cust_main USING (custnum)',
+ 'hashref' => { 'pkgnum' => $pkgnum },
+ 'extra_sql' => ' AND '.$curuser->agentnums_sql,
+});
+die "Package not found" unless $cust_pkg;
+my $cust_main = $cust_pkg->cust_main;
+
+my $title = mt('Package [_1]', $pkgnum);
+</%init>
-----------------------------------------------------------------------
Summary of changes:
httemplate/view/cust_main/packages/contact.html | 2 ++
httemplate/view/cust_main/packages/hidden.html | 14 ++++++++++--
httemplate/view/cust_main/packages/section.html | 11 +++++++--
httemplate/view/cust_pkg-popup.html | 27 +++++++++++++++++++++++
4 files changed, 50 insertions(+), 4 deletions(-)
create mode 100644 httemplate/view/cust_pkg-popup.html
More information about the freeside-commits
mailing list