version 1.418, 2025/02/18 03:42:04
|
version 1.421, 2025/03/06 16:51:36
|
Line 2463 sub docs_breadcrumbs {
|
Line 2463 sub docs_breadcrumbs {
|
my @row_count; |
my @row_count; |
|
|
sub start_pick_box { |
sub start_pick_box { |
my ($css_class,$id) = @_; |
my ($css_class,$id,$caption,$caption_class) = @_; |
if (defined($css_class)) { |
if (defined($css_class)) { |
$css_class = 'class="'.$css_class.'"'; |
$css_class = 'class="'.$css_class.'"'; |
} else { |
} else { |
Line 2477 sub start_pick_box {
|
Line 2477 sub start_pick_box {
|
my $output = <<"END"; |
my $output = <<"END"; |
<table $css_class $table_id> |
<table $css_class $table_id> |
END |
END |
|
if (defined($caption)) { |
|
if (defined($caption_class)) { |
|
$caption_class = 'class="'.$caption_class.'"'; |
|
} else { |
|
$caption_class = 'class="LC_caption"'; |
|
} |
|
$output .= <<"END"; |
|
<caption $caption_class>$caption</caption> |
|
END |
|
} |
return $output; |
return $output; |
} |
} |
|
|
Line 3976 sub list_from_array {
|
Line 3986 sub list_from_array {
|
sub generate_menu { |
sub generate_menu { |
my @menu = @_; |
my @menu = @_; |
# subs for specific html elements |
# subs for specific html elements |
my ($h3, $div, $ul, $li, $a, $img) = inittags( qw(h3 div ul li a img) ); |
my ($h2, $div, $ul, $li, $a, $img) = inittags( qw(h2 div ul li a img) ); |
|
|
my @categories; # each element represents the entire markup for a category |
my @categories; # each element represents the entire markup for a category |
|
|
Line 3999 sub generate_menu {
|
Line 4009 sub generate_menu {
|
src => $src, |
src => $src, |
alt => mt(defined($$link{alttext}) ? |
alt => mt(defined($$link{alttext}) ? |
$$link{alttext} : $$link{linktext}) |
$$link{alttext} : $$link{linktext}) |
}), { |
}).mt($$link{linktext}), { |
href => $$link{url}, |
|
title => mt($$link{linktitle}), |
|
class => 'LC_menubuttons_link' |
|
}). |
|
$a->(mt($$link{linktext}), { |
|
href => $$link{url}, |
href => $$link{url}, |
title => mt($$link{linktitle}), |
title => mt($$link{linktitle}), |
class => "LC_menubuttons_link" |
class => "LC_menubuttons_link" |
}). |
}). |
(defined($$link{help}) ? |
(defined($$link{help}) ? |
Apache::loncommon::help_open_topic($$link{help}) : ''), |
Apache::loncommon::help_open_topic($$link{help}) : ''), |
{class => "LC_menubuttons_inline_text"})); |
{class => "LC_menubuttons_inline_text"})); |
} |
} |
|
|
# wrap categorytitle in <h3>, concatenate with |
# wrap categorytitle in <h2>, concatenate with |
# joined and in <ul> tags wrapped @links |
# joined and in <ul> tags wrapped @links |
# and wrap everything in an enclosing <div> and push it into |
# and wrap everything in an enclosing <div> and push it into |
# @categories |
# @categories |
# such that each element looks like: |
# such that each element looks like: |
# <div><h3>title</h3><ul><li>...</li>...</ul></div> |
# <div><h2>title</h2><ul><li>...</li>...</ul></div> |
# the category won't be added if there aren't any links |
# the category won't be added if there aren't any links |
push(@categories, |
push(@categories, |
$div->($h3->(mt($$category{categorytitle}), {class=>"LC_hcell"}). |
$div->($h2->(mt($$category{categorytitle}), {class=>'LC_hcell LC_heading_2'}). |
$ul->(join('' ,@links), {class =>"LC_ListStyleNormal" }), |
$ul->(join('' ,@links), {class =>"LC_ListStyleNormal" }), |
{class=>"LC_Box LC_400Box"})) if scalar(@links); |
{class=>"LC_Box LC_400Box"})) if scalar(@links); |
} |
} |