--- loncom/interface/lonhelpmenu.pm 2005/06/03 15:47:29 1.21
+++ loncom/interface/lonhelpmenu.pm 2006/07/20 22:44:04 1.32
@@ -32,21 +32,21 @@ use Apache::Constants qw(:common);
use Apache::loncommon();
use Apache::lonlocal;
use Apache::lonnet;
+use lib '/home/httpd/lib/perl/';
+use LONCAPA;
sub handler {
my ($r) = @_;
- &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['page','color','function','faq','bug','topic','component_help','origurl','stayonpage']);
+ &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['page','faq','bug','topic','component_help','origurl','stayonpage']);
&Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
if ($r->header_only) {
return OK;
}
- my $color = $env{'form.color'};
my $faq = $env{'form.faq'};
my $bug = $env{'form.bug'};
my $topic = $env{'form.topic'};
- my $function = $env{'form.function'};
my $component_help = $env{'form.component_help'};
my $origurl = $env{'form.origurl'};
my $stayOnPage = $env{'form.stayonpage'};
@@ -62,29 +62,19 @@ sub handler {
my $faqbaseurl = $Apache::lonnet::perlvar{'FAQHost'};
my $requestmail = $Apache::lonnet::perlvar{'lonSupportEMail'};
if ($env{'form.page'} eq 'banner') {
- &display_help_banner($r,$color,$function,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail,$stayOnPage);
+ &display_help_banner($r,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail,$stayOnPage);
} elsif ($env{'form.page'} eq 'body') {
- &display_help_mainpage($r,$color,$function,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail);
+ &display_help_mainpage($r,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail);
}
return OK;
}
sub display_help_banner {
- my ($r,$color,$function,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail,$stayOnPage) = @_;
- my $bodytag = &Apache::loncommon::bodytag('',$function,'rightmargin="0" leftmargin="0" marginwidth="0" topmargin="1" marginheight="1"',1);
- $bodytag=~s/[\n\r]/ /g;
- my $fontcolor = &Apache::loncommon::designparm($function.'.font');
- my $alinkcolor = &Apache::loncommon::designparm($function.'.alink');
- my $vlinkcolor = &Apache::loncommon::designparm($function.'.vlink');
- my $pagecolor = &Apache::loncommon::designparm($function.'.pgbg');
- my $tablecolor = &Apache::loncommon::designparm($function.'.tabbg');
+ my ($r,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail,$stayOnPage) = @_;
my $location=&Apache::loncommon::lonhttpdurl("/adm");
- if (($tablecolor eq '') || ($tablecolor eq '#FFFFFF')) {
- $tablecolor = '#EEEE99';
- }
my $scripttag = '';
if ($requestmail =~ m/^[^\@]+\@[^\@]+$/) {
- my $displayurl = &Apache::lonnet::escape($origurl);
+ my $displayurl = &escape($origurl);
$scripttag = (<<"SCRIPT_ONE");
SCRIPT_TWO
}
- my $html=&Apache::lonxml::xmlbegin();
- $r->print(<
-Help Banner
-
-$scripttag
-
-$bodytag
-END
- if ($stayOnPage) {
- $r->print('');
- } else {
- $r->print('');
- }
+
+ my %body_layout =
+ ('rightmargin' => "0",
+ 'leftmargin' => "0",
+ 'marginwidth' => "0",
+ 'topmargin' => "1",
+ 'marginheight' => "1");
+ my $start_page =
+ &Apache::loncommon::start_page('',$scripttag,
+ {'add_entries' => \%body_layout,
+ 'only_body' => 1,});
+ $r->print($start_page);
+
+ my $width = ($stayOnPage) ? '95%' : '600';
+
+ $r->print('