version 1.203, 2009/02/22 18:30:27
|
version 1.214, 2009/05/16 18:06:41
|
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">'."\n" |
|
.'<img src="/adm/lonIcons/navmap.wrong.gif" /> '."\n" |
|
.$message."\n" |
|
.'</span>'."\n"; |
|
} else { |
|
return '<span class="LC_success">'."\n" |
|
.'<img src="/adm/lonIcons/navmap.correct.gif" /> '."\n" |
|
.$message."\n" |
|
.'</span>'."\n"; |
|
} |
|
} |
|
|
############################################## |
############################################## |
############################################## |
############################################## |
Line 285 sub checkbox {
|
Line 310 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 332 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 955 sub Create_PrgWin {
|
Line 980 sub Create_PrgWin {
|
popwin=open(\'\',\'popwin\',\'width=400,height=100\');". |
popwin=open(\'\',\'popwin\',\'width=400,height=100\');". |
"popwin.document.writeln(\'".$start_page. |
"popwin.document.writeln(\'".$start_page. |
"<h4>".&mt("$heading")."<\/h4>". |
"<h4>".&mt("$heading")."<\/h4>". |
"<form action= \"\" name=\"popremain\" method=\"post\">". |
"<form action=\"\" name=\"popremain\" method=\"post\">". |
'<input type="text" size="'.$width.'" name="remaining" value="'. |
'<input type="text" size="'.$width.'" name="remaining" value="'. |
&mt('Starting').'" /><\\/form>'.$end_page. |
&mt('Starting').'" /><\\/form>'.$end_page. |
"\');". |
"\');". |
Line 1305 returns: nothing
|
Line 1330 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 = '<div id="LC_head_subbox"><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 1316 returns: nothing
|
Line 1346 returns: nothing
|
my $bug = ''; |
my $bug = ''; |
my $help=''; |
my $help=''; |
# Crumb Symbol |
# Crumb Symbol |
my $crumbsymbol = '▶ '; |
my $crumbsymbol = '» '; |
# The last breadcrumb does not have a link, so handle it separately. |
# The last breadcrumb does not have a link, so handle it separately. |
my $last = pop(@Crumbs); |
my $last = pop(@Crumbs); |
# |
# |
Line 1339 returns: nothing
|
Line 1369 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 1379 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 1390 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 1420 returns: nothing
|
$faq,$bug); |
$faq,$bug); |
} |
} |
# |
# |
$Str1 .= $links.'</ol>'; |
|
|
|
|
if($no_realBreadcrumb){ |
|
$Str1 .= $links.'</ul>'; |
|
} else { |
|
$Str1 .= $links.'</ol></div>'; |
|
} |
# |
# |
if (defined($component)) { |
if (defined($component)) { |
$Str .= "\n".'<table class="'.$css_class.'">' |
$Str .= "\n".'<table class="'.$css_class.'">' |
Line 1402 returns: nothing
|
Line 1445 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"; |
} |
} |
|
|
Line 1505 END
|
Line 1548 END
|
} |
} |
|
|
sub row_title { |
sub row_title { |
|
my ($title,$css_title_class,$css_value_class) = @_; |
$row_count[0]++; |
$row_count[0]++; |
my $css_class = ($row_count[0] % 2)?'LC_odd_row':'LC_even_row'; |
my $css_class = ($row_count[0] % 2)?'LC_odd_row':'LC_even_row'; |
my ($title,$css_title_class,$css_value_class) = @_; |
|
$css_title_class ||= 'LC_pick_box_title'; |
$css_title_class ||= 'LC_pick_box_title'; |
$css_title_class = 'class="'.$css_title_class.'"'; |
$css_title_class = 'class="'.$css_title_class.'"'; |
|
|
Line 1766 sub topic_bar {
|
Line 1809 sub topic_bar {
|
return ' |
return ' |
<div class="LC_topic_bar"> |
<div class="LC_topic_bar"> |
<img alt="'.&mt('Step [_1]',$imgnum). |
<img alt="'.&mt('Step [_1]',$imgnum). |
'"src="/res/adm/pages/bl_step'.$imgnum.'.gif" /> |
' "src="/res/adm/pages/bl_step'.$imgnum.'.gif" /> |
<span>'.$title.'</span> |
<span>'.$title.'</span> |
</div> |
</div> |
'; |
'; |