[Bio] / SubsystemEditor / SubsysEditor.cgi Repository:
ViewVC logotype

Diff of /SubsystemEditor/SubsysEditor.cgi

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

revision 1.2, Mon Jul 16 20:07:16 2007 UTC revision 1.3, Mon Nov 19 15:44:14 2007 UTC
# Line 9  Line 9 
9  use WebApplication;  use WebApplication;
10  use WebMenu;  use WebMenu;
11  use WebLayout;  use WebLayout;
 use Tracer;  
 use FigSubsystemMaster;  
12    
13  my $cgi = new CGI();  my $cgi = new CGI();
14  ETracing($cgi);  
15  eval {  my $dbmaster = DBMaster->new( -database => 'WebAppBackend' );
16      my $dbmaster = DBMaster->new('WebServerBackend');  
     Trace("Setting up layout.") if T(3);  
17      my $layout = WebLayout->new('./Html/SubsystemEditorLayout.tmpl');      my $layout = WebLayout->new('./Html/SubsystemEditorLayout.tmpl');
18      $layout->add_css('./Html/SubsystemEditor.css');      $layout->add_css('./Html/SubsystemEditor.css');
19      Trace("Creating menu.") if T(3);  $layout->add_css('./Html/default.css');
20    
21      my $menu = WebMenu->new();      my $menu = WebMenu->new();
22      $menu->add_category('Home', 'SubsysEditor.cgi?page=SubsystemList');  $menu->add_category( 'Home', 'SubsysEditor.cgi?page=SubsystemOverview' );
23      Trace("Creating application object.") if T(3);  $menu->add_category( 'Logout', 'proposeSS.cgi?page=Login&action=perform_logout', undef, [ 'login' ] );
24    
25      my $WebApp = WebApplication->new( { id       => 'SubsystemEditor',      my $WebApp = WebApplication->new( { id       => 'SubsystemEditor',
26                                          dbmaster => $dbmaster,                                          dbmaster => $dbmaster,
27                                          menu     => $menu,                                          menu     => $menu,
28                                          layout   => $layout,                                          layout   => $layout,
29                                          default  => 'SubsystemList'                                      default  => 'SubsystemOverview',
30                                        } );                                        } );
31    
32      # For now, only use the FIG subsystem object. Later we may need to  $WebApp->show_login_user_info(1);
     # parameterize this somehow. In order to switch to a different  
     # database technology, you need to replace FigSubsystemMaster and  
     # FigSubsystem.  
     Trace("Connecting to subsystem object.") if T(3);  
     $WebApp->setAppData(SubsystemObject => FigSubsystemMaster->new());  
     Trace("Starting to run web app.") if T(3);  
33      $WebApp->run();      $WebApp->run();
34  };  
 if ($@) {  
     Confess("Unhandled exception: $@");  
 }  

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3