[Bio] / SeedViewer / seedviewer.cgi Repository:
ViewVC logotype

Diff of /SeedViewer/seedviewer.cgi

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

revision 1.6, Thu Nov 29 16:31:17 2007 UTC revision 1.12, Tue Feb 5 04:44:46 2008 UTC
# Line 1  Line 1 
1  use strict;  use strict;
2  use warnings;  use warnings;
3    no warnings 'once';
4    
5  use DBMaster;  use DBMaster;
6  use WebApplication;  use WebApplication;
# Line 33  Line 34 
34      my $cgi = new CGI();      my $cgi = new CGI();
35      ETracing($cgi);      ETracing($cgi);
36    
     # initialize db-master  
     #my $dbmaster = DBMaster->new(-database => 'WebAppBackend');  
   
37      # initialize layout      # initialize layout
38      # Use the template file for the current mode-- NMPDR or SEED      # Use the template file for the current mode-- NMPDR or SEED
39      my $templateFile = (FIGRules::nmpdr_mode($cgi) ? './Html/NmpdrViewer.tmpl'      my $templateFile = (FIGRules::nmpdr_mode($cgi) ? './Html/NmpdrViewer.tmpl' : './Html/SeedViewer.tmpl');
                                                    : './Html/SeedViewer.tmpl');  
40      Trace("Template file is $templateFile") if T(3);      Trace("Template file is $templateFile") if T(3);
41      my $layout = WebLayout->new($templateFile);      my $layout = WebLayout->new($templateFile);
42      # Start with the normal style.      # Start with the normal style.
# Line 57  Line 54 
54      # Add the common styles.      # Add the common styles.
55      $layout->add_css('./Html/commonviewer.css');      $layout->add_css('./Html/commonviewer.css');
56    
57        # add site meter
58        my $site_meter = $FIG_Config::site_meter;
59        if ($site_meter) {
60            $layout->add_javascript("http://s20.sitemeter.com/js/counter.js?site=s20nmpdr");
61        }
62    
63      # build menu      # build menu
64      my $menu;      my $menu;
     # For now, NMPDR does not use the menu.  
65      $menu = WebMenu->new();      $menu = WebMenu->new();
66      $menu->add_category('»Navigate', '?page=Home');      $menu->add_category('»Navigate', '?page=Home');
67      $menu->add_entry('»Navigate', 'Startpage', '?page=Home');      $menu->add_entry('»Navigate', 'Startpage', '?page=Home');
68      $menu->add_entry('»Navigate', 'Organisms', '?page=OrganismSelect');      $menu->add_entry('»Navigate', 'Organisms', '?page=OrganismSelect');
69      $menu->add_entry('»Navigate', 'Subsystems', '?page=SubsystemSelect');      $menu->add_entry('»Navigate', 'Subsystems', '?page=SubsystemSelect');
70      $menu->add_entry('&raquo;Navigate', 'Blast', '?page=BlastRun');      $menu->add_entry('&raquo;Navigate', '<a>Jump to Feature by</a>');
71      $menu->add_entry('&raquo;Navigate', "<form style='margin: 0px 0px 0px 6px;'>ID&nbsp;&nbsp;<input type='text' name='pattern' style='border: 1px solid #5da668; width: 120px; height: 17px; margin-top: 2px; font-size: 11px;'><input type='hidden' name='page' value='SearchResult'><input type='hidden' name='action' value='check_search'><input type='submit' style='display:none;'></form>");      $menu->add_entry('&raquo;Navigate', '&nbsp;&nbsp;BLAST Search', '?page=BlastRun');
72        $menu->add_entry('&raquo;Navigate', "<form style='margin: 0px 0px 0px 6px;'>&nbsp;&nbsp;ID&nbsp;&nbsp;<input type='text' name='pattern' style='border: 1px solid #5da668; width: 100px; height: 17px; margin-top: 2px; font-size: 11px;'><input type='hidden' name='page' value='SearchResult'><input type='hidden' name='action' value='check_search'><input type='submit' style='display:none;'></form>");
73    
74      if (defined($FIG_Config::teacher_db)) {      if (defined($FIG_Config::teacher_db)) {
75          $menu->add_category('&raquo;Teacher', '?page=Teach', undef, ['edit', 'problem_list'], 96);          $menu->add_category('&raquo;Teacher', '?page=Teach', undef, ['edit', 'problem_list'], 96);
76          $menu->add_entry('&raquo;Teacher', 'Class Performance', '?page=Teach');          $menu->add_entry('&raquo;Teacher', 'Class Performance', '?page=Teach');
77          $menu->add_entry('&raquo;Teacher', 'Class Management', '?page=ManageClass');          $menu->add_entry('&raquo;Teacher', 'Class Management', '?page=ManageClass');
78          $menu->add_entry('&raquo;Teacher', 'Problem Sets', '?page=ManageProblemSets');          $menu->add_entry('&raquo;Teacher', 'Problem Sets', '?page=ManageProblemSets');
79            $menu->add_entry('&raquo;Teacher', 'Annotation Resolve', '?page=ClassAnnotationResolve');
80      }      }
81      $menu->add_category('&raquo;Admin', '?page=Admin', undef, ['edit', 'scope', '*'], 99);      #$menu->add_category('&raquo;Admin', '?page=Admin', undef, ['edit', 'scope', '*'], 99);
82      if (FIGRules::nmpdr_mode($cgi)) {      if (FIGRules::nmpdr_mode($cgi)) {
83          $menu->add_category('&raquo;Help', "$FIG_Config::nmpdr_site_url/content/help.php", 'help', undef, 98);          $menu->add_category('&raquo;Help', "$FIG_Config::nmpdr_site_url/content/help.php", 'help', undef, 98);
84          $menu->add_entry('&raquo;Help', 'Searching NMPDR', "$FIG_Config::nmpdr_site_url/content/find.php");          $menu->add_entry('&raquo;Help', 'Searching NMPDR', "$FIG_Config::nmpdr_site_url/content/find.php");
# Line 87  Line 91 
91          $menu->add_entry('&raquo;Help', 'Submitting Data to SEED', 'http://www.theseed.org/wiki/RAST_Tutorial');          $menu->add_entry('&raquo;Help', 'Submitting Data to SEED', 'http://www.theseed.org/wiki/RAST_Tutorial');
92          $menu->add_entry('&raquo;Help', 'Contact', 'http://www.theseed.org/wiki/Contact');          $menu->add_entry('&raquo;Help', 'Contact', 'http://www.theseed.org/wiki/Contact');
93          $menu->add_entry('&raquo;Help', 'Register', '?page=Register');          $menu->add_entry('&raquo;Help', 'Register', '?page=Register');
94            $menu->add_entry('&raquo;Help', 'I forgot my Password', '?page=RequestNewPassword');
95      }      }
96      # initialize application      # initialize application
97      my $WebApp = WebApplication->new( { id => 'SeedViewer',      my $WebApp = WebApplication->new( { id => 'SeedViewer',
                                         #dbmaster => $dbmaster,  
98                                          menu     => $menu,                                          menu     => $menu,
99                                          layout   => $layout,                                          layout   => $layout,
100                                          default  => 'Home',                                          default  => 'Home',
101                                        } );                                        } );
102        $WebApp->page_title_prefix('SEED Viewer - ');
103      $WebApp->show_login_user_info(1);      $WebApp->show_login_user_info(1);
104    
105      # run application      # run application

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.12

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3