'; @@ -1386,12 +1383,8 @@ returns: nothing $Str .= $links.' | '; # if (defined($component)) { - $Str .= ''; - if ($no_mt) { - $Str .= $component; - } else { - $Str .= &mt($component); - } + $Str .= ' | '.
+ &mt($component);
if ($icons ne '') {
$Str .= ' '.$icons;
}
@@ -1715,6 +1708,7 @@ sub email_default_row {
sub submit_row {
my ($title,$cmd,$submit_text,$css_class) = @_;
+ $submit_text = &mt($submit_text);
my $output = &row_title($title,$css_class,'LC_pick_box_submit');
$output .= qq|
@@ -2011,6 +2005,74 @@ END return $scripttag; } +############################################## +############################################## + +# generate_menu +# +# Generates html markup for a menu. +# +# Inputs: +# An array of following structure: +# ({ categorytitle => 'Categorytitle', +# items => [ +# { linktext => 'Text to be displayed', +# url => 'URL the link is pointing to, i.e. /adm/site?action=dosomething', +# permission => 'Contains permissions as returned from lonnet::allowed(), +# must evaluate to true in order to activate the link', +# icon => 'icon filename', +# alttext => 'alt text for the icon', +# help => 'Name of the corresponding helpfile', +# linktitle => 'Description of the link (used for title tag)' +# }, +# ... +# ] +# }, +# ... +# ) +# +# Outputs: A scalar containing the html markup for the menu. + +# ---- Remove when done ---- +# This routine is part of the redesign of LON-CAPA and it's +# subject to change during this project. +# Don't rely on its current functionality as it might be +# changed or removed. +# TODO: +# check for empty values +# -------------------------- + +sub generate_menu { + my @menu = @_; + my $menu_html = qq| |;
+
+ foreach my $category (@menu) { #FIXME: insert appropriate classnames for styles when they're finished.
+ $menu_html .=' |;
+ return $menu_html;
+}
1;
+ ';
+ }
+ $menu_html .= qq|'.mt($category->{'categorytitle'}).'+
|