--- loncom/interface/lonhtmlcommon.pm 2012/11/29 20:37:07 1.334 +++ loncom/interface/lonhtmlcommon.pm 2012/11/30 11:28:51 1.335 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common html routines # -# $Id: lonhtmlcommon.pm,v 1.334 2012/11/29 20:37:07 raeburn Exp $ +# $Id: lonhtmlcommon.pm,v 1.335 2012/11/30 11:28:51 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3534,6 +3534,40 @@ sub funclist_from_array { { listattr => {class => 'LC_funclist'} }); } +=pod + +=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 Construction 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; __END__