--- loncom/interface/lonmenu.pm 2007/04/13 02:03:54 1.212 +++ loncom/interface/lonmenu.pm 2007/04/28 23:13:56 1.218 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.212 2007/04/13 02:03:54 www Exp $ +# $Id: lonmenu.pm,v 1.218 2007/04/28 23:13:56 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -486,9 +486,14 @@ s&8&3&prt.gif&prepare[_1]&printout[_1]&g s&9&1&sbkm.gif&set[_1]&bookmark[_2]&set_bookmark()&Set a bookmark for this resource&&1 s&9&3&anot.gif&anno-[_1]&tations[_1]&annotate()&Make notes and annotations about this resource&&1 ENDMENUITEMS + unless ($env{'request.noversionuri'}=~/\/(bulletinboard|smppg|navmaps|syllabus|aboutme)(\?|$)/) { - $menuitems.=(<<ENDREALRES); + if (!$env{'request.enc'}) { + $menuitems.=(<<ENDREALRES); s&6&3&catalog.gif&catalog[_1]&info[_1]&catalog_info()&Show catalog information +ENDREALRES + } + $menuitems.=(<<ENDREALRES); s&8&1&eval.gif&evaluate[_1]&this[_1]&gopost('/adm/evaluate',currentURL,1)&Provide my evaluation of this resource s&8&2&fdbk.gif&feedback[_1]&discuss[_1]&gopost('/adm/feedback',currentURL,1)&Provide feedback messages or contribute to the course discussion about this resource ENDREALRES @@ -520,13 +525,24 @@ ENDMENUITEMS $inlinebuttons= join('',map { (defined($_)?$_:'') } @inlineremote); } else { - $inlinebuttons=(<<ENDINLINE); + if ($env{'environment.icons'} eq 'iconsonly') { + $inlinebuttons=(<<ENDINLINEICONS); +<tr><td> +$inlineremote[21] $inlineremote[23] +$inlineremote[61] $inlineremote[63] +$inlineremote[71] $inlineremote[72] $inlineremote[73] +$inlineremote[81] $inlineremote[82] $inlineremote[83] +$inlineremote[91] $inlineremote[92] $inlineremote[93]</td></tr> +ENDINLINEICONS + } else { + $inlinebuttons=(<<ENDINLINE); <tr><td>$inlineremote[21]</td><td> </td><td>$inlineremote[23]</td></tr> <tr><td>$inlineremote[61]</td><td>$inlineremote[62]</td><td>$inlineremote[63]</td></tr> <tr><td>$inlineremote[71]</td><td>$inlineremote[72]</td><td>$inlineremote[73]</td></tr> <tr><td>$inlineremote[81]</td><td>$inlineremote[82]</td><td>$inlineremote[83]</td></tr> <tr><td>$inlineremote[91]</td><td>$inlineremote[92]</td><td>$inlineremote[93]</td></tr> ENDINLINE + } } } $result =(<<ENDREGTEXT); @@ -842,6 +858,9 @@ sub switch { } } else { # Inline Remote + if ($env{'environment.icons'} ne 'classic') { + $img=~s/\.gif$/\.png/; + } if ($nobreak==2) { return ''; } my $text=$top.' '.$bot; $text=~s/\s*\-\s*//gs; @@ -863,19 +882,23 @@ sub switch { $inlineremote[$idx]="\n<tr>". '<td class="LC_menubuttons_img" align="left">'. '<a href="javascript:'.$act.';">'.$pic.'</a></td> - <td class="LC_menubuttons_text" align="left">'.$text.'</td>'; + <td class="LC_menubuttons_text" align="left"><a class="LC_menubuttons_link" href="javascript:'.$act.';"><span class="LC_menubuttons_inline_text">'.$text.'</span></a></td>'; } else { $inlineremote[$idx]="\n<tr>". '<td class="LC_menubuttons_img" align="left">'. '<a href="javascript:'.$act.';">'.$pic. '</a></td><td class="LC_menubuttons_text" colspan="3">'. - $desc.'</td></tr>'; + '<a class="LC_menubuttons_link" href="javascript:'.$act.';"><span class="LC_menubuttons_inline_text">'.$desc.'</span></a></td></tr>'; } } else { # Inline Menu - $inlineremote[$idx]= - '<a href="javascript:'.$act.';">'.$pic. - '</a><span class="LC_menubuttons_inline_text">'.$desc.'</span>'; + if ($env{'environment.icons'} eq 'iconsonly') { + $inlineremote[$idx]='<a title="'.$desc.'" href="javascript:'.$act.';">'.$pic.'</a>'; + } else { + $inlineremote[$idx]= + '<a class="LC_menubuttons_link" href="javascript:'.$act.';">'.$pic. + '<span class="LC_menubuttons_inline_text">'.$desc.'</span></a>'; + } } } return ''; @@ -907,13 +930,13 @@ sub inlinemenu { undef(@inlineremote); undef(%category_members); &rawconfig(1); - my $output='<table><tr>'; + my $output='<table id="LC_mainmenu"><tr>'; for (my $col=1; $col<=2; $col++) { - $output.='<td>'; + $output.='<td class="LC_mainmenu_column">'; for (my $row=1; $row<=8; $row++) { foreach my $cat (keys(%category_members)) { if ($category_positions{$cat} ne "$col,$row") { next; } - $output.='<table id="LC_menubuttons_mainmenu"><tr><td colspan="4" class="LC_menu_category">'.&mt($category_names{$cat}).'</td></tr>'; + $output.='<table id="LC_menubuttons_mainmenu"><tr><td colspan="4" class="LC_menubuttons_category">'.&mt($category_names{$cat}).'</td></tr>'; my %active=(); foreach my $menu_item (split(/\:/,$category_members{$cat})) { if ($inlineremote[$menu_item]) { @@ -1230,7 +1253,7 @@ function annotate() { '$start_page_annotate' +"<form name='goannotate' target='Annotator' method='post' " +"action='/adm/annotations'>" - +"<input type='hidden' name='urlnew' value='"+currentURL+"' />" + +"<input type='hidden' name='symbnew' value='"+currentSymb+"' />" +"<\\/form>" +'$end_page_annotate'); annotator.document.close();