query billing events to see affected objects, #15142
[freeside.git] / httemplate / search / elements / search-html.html
index 32f26e8..af0c8fc 100644 (file)
 %       }
 %     }
 %
-%     if ( $type eq 'html-print' ) {
-
-        <% $opt{nohtmlheader}
-             ? ''
-             : include( '/elements/header-popup.html', $opt{'title'} )
-        %>
-
-%     } elsif ( $type eq 'select' ) {
-
-        <% $opt{nohtmlheader}
-             ? ''
-             : include( '/elements/header-popup.html', $opt{'title'} )
-        %>
-        <% defined($opt{'html_init'}) 
-              ? ( ref($opt{'html_init'})
-                    ? &{$opt{'html_init'}}()
-                    : $opt{'html_init'}
-                )
-              : ''
-        %>
-
-%     } else {
+%     unless ( $opt{nohtmlheader} ) {
 %
-%       my @menubar = ();
-%       if ( $opt{'menubar'} ) {
-%         @menubar = @{ $opt{'menubar'} };
-%       #} else {
-%       #  @menubar = ( 'Main menu' => $p );
+%       if ( $type eq 'html-print' ) {
+          <& /elements/header-popup.html, $opt{'title'} &>
+%       } else {
+%         if ( $type eq 'select' ) {
+            <&/elements/header-popup.html, $opt{'title'} &>
+%         } else {
+%
+%           my @menubar = ();
+%           if ( $opt{'menubar'} ) {
+%             @menubar = @{ $opt{'menubar'} };
+%           #} else {
+%           #  @menubar = ( 'Main menu' => $p );
+%           }
+
+            <& /elements/header.html, $opt{'title'},
+                 include( '/elements/menubar.html', @menubar )
+            &>
+
+%         }
 %       }
+%
+%     }
+%
+%     unless ( $type eq 'html-print' ) {
 
-        <% $opt{nohtmlheader}
-             ? ''
-             : include( '/elements/header.html', $opt{'title'},
-                          include( '/elements/menubar.html', @menubar )
-                      )
-        %>
+%       if ( $opt{'add_link'} ) { #or after html_init?
+          <A HREF="<%$p%>edit/<% $opt{query}->{table} %>.html"><I>Add a <% $opt{'name_singular'} %></I></A><BR><BR>
+%       }
 
         <% defined($opt{'html_init'}) 
               ? ( ref($opt{'html_init'})
@@ -78,7 +72,7 @@
 
 %     unless ( $total ) { 
 %       unless ( $opt{'disable_nonefound'} ) { 
-          No matching <% $opt{'name'} %> found.<BR>
+          <BR><BR>No matching <% $opt{'name'} %> found.<BR>
 %       } 
 %     }
 %
 %                                       ? '<A HREF="'. $e->{'link'}. '">'
 %                                       : ''
 %                                   ).
+%                                   ( $e->{'onclick'} # don't use with 'link'
+%                                       ? '<A HREF="#" onclick="' .
+%                                         $e->{'onclick'}.'">'
+%                                       : ''
+%                                   ).
 %                                   ( $e->{'size'}
 %                                      ? '<FONT SIZE="'.uc($e->{'size'}).'">'
 %                                      : ''
 %                                       : ''
 %                                   ).
 %                                   ( $e->{'size'} ? '</FONT>' : '' ).
-%                                   ( $e->{'link'} ? '</A>'    : '' ).
+%                                   ( $e->{'link'} || $e->{'onclick'} 
+%                                       ? '</A>'
+%                                       : '' ).
 %                                   '</td>';
 %
 %                                 } @$rowref ).