version 1.56, 2004/02/24 23:19:15
|
version 1.58, 2004/03/01 16:19:45
|
Line 876 returns: nothing
|
Line 876 returns: nothing
|
############################################################ |
############################################################ |
{ |
{ |
my @Crumbs; |
my @Crumbs; |
|
|
sub breadcrumbs { |
sub breadcrumbs { |
my ($color,$component,$component_help,$function,$domain) = @_; |
my ($color,$component,$component_help,$function,$domain) = @_; |
if (! defined($color)) { |
if (! defined($color)) { |
Line 891 returns: nothing
|
Line 891 returns: nothing
|
'<table width="100%" border="0" cellpadding="0" cellspacing="0">'. |
'<table width="100%" border="0" cellpadding="0" cellspacing="0">'. |
'<tr><td bgcolor="'.$color.'">'. |
'<tr><td bgcolor="'.$color.'">'. |
'<font size="-1">'; |
'<font size="-1">'; |
|
# |
|
# Make the faq and bug data cascade |
|
my $faq = ''; |
|
my $bug = ''; |
# The last breadcrumb does not have a link, so handle it seperately. |
# The last breadcrumb does not have a link, so handle it seperately. |
my $last = pop(@Crumbs); |
my $last = pop(@Crumbs); |
|
# |
# The first one should be the course, I guess. |
# The first one should be the course, I guess. |
if (exists($ENV{'request.course.id'})) { |
if (exists($ENV{'request.course.id'})) { |
my $cid = $ENV{'request.course.id'}; |
my $cid = $ENV{'request.course.id'}; |
unshift(@Crumbs,{href=>'/adm/menu', |
unshift(@Crumbs,{ |
|
href=>'/adm/menu', |
title=>'Go to main menu', |
title=>'Go to main menu', |
text=>$ENV{'course.'.$cid.'.description'}, |
text=>$ENV{'course.'.$cid.'.description'}, |
}); |
}); |
} |
} |
my $links .= |
my $links .= |
join('->', |
join('->', |
map { |
map { |
'<a href="'.$_->{'href'}.'" title="'.$_->{'title'}.'">'. |
$faq = $_->{'faq'} if (exists($_->{'faq'})); |
$_->{'text'}.'</a>' |
$bug = $_->{'bug'} if (exists($_->{'bug'})); |
|
'<a href="'.$_->{'href'}.'" title="'.&mt($_->{'title'}).'">'. |
|
&mt($_->{'text'}).'</a>' |
} @Crumbs |
} @Crumbs |
); |
); |
$links .= '->' if ($links ne ''); |
$links .= '->' if ($links ne ''); |
$links .= '<b>'.$last->{'text'}.'</b>'; |
$links .= '<b>'.$last->{'text'}.'</b>'; |
# |
# |
my $icons = ''; |
my $icons = ''; |
if (exists($last->{'faq'})) { |
$faq = $last->{'faq'} if (exists($last->{'faq'})); |
$icons .= &Apache::loncommon::help_open_faq($last->{'faq'}); |
$bug = $last->{'bug'} if (exists($last->{'bug'})); |
|
if ($faq ne '') { |
|
$icons .= &Apache::loncommon::help_open_faq($faq); |
} |
} |
if (exists($last->{'bug'})) { |
if ($bug ne '') { |
$icons .= &Apache::loncommon::help_open_bug($last->{'bug'}); |
$icons .= &Apache::loncommon::help_open_bug($bug); |
} |
} |
if ($icons ne '') { |
if ($icons ne '') { |
$Str .= $icons.' '; |
$Str .= $icons.' '; |
Line 926 returns: nothing
|
Line 936 returns: nothing
|
# |
# |
if (defined($component)) { |
if (defined($component)) { |
$Str .= '<td align="right" bgcolor="'.$color.'">'. |
$Str .= '<td align="right" bgcolor="'.$color.'">'. |
'<font size="+1">'.$component.'</font>'; |
'<font size="+1">'.&mt($component).'</font>'; |
if (defined($component_help)) { |
if (defined($component_help)) { |
$Str .= |
$Str .= |
&Apache::loncommon::help_open_topic($component_help); |
&Apache::loncommon::help_open_topic($component_help); |
Line 950 returns: nothing
|
Line 960 returns: nothing
|
push (@Crumbs,@_); |
push (@Crumbs,@_); |
} |
} |
|
|
} |
} # End of scope for @Crumbs |
|
|
############################################################ |
############################################################ |
############################################################ |
############################################################ |