version 1.53, 2004/02/20 16:21:49
|
version 1.57, 2004/03/01 16:04:43
|
Line 60 use Time::HiRes;
|
Line 60 use Time::HiRes;
|
use Apache::lonlocal; |
use Apache::lonlocal; |
use strict; |
use strict; |
|
|
|
|
############################################## |
############################################## |
############################################## |
############################################## |
|
|
Line 677 sub Create_PrgWin {
|
Line 676 sub Create_PrgWin {
|
} |
} |
if (!$inputname) { |
if (!$inputname) { |
$prog_state{'inputname'}=&get_uniq_name(); |
$prog_state{'inputname'}=&get_uniq_name(); |
&r_print($r,'<input type="text" name="'.$prog_state{'inputname'}. |
&r_print($r,$heading.' <input type="text" name="'.$prog_state{'inputname'}. |
'" size="'.$width.'" />'); |
'" size="'.$width.'" />'); |
} else { |
} else { |
$prog_state{'inputname'}=$inputname; |
$prog_state{'inputname'}=$inputname; |
Line 877 returns: nothing
|
Line 876 returns: nothing
|
############################################################ |
############################################################ |
{ |
{ |
my @Crumbs; |
my @Crumbs; |
|
|
sub breadcrumbs { |
sub breadcrumbs { |
my ($color,$component,$component_help) = @_; |
my ($color,$component,$component_help,$function,$domain) = @_; |
$color = '#CCCCFF' if (! defined($color)); |
if (! defined($color)) { |
|
if (! defined($function)) { |
|
$function = &Apache::loncommon::get_users_function(); |
|
} |
|
$color = &Apache::loncommon::designparm($function.'.tabbg', |
|
$domain); |
|
} |
# |
# |
my $Str = "\n". |
my $Str = "\n". |
'<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 { |
|
$faq = $_->{'faq'} if (exists($_->{'faq'})); |
|
$bug = $_->{'bug'} if (exists($_->{'bug'})); |
'<a href="'.$_->{'href'}.'" title="'.$_->{'title'}.'">'. |
'<a href="'.$_->{'href'}.'" title="'.$_->{'title'}.'">'. |
$_->{'text'}.'</a>' |
$_->{'text'}.'</a>' |
} @Crumbs |
} @Crumbs |
); |
); |
$links .= '->' if ($links ne ''); |
$links .= '->' if ($links ne ''); |
$links .= '<b>'.$last->{'text'}.'</b>'; |
$links .= '<b>'.$last->{'text'}.'</b>'; |
if (exists($last->{'bug'})) { |
# |
$links = &Apache::loncommon::help_open_bug($last->{'bug'}).$links; |
my $icons = ''; |
|
$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); |
} |
} |
if (exists($last->{'faq'})) { |
if ($icons ne '') { |
$links = &Apache::loncommon::help_open_faq($last->{'faq'}).$links; |
$Str .= $icons.' '; |
} |
} |
|
# |
$Str .= $links.'</font></td>'; |
$Str .= $links.'</font></td>'; |
|
# |
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">'.$component.'</font>'; |
Line 938 returns: nothing
|
Line 960 returns: nothing
|
push (@Crumbs,@_); |
push (@Crumbs,@_); |
} |
} |
|
|
} |
} # End of scope for @Crumbs |
|
|
############################################################ |
############################################################ |
############################################################ |
############################################################ |