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

View of /RAST/rast.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (download) (annotate)
Mon Aug 18 20:29:32 2008 UTC (11 years, 3 months ago) by dsouza
Branch: MAIN
CVS Tags: rast_2008_0924, rast_rel_2008_09_30, mgrast_rel_2008_0923, mgrast_rel_2008_0924, mgrast_rel_2008_0625, rast_rel_2008_10_09, rast_release_2008_09_29, mgrast_rel_2008_0806, mgrast_rel_2008_0919, rast_rel_2008_09_29, mgrast_rel_2008_0917
Changes since 1.5: +13 -6 lines
Check if MG-RAST for correct home, etc.

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();

if ($WebConfig::RAST_TYPE eq 'metagenome') {
    $menu->add_category('Home', 'metagenomics.cgi', undef, [ 'login' ]);
} else {
    $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',
                                  } );
	
if ($WebConfig::RAST_TYPE eq 'metagenome') {
    $WebApp->page_title_prefix('MG-RAST - ');
} else {
    $WebApp->page_title_prefix('RAST Server - ');
}

$WebApp->run();

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3