[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.23, Wed Sep 3 20:42:27 2008 UTC revision 1.24, Thu Sep 4 18:58:15 2008 UTC
# Line 33  Line 33 
33    
34      # initialize cgi      # initialize cgi
35      my $cgi = new CGI();      my $cgi = new CGI();
36      if ($FIG_Config::linkinSV) {      # Initialize tracing.
37        ETracing($cgi);
38        if (FIGRules::nmpdr_mode($cgi)) {
39            Trace("NMPDR mode selected.") if T(3);
40          my $parms = $cgi->query_string();          my $parms = $cgi->query_string();
41          if ($parms) {          if ($parms) {
42              $parms = "?$parms";              $parms = "?$parms";
# Line 42  Line 45 
45          }          }
46          print CGI::redirect(-uri => "$FIG_Config::cgi_url/wiki/rest.cgi/NmpdrPlugin/SeedViewer$parms",          print CGI::redirect(-uri => "$FIG_Config::cgi_url/wiki/rest.cgi/NmpdrPlugin/SeedViewer$parms",
47                              -status => 301);                              -status => 301);
48          return;      } else {
     }  
   
49      # initialize layout      # initialize layout
50      # Use the template file for the current mode-- NMPDR or SEED      # Use the template file for the current mode-- NMPDR or SEED
51      my $templateFile = (FIGRules::nmpdr_mode($cgi) ? "$FIG_Config::cgi_url/Html/NmpdrViewer.tmpl" : "$FIG_Config::cgi_url/Html/SeedViewer.tmpl");          my $templateFile = "./Html/SeedViewer.tmpl";
52      Trace("Template file is $templateFile") if T(3);      Trace("Template file is $templateFile") if T(3);
53      my $layout = WebLayout->new($templateFile);      my $layout = WebLayout->new($templateFile);
54      # Choose the body/header style sheet according to the mode.      # Choose the body/header style sheet according to the mode.
     if (FIGRules::nmpdr_mode($cgi)) {  
         # NMPDR mode.  
         $layout->add_css("$FIG_Config::cgi_url/Html/nmpdrviewer.css");  
         $layout->add_css("$FIG_Config::cgi_url/Html/commonviewer.css");  
         # Display the official NMPDR icon for this machine.  
         $layout->add_metatag("<link rel=\"icon\" href=\"${FIG_Config::cgi_base}wiki/pub/logos/nmpdr.ico\" type=\"image/x-icon\" />");  
         $layout->add_metatag("<link rel=\"shortcut icon\" href=\"${FIG_Config::cgi_base}wiki/pub/logos/nmpdr.ico\" type=\"image/x-icon\" />");  
     } else {  
         # SEED mode.  
55          $layout->add_css("$FIG_Config::cgi_url/Html/seedviewer.css");          $layout->add_css("$FIG_Config::cgi_url/Html/seedviewer.css");
56          $layout->add_css("$FIG_Config::cgi_url/Html/commonviewer.css");          $layout->add_css("$FIG_Config::cgi_url/Html/commonviewer.css");
57          $layout->add_css("$FIG_Config::cgi_url/Html/default.css");          $layout->add_css("$FIG_Config::cgi_url/Html/default.css");
    }  
58      # build menu      # build menu
59      my $menu;      my $menu;
60      $menu = WebMenu->new();      $menu = WebMenu->new();
     if (FIGRules::nmpdr_mode($cgi)) {  
         $menu->add_category('&raquo;Navigate', '?page=Home');  
         $menu->add_entry('&raquo;Navigate', 'NMPDR home', "$FIG_Config::nmpdr_site_url/index.php");  
         $menu->add_entry('&raquo;Navigate', 'Organisms', "$FIG_Config::nmpdr_site_url/content/organisms.php");  
         $menu->add_entry('&raquo;Navigate', 'Subsystems', "$FIG_Config::nmpdr_site_url/content/subsystems.php");  
         $menu->add_entry('&raquo;Navigate', 'FigFams', '?page=FigFamViewer');  
     } else {  
61          $menu->add_category('&raquo;Navigate', '?page=Home');          $menu->add_category('&raquo;Navigate', '?page=Home');
62          $menu->add_entry('&raquo;Navigate', 'Startpage', '?page=Home');          $menu->add_entry('&raquo;Navigate', 'Startpage', '?page=Home');
63          $menu->add_entry('&raquo;Navigate', 'Organisms', '?page=OrganismSelect');          $menu->add_entry('&raquo;Navigate', 'Organisms', '?page=OrganismSelect');
64          $menu->add_entry('&raquo;Navigate', 'Subsystems', '?page=SubsystemSelect');          $menu->add_entry('&raquo;Navigate', 'Subsystems', '?page=SubsystemSelect');
65          $menu->add_entry('&raquo;Navigate', 'FigFams', '?page=FigFamViewer');          $menu->add_entry('&raquo;Navigate', 'FigFams', '?page=FigFamViewer');
66          $menu->add_entry('&raquo;Navigate', 'BLAST Search', '?page=BlastRun');          $menu->add_entry('&raquo;Navigate', 'BLAST Search', '?page=BlastRun');
     }  
67      if (defined($FIG_Config::teacher_db)) {      if (defined($FIG_Config::teacher_db)) {
68          $menu->add_category('&raquo;Teacher', '?page=Teach', undef, ['edit', 'problem_list'], 96);          $menu->add_category('&raquo;Teacher', '?page=Teach', undef, ['edit', 'problem_list'], 96);
69          $menu->add_entry('&raquo;Teacher', 'Class Performance', '?page=Teach');          $menu->add_entry('&raquo;Teacher', 'Class Performance', '?page=Teach');
# Line 88  Line 71 
71          $menu->add_entry('&raquo;Teacher', 'Problem Sets', '?page=ManageProblemSets');          $menu->add_entry('&raquo;Teacher', 'Problem Sets', '?page=ManageProblemSets');
72          $menu->add_entry('&raquo;Teacher', 'Annotation Resolve', '?page=ClassAnnotationResolve');          $menu->add_entry('&raquo;Teacher', 'Annotation Resolve', '?page=ClassAnnotationResolve');
73      }      }
     if (FIGRules::nmpdr_mode($cgi)) {  
         $menu->add_category('Help', "$FIG_Config::nmpdr_site_url/content/help.php", 'help', undef, 98);  
         $menu->add_entry('Help', 'Searching NMPDR', "$FIG_Config::nmpdr_site_url/content/find.php");  
         $menu->add_entry('Help', 'Contact', "$FIG_Config::nmpdr_site_url/content/contactus.php");  
     } else {  
74          $menu->add_category('&raquo;Help', 'http://www.theseed.org', 'help', undef, 98);          $menu->add_category('&raquo;Help', 'http://www.theseed.org', 'help', undef, 98);
75          $menu->add_entry('&raquo;Help', 'What is the SEED', 'http://www.theseed.org/wiki/Home_of_the_SEED');          $menu->add_entry('&raquo;Help', 'What is the SEED', 'http://www.theseed.org/wiki/Home_of_the_SEED');
76          $menu->add_entry('&raquo;Help', 'HowTo use the SEED Viewer', 'http://www.theseed.org/wiki/SEED_Viewer_Tutorial');          $menu->add_entry('&raquo;Help', 'HowTo use the SEED Viewer', 'http://www.theseed.org/wiki/SEED_Viewer_Tutorial');
# Line 100  Line 78 
78          $menu->add_entry('&raquo;Help', 'Contact', 'http://www.theseed.org/wiki/Contact');          $menu->add_entry('&raquo;Help', 'Contact', 'http://www.theseed.org/wiki/Contact');
79          $menu->add_entry('&raquo;Help', 'Register', '?page=Register');          $menu->add_entry('&raquo;Help', 'Register', '?page=Register');
80          $menu->add_entry('&raquo;Help', 'I forgot my Password', '?page=RequestNewPassword');          $menu->add_entry('&raquo;Help', 'I forgot my Password', '?page=RequestNewPassword');
     }  
81      # initialize application      # initialize application
82      my $WebApp = WebApplication->new( { id => 'SeedViewer',      my $WebApp = WebApplication->new( { id => 'SeedViewer',
83                                          menu     => $menu,                                          menu     => $menu,
84                                          layout   => $layout,                                          layout   => $layout,
85                                          default  => 'Home',                                          default  => 'Home',
86                                        } );                                        } );
87      my $prefix = (FIGRules::nmpdr_mode($cgi) ? "NMPDR " : "") . "Seed Viewer - ";          my $prefix = "Seed Viewer - ";
88      $WebApp->page_title_prefix($prefix);      $WebApp->page_title_prefix($prefix);
89      $WebApp->show_login_user_info(1);      $WebApp->show_login_user_info(1);
   
90      # run application      # run application
91      $WebApp->run();      $WebApp->run();
92        }
93  }  }

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3