version 1.337, 2006/04/14 20:16:02
|
version 1.338, 2006/04/14 21:09:51
|
Line 2753 Inputs:
|
Line 2753 Inputs:
|
=item * $notopbar, if true, keep the 'what is this' info but remove the |
=item * $notopbar, if true, keep the 'what is this' info but remove the |
navigational links |
navigational links |
|
|
=item * $bgcolor, used to override the bg coor on a webpage to a specific value |
=item * $bgcolor, used to override the bgcolor on a webpage to a specific value |
|
|
|
=item * $notitle, if true keep the nav controls, but remove the title bar |
|
|
|
|
=back |
=back |
|
|
Line 2766 other decorations will be returned.
|
Line 2769 other decorations will be returned.
|
|
|
sub bodytag { |
sub bodytag { |
my ($title,$function,$addentries,$bodyonly,$domain,$forcereg,$customtitle, |
my ($title,$function,$addentries,$bodyonly,$domain,$forcereg,$customtitle, |
$notopbar,$bgcolor,$hidetitle)=@_; |
$notopbar,$bgcolor,$notitle)=@_; |
$title=&mt($title); |
$title=&mt($title); |
$function = &get_users_function() if (!$function); |
$function = &get_users_function() if (!$function); |
my $img=&designparm($function.'.img',$domain); |
my $img=&designparm($function.'.img',$domain); |
Line 2826 END
|
Line 2829 END
|
# Accessibility |
# Accessibility |
|
|
$bodytag.=&Apache::lonmenu::menubuttons($forcereg,$forcereg); |
$bodytag.=&Apache::lonmenu::menubuttons($forcereg,$forcereg); |
if (!$hidetitle) { |
if (!$notitle) { |
$bodytag.='<h1>LON-CAPA: '.$title.'</h1>'; |
$bodytag.='<h1>LON-CAPA: '.$title.'</h1>'; |
} |
} |
return $bodytag; |
return $bodytag; |
Line 2879 ENDROLE
|
Line 2882 ENDROLE
|
$forcereg=1; |
$forcereg=1; |
} |
} |
my $titletable; |
my $titletable; |
if (!$hidetitle) { |
if (!$notitle) { |
$titletable = |
$titletable = |
'<table bgcolor="'.$pgbg.'" width="100%" border="0" '. |
'<table bgcolor="'.$pgbg.'" width="100%" border="0" '. |
'cellspacing="3" cellpadding="3">'. |
'cellspacing="3" cellpadding="3">'. |
Line 2924 ENDROLE
|
Line 2927 ENDROLE
|
# Explicit link to get inline menu |
# Explicit link to get inline menu |
my $menu='<br /><font size="2" face="Arial, Helvetica, sans-serif"> <a href="/adm/remote?action=collapse">'.&mt('Switch to Inline Menu Mode').'</a></font>'; |
my $menu='<br /><font size="2" face="Arial, Helvetica, sans-serif"> <a href="/adm/remote?action=collapse">'.&mt('Switch to Inline Menu Mode').'</a></font>'; |
# |
# |
if ($hidetitle) { |
if ($notitle) { |
return $bodytag; |
return $bodytag; |
} |
} |
return(<<ENDBODY); |
return(<<ENDBODY); |
Line 3131 Inputs: $title - optional title for the
|
Line 3134 Inputs: $title - optional title for the
|
is not auto translated like the $title is |
is not auto translated like the $title is |
frameset -> if true will start with a <frameset> |
frameset -> if true will start with a <frameset> |
rather than <body> |
rather than <body> |
|
no_title -> if true the title bar won't be shown |
|
skip_phases -> hash ref of |
|
head -> skip the <html><head> generation |
|
body -> skip all <body> generation |
|
|
=back |
=back |
|
|
Line 3147 sub start_page {
|
Line 3154 sub start_page {
|
} |
} |
|
|
$env{'internal.start_page'}++; |
$env{'internal.start_page'}++; |
my $result = |
my $result; |
&Apache::lonxml::xmlbegin(). |
if (! exists($args->{'skip_phases'}{'head'}) ) { |
&headtag($title,$head_extra,\%head_args).&endheadtag(); |
$result.= |
if ($args->{'frameset'}) { |
&Apache::lonxml::xmlbegin(). |
my $attr_string = &make_attr_string($args->{'force_register'}, |
&headtag($title,$head_extra,\%head_args).&endheadtag(); |
$args->{'add_entries'}); |
|
$result .= "\n<frameset $attr_string>\n"; |
|
} else { |
|
$result .= |
|
&bodytag($title, |
|
$args->{'function'}, $args->{'add_entries'}, |
|
$args->{'only_body'}, $args->{'domain'}, |
|
$args->{'force_register'}, $args->{'body_title'}, |
|
$args->{'no_nav_bar'}, $args->{'bgcolor'}); |
|
} |
} |
|
|
|
if (! exists($args->{'skip_phases'}{'body'}) ) { |
|
if ($args->{'frameset'}) { |
|
my $attr_string = &make_attr_string($args->{'force_register'}, |
|
$args->{'add_entries'}); |
|
$result .= "\n<frameset $attr_string>\n"; |
|
} else { |
|
$result .= |
|
&bodytag($title, |
|
$args->{'function'}, $args->{'add_entries'}, |
|
$args->{'only_body'}, $args->{'domain'}, |
|
$args->{'force_register'}, $args->{'body_title'}, |
|
$args->{'no_nav_bar'}, $args->{'bgcolor'}, |
|
$args->{'no_title'}); |
|
} |
|
} |
|
|
if ($args->{'js_ready'}) { |
if ($args->{'js_ready'}) { |
$result = &js_ready($result); |
$result = &js_ready($result); |
} |
} |