Apache-MP3
view release on metacpan or search on metacpan
$path .= escape($components[$c]) ."/";
my $idt = $c * $indent;
my $l = a({-href=>$path},$components[$c] || ($home.br({-clear=>'all'})));
$links .= div({-style=>"text-indent: ${idt}em; $parent_style"},
font({-size=>'+1'},$l))."\n";
}
my $idt = (@components-1) * $indent;
$links .= div({-style=>"text-indent: ${idt}em; $current_style"},
font({-size=>'+1'},$components[-1] || $home))."\n";
return $links;
}
# alternative display on one line using arrows
sub generate_navpath_slashes {
my $self = shift;
my $uri = shift;
my $home = $self->home_label;
my @components = split '/',$uri;
unshift @components,'' unless @components;
my $path;
my $links = br . ' ' ; #start_h1();
for (my $c=0; $c < @components-1; $c++) {
$links .= ' / ' if $path;
$path .= escape($components[$c]) . "/";
$links .= a({-href=>$path},font({-size=>'+1'},$components[$c] || $home));
}
$links .= ' / ' if $path;
$links .= font({-size=>'+1',-style=>'color: red'},($components[-1] || $home));
$links .= br;
return $links;
}
# alternative display on one line using arrows
sub generate_navpath_arrows {
my $self = shift;
my $uri = shift;
my $home = $self->home_label;
my @components = split '/',$uri;
unshift @components,'' unless @components;
my $path;
my $links = br . ' ' ; #start_h1();
my $arrow = $self->arrow_icon;
for (my $c=0; $c < @components-1; $c++) {
$links .= ' ' . img({-src=>$arrow}) if $path;
$path .= escape($components[$c]) . "/";
$links .= ' ' . a({-href=>$path},$components[$c] || $home);
}
$links .= ' ' . img({-src=>$arrow}) if $path;
$links .= " ". ($components[-1] || $home);
$links .= br;#end_h1();
return $links;
}
# print the HTML at the bottom of the page
sub directory_bottom {
my $self = shift;
my $dir = shift; # actually not used
my $mp3s = shift;
#allow masking of 'Authored by Lincoln...' and helplink.
return if $self->r->dir_config('SuppressCredits');
print
table({-width=>'100%',-border=>0},
TR(
td({$self->aleft},
#address( # Unpredictable and/or flaky rendering
$self ->x( "_CREDITS_before_author" )
.
a({-href=>'http://stein.cshl.org'},
$self->x( "_CREDITS_author" )
)
.
$self ->x( "_CREDITS_after_author" )
#)
),
td({$self->aright},$self->get_help))
);
print "<!--",
sprintf("\n %s v%s", __PACKAGE__, $VERSION || '0'),
(ref($self) eq __PACKAGE__) ? () :
sprintf("\n %s v%s", ref($self), $self->VERSION || '0'),
"\n ", $self->x('_VERSION'), " (", ref($self->lh), ")",
"\n -->",
;
print end_html();
}
# print the HTML at the top of the list of subdirs
sub subdir_list_top {
my $self = shift;
my $subdirs = shift; # array reference
print "\n", hr;
print "\n\n", h2({-class=>'CDdirectories'},
$self->x('CD Directories ([_1])',
scalar @$subdirs),
), "\n";
}
# print the HTML at the bottom of the list of subdirs
sub subdir_list_bottom {
my $self = shift;
my $subdirs = shift; # array reference
}
# print the HTML to format the list of subdirs
sub subdir_list {
my $self = shift;
my $subdirs = shift; #array reference
my @subdirs = $self->sort_subdirs($subdirs);
my $cols = $self->subdir_columns;
my $rows = int(0.99 + @subdirs/$cols);
print start_table({-border=>0,-id=>'diroutertable'}),"\n";
if($self->subdir_columns == 1){
my $statsheader = '';
if($self->r->dir_config('CacheStats') && $self->r->dir_config('CacheDir')){
( run in 0.799 second using v1.01-cache-2.11-cpan-39bf76dae61 )