--- loncom/interface/lonmenu.pm 2008/12/03 11:48:43 1.245 +++ loncom/interface/lonmenu.pm 2009/02/13 20:20:30 1.252 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.245 2008/12/03 11:48:43 harmsja Exp $ +# $Id: lonmenu.pm,v 1.252 2009/02/13 20:20:30 schafran Exp $ # # Copyright Michigan State University Board of Trustees # @@ -207,7 +207,7 @@ sub menubuttons { my $logo=&Apache::loncommon::lonhttpdurl("/adm/lonIcons/minilogo.gif"); $logo = '<td class="LC_top_nav_logo"><a href="/adm/about.html"><img src="'. - $logo.'" alt="LON-CAPA Logo" /></a></td>'; + $logo.'" alt="LON-CAPA Logo" class="LC_noBorder" /></a></td>'; if ($env{'request.state'} eq 'construct') { if (($env{'request.noversionuri'} eq '') || (!defined($env{'request.noversionuri'}))) { @@ -299,7 +299,6 @@ ENDMAINMENU </td> </tr> </table> -</font> ENDINLINEMENU } $roles = '<td><a href="/adm/roles" target="_top">'.$lt{'roles'}.'</a></td>'; @@ -365,8 +364,8 @@ $navmaps $docs $groups $roles -<td class="LC_top_nav_help">$helplink</td> -<td class="LC_top_nav_exit"><a href="/adm/logout" target="_top">$lt{'exit'}</a></td> +<td style="width: 2.0em;">$helplink</td> +<td style="width: 2.0em;"><a href="/adm/logout" target="_top">$lt{'exit'}</a></td> </tr> </table> $form @@ -1028,22 +1027,22 @@ sub switch { my $pic= '<img alt="'.$text.'" src="'. &Apache::loncommon::lonhttpdurl('/res/adm/pages/'.$img). - '" align="'.($nobreak==3?'right':'left').'" />'; + '" align="'.($nobreak==3?'right':'left').'" class="LC_noBorder" />'; if ($env{'browser.interface'} eq 'faketextual') { # Accessibility if ($nobreak==3) { $inlineremote[$idx]="\n". '<td class="LC_menubuttons_text" align="right">'.$text. - '</td><td class="LC_menubuttons_img" align="left">'. + '</td><td align="left">'. '<a href="javascript:'.$act.';">'.$pic.'</a></td></tr>'; } elsif ($nobreak) { $inlineremote[$idx]="\n<tr>". - '<td class="LC_menubuttons_img" align="left">'. + '<td align="left">'. '<a href="javascript:'.$act.';">'.$pic.'</a></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">'. + '<td align="left">'. '<a href="javascript:'.$act.';">'.$pic. '</a></td><td class="LC_menubuttons_text" colspan="3">'. '<a class="LC_menubuttons_link" href="javascript:'.$act.';"><span class="LC_menubuttons_inline_text">'.$desc.'</span></a></td></tr>'; @@ -1094,10 +1093,10 @@ sub inlinemenu { 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_menubuttons_category">'.&mt($category_names{$cat}).'</td></tr>'; - $output.='<div class="ContentBoxSpecial">'; - $output.='<h4 class="hcell">'.&mt($category_names{$cat}).'</h4>'; - $output.='<table id="LC_menubuttons_mainmenu">'; + #$output.='<table><tr><td colspan="4" class="LC_menubuttons_category">'.&mt($category_names{$cat}).'</td></tr>'; + $output.='<div class="LC_ContentBoxSpecial">'; + $output.='<h4 class="LC_hcell">'.&mt($category_names{$cat}).'</h4>'; + $output.='<table>'; my %active=(); foreach my $menu_item (split(/\:/,$category_members{$cat})) { if ($inlineremote[$menu_item]) { @@ -1106,7 +1105,6 @@ sub inlinemenu { } foreach my $item (sort(keys(%active))) { $output.=$inlineremote[$item]; - &Apache::lonnet::logthis("item=$item output=$inlineremote[$item]"); } $output.='</table>'; $output.='</div>'; @@ -1226,6 +1224,33 @@ sub rawconfig { } } } + } elsif ($pro eq 'tools') { + my @tools = ('aboutme','blog','portfolio'); + if (grep(/^\Q$prt\E$/,@tools)) { + if (!&Apache::lonnet::usertools_access($env{'user.name'}, + $env{'user.domain'}, + $prt,undef,'tools')) { + $output.=&clear($row,$col); + next; + } + } elsif ($prt eq 'reqcrs') { + my $showreqcrs = 0; + foreach my $type ('official','unofficial') { + if (&Apache::lonnet::usertools_access($env{'user.name'}, + $env{'user.domain'}, + $type,undef,'requestcourses')) { + $showreqcrs = 1; + last; + } + } + if (!$showreqcrs) { + $output.=&clear($row,$col); + next; + } + } + $prt='any'; + $output.=&secondlevel( + $uname,$udom,$rol,$crs,$pub,$con,$row,$col,$prt,$img,$top,$bot,$act,$desc,$cat); } } unless (($env{'browser.interface'} eq 'textual') || @@ -1449,7 +1474,7 @@ function set_bookmark() { +"type='text' name='title' size=45 value='"+clienttitle+"' />" +"<br />Address:<br /><input type='text' name='address' size='45' " +"value='"+clienthref+"' /><br /><center><input type='submit' " - +"value='Save' /> <input type='button' value='Close (no save)' " + +"value='Save' /> <input type='button' value='Close' " +"onclick='javascript:window.close();' /><\\/center><\\/td>" +"<\\/tr><\\/table><\\/form><\\/center>" +'$end_page_bookmark' );