[Bio] / Sprout / SearchHelper.pm Repository:
ViewVC logotype

Diff of /Sprout/SearchHelper.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.44, Thu Feb 5 07:17:03 2009 UTC revision 1.45, Mon Mar 2 22:31:33 2009 UTC
# Line 288  Line 288 
288          }          }
289          # Denote this is a new session.          # Denote this is a new session.
290          $type = "new";          $type = "new";
291          # Put the session IS in the parameters.          # Put the session ID in the parameters.
292          $cgi->param(-name => 'SessionID', -value => $session_id);          $cgi->param(-name => 'SessionID', -value => $session_id);
293      } else {      } else {
294          Trace("Session ID is $session_id.") if T(3);          Trace("Session ID is $session_id.") if T(3);
# Line 483  Line 483 
483      my $retVal = "<div class=\"search\">\n" .      my $retVal = "<div class=\"search\">\n" .
484                   CGI::start_form(-method => 'POST',                   CGI::start_form(-method => 'POST',
485                                    -action => "$FIG_Config::cgi_url/wiki/rest.cgi/NmpdrPlugin/search",                                    -action => "$FIG_Config::cgi_url/wiki/rest.cgi/NmpdrPlugin/search",
486                                    -name => $self->FormName()) .                                    -name => $self->FormName(),
487                                      -id => $self->FormName()) .
488                   CGI::hidden(-name => 'Class',                   CGI::hidden(-name => 'Class',
489                                -value => $self->{class}) .                                -value => $self->{class}) .
490                   CGI::hidden(-name => 'SPROUT',                   CGI::hidden(-name => 'SPROUT',
# Line 1274  Line 1275 
1275      return $retVal;      return $retVal;
1276  }  }
1277    
 =head3 PropertyMenu  
   
     my $htmlText = $shelp->PropertyMenu($menuName, $selected, $force);  
   
 Generate a property name dropdown menu.  
   
 =over 4  
   
 =item menuName  
   
 Name to give to the menu.  
   
 =item selected  
   
 Value of the property name to pre-select.  
   
 =item force (optional)  
   
 If TRUE, then the user will be forced to choose a property name. If FALSE,  
 then an additional menu choice will be provided to select nothing.  
   
 =item RETURN  
   
 Returns a dropdown menu box that allows the user to select a property name. An additional  
 selection entry will be provided for selecting no property name  
   
 =back  
   
 =cut  
   
 sub PropertyMenu {  
     # Get the parameters.  
     my ($self, $menuName, $selected, $force) = @_;  
     # Get the CGI and Sprout objects.  
     my $sprout = $self->DB();  
     my $cgi = $self->Q();  
     # Create the property name list.  
     my @propNames = ();  
     if (! $force) {  
         push @propNames, "";  
     }  
     # Get all the property names, putting them after the null choice if one exists.  
     push @propNames, $sprout->GetChoices('Property', 'property-name');  
     # Create a menu from them.  
     my $retVal = CGI::popup_menu(-name=> $menuName, -values => \@propNames,  
                                   -default => $selected);  
     # Return the result.  
     return $retVal;  
 }  
   
1278  =head3 MakeTable  =head3 MakeTable
1279    
1280      my $htmlText = $shelp->MakeTable(\@rows);      my $htmlText = $shelp->MakeTable(\@rows);
# Line 1418  Line 1369 
1369      my $realCaption = (defined $caption ? $caption : 'Go');      my $realCaption = (defined $caption ? $caption : 'Go');
1370      # Get the current page size.      # Get the current page size.
1371      my $pageSize = $cgi->param('PageSize');      my $pageSize = $cgi->param('PageSize');
1372        # Get the form name.
1373        my $formName = $self->FormName();
1374      # Get the current feature ID type.      # Get the current feature ID type.
1375      my $aliasType = $self->GetPreferredAliasType();      my $aliasType = $self->GetPreferredAliasType();
1376      # Create the rows.      # Create the rows.
# Line 1430  Line 1383 
1383                   "\n" .                   "\n" .
1384                   CGI::Tr(CGI::td("Results/Page"),                   CGI::Tr(CGI::td("Results/Page"),
1385                            CGI::td(CGI::popup_menu(-name => 'PageSize',                            CGI::td(CGI::popup_menu(-name => 'PageSize',
1386                                                      -values => [10, 25, 50, 100, 1000],                                                    -values => [50, 10, 25, 100, 1000],
1387                                                      -default => $pageSize)),                                                      -default => $pageSize)),
1388                            CGI::td(CGI::submit(-class => 'goButton',                            CGI::td(CGI::submit(-class => 'goButton',
1389                                                  -name => 'Search',                                                  -name => 'Search',

Legend:
Removed from v.1.44  
changed lines
  Added in v.1.45

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3