clean up package list UI: put actions in a dropdown
[freeside.git] / httemplate / view / cust_main / packages / contact.html
index 0c81eb3..8c59615 100644 (file)
@@ -1,22 +1,19 @@
 % if ( $contact ) {
     <% $contact->line |h %>
-% if ( $show_change_link ) {
+% if ( $show_change_link && ! $opt{no_links} ) {
         <FONT SIZE=-1>
           (&nbsp;<%pkg_change_contact_link($cust_pkg)%>&nbsp;)
         </FONT>
 % }
-% if ( $show_detach_link ) {
+% if ( $show_detach_link && ! $opt{no_links} ) {
+        <FONT SIZE=-1>
           (&nbsp;<%pkg_detach_link($cust_pkg)%>&nbsp;)
         </FONT>
 %    }
-% } elsif ( $show_contact_link ) {
-    <FONT SIZE=-1>
-      (&nbsp;<%pkg_add_contact_link($cust_pkg)%>&nbsp;)
-    </FONT>
+    <BR>
 % }
 <%init>
 
-my $conf = new FS::Conf;
 my %opt = @_;
 
 my $cust_pkg       = $opt{'cust_pkg'};
@@ -29,10 +26,6 @@ my $show_detach_link =
   ! $cust_pkg->get('cancel')
   && $FS::CurrentUser::CurrentUser->access_right('Detach customer package');
 
-my $show_contact_link =
-  ! $cust_pkg->get('cancel')
-  ; #&& $FS::CurrentUser::CurrentUser->access_right('Add package contact'); #or something like that
-
 my $contact = $cust_pkg->contact_obj;
 
 sub pkg_change_contact_link {
@@ -48,19 +41,6 @@ sub pkg_change_contact_link {
   );
 }
 
-sub pkg_add_contact_link {
-  my $cust_pkg = shift;
-  #my $pkgpart = $cust_pkg->pkgpart;
-  include( '/elements/popup_link-cust_pkg.html',
-    'action'      => $p. "misc/change_pkg_contact.html",
-    'label'       => emt('Add contact'),
-    'actionlabel' => emt('Add contact'),
-    'cust_pkg'    => $cust_pkg,
-    'width'       => 616,
-    'height'      => 192,
-  );
-}
-
 sub pkg_detach_link {
   my $cust_pkg = shift;
   #my $pkgpart = $cust_pkg->pkgpart;
@@ -70,7 +50,7 @@ sub pkg_detach_link {
     'actionlabel' => emt('Detach'),
     'cust_pkg'    => $cust_pkg,
     'width'       => 616,
-    'height'      => 676,
+    'height'      => 720,
   );
 }