[Bio] / RAST / rast.cgi Repository:
ViewVC logotype

View of /RAST/rast.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (download) (annotate)
Tue Apr 8 20:18:42 2008 UTC (11 years, 8 months ago) by paarmann
Branch: MAIN
CVS Tags: rast_rel_2008_06_18, rast_rel_2008_06_16, rast_rel_2008_07_21, rast_rel_2008_04_23, rast_rel_2008_08_07
Changes since 1.4: +14 -1 lines
switches layout based on rast_type setting

use strict;
use warnings;

use DBMaster;
use WebApplication;
use WebMenu;
use WebLayout;
use WebConfig;


# read local WebConfig because we need it here
&WebConfig::import_local_config('RAST');


# choose a layout
my $layout = WebLayout->new('./Html/RAST.tmpl');
if ($WebConfig::RAST_TYPE eq 'metagenome') {
    $layout = WebLayout->new('./Html/RAST-MG.tmpl');
}
$layout->add_css(TMPL_PATH.'/default.css');
$layout->add_css(TMPL_PATH.'/rast.css');


# add site meter
my $site_meter = $FIG_Config::site_meter;
if ($site_meter) {
    $layout->add_javascript("http://s20.sitemeter.com/js/counter.js?site=s20nmpdr");
}


# create the menu
my $menu = WebMenu->new();
$menu->add_category('Home', 'rast.cgi', undef, [ 'login' ]);
$menu->add_category('Your Jobs', 'rast.cgi?page=Jobs', undef, [ 'login' ]);
$menu->add_entry('Your Jobs', 'Jobs Overview', 'rast.cgi?page=Jobs');
$menu->add_entry('Your Jobs', 'Upload New Job', 'rast.cgi?page=Upload');
$menu->add_category('Import Control', 'rast.cgi?page=ControlCenter', undef, [ 'import' ]);


# init the WebApplication
my $WebApp = WebApplication->new( { id       => 'RAST',
                                    menu     => $menu,
                                    layout   => $layout,
                                    default  => 'Home',
                                  } );

$WebApp->page_title_prefix('RAST Server - ');
$WebApp->run();

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3