'Package type' isn't a thing, try to be more clear with wording
[freeside.git] / httemplate / view / cust_main / packages / hidden.html
index e3bd0fa..e1ffb36 100644 (file)
@@ -9,22 +9,28 @@
     </TD>
     <TD>
 %     if ( $pkgpart_change and $location_change ) {
-      Package type and location change
+      <% emt('Package and location change') %>
 %     } elsif ( $pkgpart_change ) {
-      Package type change
+      <% emt('Package change') %>
 %     } elsif ( $location_change ) {
-      Location change
-%     } # or else what?
+      <% emt('Location change') %>
+%     } else { # in case the package was somehow replaced with itself
+      <% emt('Other package change') %>
+%     }
       <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 %>
+      <% emt('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>
+      <% emt('from') %> <I><% $popup_link |n %><% $cust_pkg->location_label %></A></I>
+%     }
+%     if ( !$pkgpart_change and !$location_change ) {
+%     # have to show _something_
+      <% $popup_link |n %><% emt('Details') %></A>
 %     }
     </TD>
   </TR>
@@ -52,4 +58,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>