version 1.284, 2010/10/04 14:34:46
|
version 1.285, 2011/01/03 13:10:12
|
Line 1603 returns: nothing
|
Line 1603 returns: nothing
|
sub add_breadcrumb_tool { |
sub add_breadcrumb_tool { |
my ($category, @html) = @_; |
my ($category, @html) = @_; |
return unless @html; |
return unless @html; |
if (!defined(%tools)) { |
if (!keys(%tools)) { |
%tools = ( navigation => [], tools => [], advtools => []); |
%tools = ( navigation => [], tools => [], advtools => []); |
} |
} |
|
|
Line 1643 returns: nothing
|
Line 1643 returns: nothing
|
#TODO might split this in separate functions for each category |
#TODO might split this in separate functions for each category |
sub render_tools { |
sub render_tools { |
my ($breadcrumbs) = @_; |
my ($breadcrumbs) = @_; |
return unless defined %tools; |
return unless (keys(%tools)); |
|
|
my $navigation = list_from_array($tools{navigation}, |
my $navigation = list_from_array($tools{navigation}, |
{ listattr => { class=>"LC_breadcrumb_tools_navigation" } }); |
{ listattr => { class=>"LC_breadcrumb_tools_navigation" } }); |
Line 2105 sub echo_form_input {
|
Line 2105 sub echo_form_input {
|
if ($key =~ /^form\.(.+)$/) { |
if ($key =~ /^form\.(.+)$/) { |
my $name = $1; |
my $name = $1; |
my $match = 0; |
my $match = 0; |
if ((!@{$excluded}) || (!grep/^$name$/,@{$excluded})) { |
if (ref($excluded) eq 'ARRAY') { |
if (defined($regexps)) { |
next if (grep(/^\Q$name\E$/,@{$excluded})); |
if (@{$regexps} > 0) { |
} |
foreach my $regexp (@{$regexps}) { |
if (ref($regexps) eq 'ARRAY') { |
if ($name =~ /\Q$regexp\E/) { |
if (@{$regexps} > 0) { |
$match = 1; |
foreach my $regexp (@{$regexps}) { |
last; |
if ($name =~ /$regexp/) { |
} |
$match = 1; |
|
last; |
} |
} |
} |
} |
} |
} |
if (!$match) { |
} |
if (ref($env{$key})) { |
next if ($match); |
foreach my $value (@{$env{$key}}) { |
if (ref($env{$key}) eq 'ARRAY') { |
$value = &HTML::Entities::encode($value,'<>&"'); |
foreach my $value (@{$env{$key}}) { |
$output .= '<input type="hidden" name="'.$name. |
$value = &HTML::Entities::encode($value,'<>&"'); |
'" value="'.$value.'" />'."\n"; |
$output .= '<input type="hidden" name="'.$name. |
} |
'" value="'.$value.'" />'."\n"; |
} else { |
|
my $value = &HTML::Entities::encode($env{$key},'<>&"'); |
|
$output .= '<input type="hidden" name="'.$name. |
|
'" value="'.$value.'" />'."\n"; |
|
} |
|
} |
} |
|
} else { |
|
my $value = &HTML::Entities::encode($env{$key},'<>&"'); |
|
$output .= '<input type="hidden" name="'.$name. |
|
'" value="'.$value.'" />'."\n"; |
} |
} |
} |
} |
} |
} |
Line 2429 returns: XHTML list as String.
|
Line 2429 returns: XHTML list as String.
|
# \@items, {listattr => { class => 'abc', id => 'xyx' }, itemattr => {class => 'abc', id => 'xyx'}} |
# \@items, {listattr => { class => 'abc', id => 'xyx' }, itemattr => {class => 'abc', id => 'xyx'}} |
sub list_from_array { |
sub list_from_array { |
my ($items, $args) = @_; |
my ($items, $args) = @_; |
|
return unless (ref($items) eq 'ARRAY'); |
return unless scalar @$items; |
return unless scalar @$items; |
my ($ul, $li) = inittags( qw(ul li) ); |
my ($ul, $li) = inittags( qw(ul li) ); |
my $listitems = join '', map { $li->($_, $args->{itemattr}) } @$items; |
my $listitems = join '', map { $li->($_, $args->{itemattr}) } @$items; |
Line 2641 returns: XHTML list as string.
|
Line 2642 returns: XHTML list as string.
|
|
|
sub funclist_from_array { |
sub funclist_from_array { |
my ($items, $args) = @_; |
my ($items, $args) = @_; |
|
return unless(ref($items) eq 'ARRAY'); |
$args->{legend} ||= mt('Functions'); |
$args->{legend} ||= mt('Functions'); |
return list_from_array( [$args->{legend}, @$items], |
return list_from_array( [$args->{legend}, @$items], |
{ listattr => {class => 'LC_funclist'} }); |
{ listattr => {class => 'LC_funclist'} }); |