version 1.306, 2006/03/15 19:37:55
|
version 1.313, 2006/03/19 21:43:20
|
Line 2737 Inputs:
|
Line 2737 Inputs:
|
=item * $forcereg, if page should register as content page (relevant for |
=item * $forcereg, if page should register as content page (relevant for |
text interface only) |
text interface only) |
|
|
|
=item * $customtitle, overrides the $title in some way ???? |
|
|
|
=item * $notopbar, if true, keep the 'what is this' info but remove the |
|
navigational links |
=back |
=back |
|
|
Returns: A uniform header for LON-CAPA web pages. |
Returns: A uniform header for LON-CAPA web pages. |
Line 2747 other decorations will be returned.
|
Line 2751 other decorations will be returned.
|
=cut |
=cut |
|
|
sub bodytag { |
sub bodytag { |
my ($title,$function,$addentries,$bodyonly,$domain,$forcereg,$customtitle,$notopbar)=@_; |
my ($title,$function,$addentries,$bodyonly,$domain,$forcereg,$customtitle, |
|
$notopbar)=@_; |
$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 2959 sub endbodytag {
|
Line 2964 sub endbodytag {
|
|
|
Returns a uniform footer for LON-CAPA web pages. |
Returns a uniform footer for LON-CAPA web pages. |
|
|
Inputs: $title - optinal title for the head |
Inputs: $title - optional title for the head |
|
$head_extra - optional extra HTML to put inside the <head> |
|
|
=back |
=back |
|
|
=cut |
=cut |
|
|
sub headtag { |
sub headtag { |
my ($title) = @_; |
my ($title,$head_extra,$args) = @_; |
|
|
my $result = '<head>'; |
my $result = |
|
'<head>'. |
|
&Apache::lonxml::fontsettings(). |
|
&Apache::lonhtmlcommon::htmlareaheaders(); |
|
|
|
if (ref($args->{'redir'})) { |
|
my ($time,$url) = @{$args->{'redir'}}; |
|
$result.=<<ADDMETA |
|
<meta http-equiv="pragma" content="no-cache" /> |
|
<meta HTTP-EQUIV="Refresh" CONTENT="2; url=$url" /> |
|
ADDMETA |
|
} |
if (!defined($title)) { |
if (!defined($title)) { |
$title = 'The LearningOnline Network with CAPA'; |
$title = 'The LearningOnline Network with CAPA'; |
} |
} |
|
|
$result .= '<title>'.&mt($title).'</title>'; |
$result .= '<title>'.&mt($title).'</title>'.$head_extra; |
|
|
return $result; |
return $result; |
} |
} |
Line 3006 sub endheadtag {
|
Line 3022 sub endheadtag {
|
Returns a uniform complete <head>..</head> section for LON-CAPA web pages. |
Returns a uniform complete <head>..</head> section for LON-CAPA web pages. |
|
|
Inputs: $title - optional title for the page |
Inputs: $title - optional title for the page |
|
$head_extra - optional extra HTML to put inside the <head> |
=back |
=back |
|
|
=cut |
=cut |
|
|
sub head { |
sub head { |
my ($title) = @_; |
my ($title,$head_extra) = @_; |
return &headtag($title).&endheadtag(); |
return &headtag($title,$head_extra).&endheadtag(); |
} |
} |
|
|
=pod |
=pod |
Line 3026 Returns a complete <html> .. <body> sect
|
Line 3042 Returns a complete <html> .. <body> sect
|
|
|
Inputs: $title - optional title for the page |
Inputs: $title - optional title for the page |
$head_extra - optional extra HTML to incude inside the <head> |
$head_extra - optional extra HTML to incude inside the <head> |
|
%args - additional optional args supported are: |
|
only_body -> is true will set &bodytag() onlybodytag arg on |
|
no_nav_bar -> is true will set &bodytag() notopbar arg on |
|
add_entries -> additional attributes to add to the <body> |
|
domain -> force to color decorate a page for a |
|
specific domain |
|
function -> force usage of a specific rolish color scheme |
|
redirect -> ... |
|
|
=back |
=back |
|
|
=cut |
=cut |
|
|
sub start_page { |
sub start_page { |
my ($title,$head_extra) = @_; |
my ($title,$head_extra,$args) = @_; |
|
my %head_args; |
|
if (defined($args->{'redirect'})) { |
|
$head_args{'redirect'} = $args->{'redirect'}; |
|
} |
|
|
return |
return |
&Apache::lonxml::xmlbegin(). |
&Apache::lonxml::xmlbegin(). |
&headtag($title).$head_extra.&endheadtag(). |
&headtag($title,$head_extra,\%head_args).&endheadtag(). |
&bodytag($title); |
&bodytag($title, $args->{'function'}, $args->{'add_entries'}, |
|
$args->{'only_body'}, |
|
undef,undef,undef,$args->{'no_nav_bar'}); |
} |
} |
|
|
=pod |
=pod |