passed in as hash references.
See htmltag() for more details.
=back
+
+returns: XHTML list as String.
-returns: XHTML list as String.
-
-=cut
+=cut
# \@items, {listattr => { class => 'abc', id => 'xyx' }, itemattr => {class => 'abc', id => 'xyx'}}
sub list_from_array {
my ($items, $args) = @_;
+ return unless (ref($items) eq 'ARRAY');
return unless scalar @$items;
my ($ul, $li) = inittags( qw(ul li) );
my $listitems = join '', map { $li->($_, $args->{itemattr}) } @$items;
@@ -2401,7 +3844,8 @@ sub generate_menu {
$$link{alttext} : $$link{linktext})
}), {
href => $$link{url},
- title => mt($$link{linktitle})
+ title => mt($$link{linktitle}),
+ class => 'LC_menubuttons_link'
}).
$a->(mt($$link{linktext}), {
href => $$link{url},
@@ -2435,7 +3879,7 @@ sub generate_menu {
=pod
-=item &start_funclist
+=item &start_funclist()
Start list of available functions
@@ -2475,7 +3919,7 @@ sub start_funclist {
=pod
-=item &add_item_funclist
+=item &add_item_funclist()
Adds an item to the list of available functions
@@ -2501,7 +3945,7 @@ sub add_item_funclist {
=pod
-=item &end_funclist
+=item &end_funclist()
End list of available functions
@@ -2514,6 +3958,7 @@ add_item_funclist
Inputs: ./.
Returns: HTML code with function list end
+
=cut
sub end_funclist {
@@ -2522,11 +3967,11 @@ sub end_funclist {
=pod
-=item funclist_from_array( \@array, {legend => 'text for legend'} )
+=item &funclist_from_array( \@array, {legend => 'text for legend'} )
Constructs a XHTML list from \@array with the first item being visually
highlighted and set to the value of legend or 'Functions' if legend is
-empty.
+empty.
=over
@@ -2540,18 +3985,55 @@ A string that's used as visually highlig
it's value evaluates to false.
=back
-
-returns: XHTML list as string.
+
+returns: XHTML list as string.
=back
-=cut
+=cut
sub funclist_from_array {
my ($items, $args) = @_;
+ return unless(ref($items) eq 'ARRAY');
$args->{legend} ||= mt('Functions');
- return list_from_array( [$args->{legend}, @$items],
+ return list_from_array( [$args->{legend}, @$items],
{ listattr => {class => 'LC_funclist'} });
+}
+
+=pod
+
+=over
+
+=item &actionbox( \@array )
+
+Constructs a XHTML list from \@array with the first item being visually
+highlighted and set to the value 'Actions'. The list is wrapped in a division.
+
+The actionlist is used to offer contextual actions, mostly at the bottom
+of a page, on which the outcome of an processed action is shown,
+e.g. a file operation in Authoring Space.
+
+=over
+
+=item \@array
+
+A reference to the array containing text. Details: sub funclist_from_array
+
+=back
+
+Returns: XHTML div as string.
+
+=back
+
+=cut
+
+sub actionbox {
+ my ($items) = @_;
+ return unless(ref($items) eq 'ARRAY');
+ return
+ ''
+ .&funclist_from_array($items, {legend => &mt('Actions')})
+ .'
';
}
1;