version 1.204, 2009/03/31 21:09:36
|
version 1.209, 2009/04/25 20:22:07
|
Line 62 use Apache::lonlocal;
|
Line 62 use Apache::lonlocal;
|
use Apache::lonnet; |
use Apache::lonnet; |
use LONCAPA; |
use LONCAPA; |
|
|
|
############################################## |
|
############################################## |
|
|
|
=pod |
|
|
|
=item confirm_success |
|
|
|
Successful completion of an operation message |
|
|
|
=cut |
|
|
|
sub confirm_success { |
|
my ($message,$failure)=@_; |
|
if ($failure) { |
|
return '<span class="LC_error">'. |
|
$message. |
|
' <img src="/adm/lonIcons/navmap.wrong.gif" /></span>'; |
|
} else { |
|
return '<span class="LC_success">'. |
|
$message. |
|
' <img src="/adm/lonIcons/navmap.correct.gif" /></span>'; |
|
} |
|
} |
|
|
############################################## |
############################################## |
############################################## |
############################################## |
Line 285 sub checkbox {
|
Line 308 sub checkbox {
|
$Str .= 'value="'.$value.'"'; |
$Str .= 'value="'.$value.'"'; |
} |
} |
if ($checked) { |
if ($checked) { |
$Str .= ' checked="1"'; |
$Str .= ' checked="checked"'; |
} |
} |
$Str .= ' />'; |
$Str .= ' />'; |
return $Str; |
return $Str; |
Line 307 sub radio {
|
Line 330 sub radio {
|
$Str .= 'value="'.$value.'"'; |
$Str .= 'value="'.$value.'"'; |
} |
} |
if ($checked eq $value) { |
if ($checked eq $value) { |
$Str .= ' checked="1"'; |
$Str .= ' checked="checked"'; |
} |
} |
$Str .= ' />'; |
$Str .= ' />'; |
return $Str; |
return $Str; |
Line 1305 returns: nothing
|
Line 1328 returns: nothing
|
my @Crumbs; |
my @Crumbs; |
|
|
sub breadcrumbs { |
sub breadcrumbs { |
my ($component,$component_help,$menulink,$helplink,$css_class,$no_mt) = @_; |
my ($component,$component_help,$menulink,$helplink,$css_class,$no_mt, $no_realBreadcrumb) = @_; |
# |
# |
$css_class ||= 'LC_breadcrumbs'; |
$css_class ||= 'LC_breadcrumbs'; |
my $Str1 = '<ol id="LC_MenuBreadcrumbs">'; |
my $Str1 = '<ol id="LC_MenuBreadcrumbs">'; |
|
|
|
if($no_realBreadcrumb){ |
|
$Str1 = '<ul class="LC_CourseBreadcrumbs">'; |
|
} |
|
|
my $Str = ''; |
my $Str = ''; |
# |
# |
# Make the faq and bug data cascade |
# Make the faq and bug data cascade |
Line 1339 returns: nothing
|
Line 1367 returns: nothing
|
no_mt =>$no_mt_descr, |
no_mt =>$no_mt_descr, |
}); |
}); |
} |
} |
my $links .= '<li>'. |
my $links .= '<li>'. |
join('</li><li>'.$crumbsymbol, |
join('</li><li>'.$crumbsymbol, |
map { |
map { |
$faq = $_->{'faq'} if (exists($_->{'faq'})); |
$faq = $_->{'faq'} if (exists($_->{'faq'})); |
Line 1349 returns: nothing
|
Line 1377 returns: nothing
|
if (defined($_->{'target'}) && $_->{'target'} ne '') { |
if (defined($_->{'target'}) && $_->{'target'} ne '') { |
$result .= 'target="'.$_->{'target'}.'" '; |
$result .= 'target="'.$_->{'target'}.'" '; |
} |
} |
|
# set the possible translation for title |
if ($_->{'no_mt'}) { |
if ($_->{'no_mt'}) { |
$result .='title="'.$_->{'title'}.'">'. |
$result .='title="'.$_->{'title'}.'">'. |
$_->{'text'}.'</a>'; |
$_->{'text'}.'</a>'; |
Line 1359 returns: nothing
|
Line 1388 returns: nothing
|
$result; |
$result; |
} @Crumbs |
} @Crumbs |
).'</li>'; |
).'</li>'; |
$links .= '<li>'.$crumbsymbol if ($links ne ''); |
#Workaround for edit course. |
|
if(@Crumbs == 0 ){ |
|
$links .= '<li>' if ($links ne ''); |
|
} else { |
|
$links .= '<li>'.$crumbsymbol if ($links ne ''); |
|
} |
|
#should the last Element be translated? |
if ($last->{'no_mt'}) { |
if ($last->{'no_mt'}) { |
$links .= '<b>'.$last->{'text'}.'</b></li>'; |
$links .= '<b>'.$last->{'text'}.'</b>'; |
} else { |
} else { |
$links .= '<b>'.&mt($last->{'text'}).'</b></li>'; |
$links .= '<b>'.&mt($last->{'text'}).'</b>'; |
} |
} |
# |
$links .= '</li>'; |
my $icons = ''; |
my $icons = ''; |
$faq = $last->{'faq'} if (exists($last->{'faq'})); |
$faq = $last->{'faq'} if (exists($last->{'faq'})); |
$bug = $last->{'bug'} if (exists($last->{'bug'})); |
$bug = $last->{'bug'} if (exists($last->{'bug'})); |
Line 1383 returns: nothing
|
Line 1418 returns: nothing
|
$faq,$bug); |
$faq,$bug); |
} |
} |
# |
# |
$Str1 .= $links.'</ol>'; |
|
|
|
|
if($no_realBreadcrumb){ |
|
$Str1 .= $links.'</ul>'; |
|
} else { |
|
$Str1 .= $links.'</ol>'; |
|
} |
# |
# |
if (defined($component)) { |
if (defined($component)) { |
$Str .= "\n".'<table class="'.$css_class.'">' |
$Str .= "\n".'<table class="'.$css_class.'">' |
Line 1402 returns: nothing
|
Line 1443 returns: nothing
|
# Return the @Crumbs stack to what we started with |
# Return the @Crumbs stack to what we started with |
push(@Crumbs,$last); |
push(@Crumbs,$last); |
shift(@Crumbs); |
shift(@Crumbs); |
# |
# Return a table and after that the breadcrumb's line |
return "$Str\n$Str1"; |
return "$Str\n$Str1"; |
} |
} |
|
|