'.
'';
- # The last breadcrumb does not have a link, so handle it seperately.
+ #
+ # Make the faq and bug data cascade
+ my $faq = '';
+ my $bug = '';
+ # The last breadcrumb does not have a link, so handle it separately.
my $last = pop(@Crumbs);
- # The first one should be the course, I guess.
- if (exists($ENV{'request.course.id'})) {
- my $cid = $ENV{'request.course.id'};
- unshift(@Crumbs,{href=>'/adm/menu',
- title=>'Go to main menu',
- text=>$ENV{'course.'.$cid.'.description'},
- });
+ #
+ # The first one should be the course or a menu link
+ if (!defined($menulink)) { $menulink=1; }
+ if ($menulink) {
+ my $description = 'Menu';
+ if (exists($ENV{'request.course.id'}) &&
+ $ENV{'request.course.id'} ne '') {
+ $description =
+ $ENV{'course.'.$ENV{'request.course.id'}.'.description'};
+ }
+ unshift(@Crumbs,{
+ href =>'/adm/menu',
+ title =>'Go to main menu',
+ target =>'_top',
+ text =>$description,
+ });
}
my $links .=
join('->',
map {
- ''.
- $_->{'text'}.''
+ $faq = $_->{'faq'} if (exists($_->{'faq'}));
+ $bug = $_->{'bug'} if (exists($_->{'bug'}));
+ my $result = '{'target'}) && $_->{'target'} ne '') {
+ $result .= 'target="'.$_->{'target'}.'" ';
+ }
+ $result .='title="'.&mt($_->{'title'}).'">'.
+ &mt($_->{'text'}).'';
+ $result;
} @Crumbs
);
$links .= '->' if ($links ne '');
- $links .= ''.$last->{'text'}.'';
+ $links .= ''.&mt($last->{'text'}).'';
#
my $icons = '';
- if (exists($last->{'faq'})) {
- $icons .= &Apache::loncommon::help_open_faq($last->{'faq'});
- }
- if (exists($last->{'bug'})) {
- $icons .= &Apache::loncommon::help_open_bug($last->{'bug'});
- }
+ $faq = $last->{'faq'} if (exists($last->{'faq'}));
+ $bug = $last->{'bug'} if (exists($last->{'bug'}));
+# if ($faq ne '') {
+# $icons .= &Apache::loncommon::help_open_faq($faq);
+# }
+# if ($bug ne '') {
+# $icons .= &Apache::loncommon::help_open_bug($bug);
+# }
+ $icons .= &Apache::loncommon::help_open_menu($color,$component,$component_help,$function,$faq,$bug);
if ($icons ne '') {
$Str .= $icons.' ';
}
@@ -926,12 +1104,7 @@ returns: nothing
#
if (defined($component)) {
$Str .= ' | '.
- ''.$component.'';
- if (defined($component_help)) {
- $Str .=
- &Apache::loncommon::help_open_topic($component_help);
- }
- $Str.= ' | ';
+ ''.&mt($component).'';
}
$Str .= '