--- loncom/interface/lonmenu.pm 2004/10/28 18:12:48 1.119 +++ loncom/interface/lonmenu.pm 2004/11/02 21:02:01 1.122 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.119 2004/10/28 18:12:48 www Exp $ +# $Id: lonmenu.pm,v 1.122 2004/11/02 21:02:01 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -43,7 +43,6 @@ use Apache::lonnet(); use Apache::Constants qw(:common); use Apache::lonhtmlcommon(); use Apache::loncommon(); -use Apache::lonnavmaps(); use Apache::lonlocal; use vars qw(@desklines $readdesk); @@ -226,6 +225,14 @@ sub innerregister { my $forcereg=shift; my $target = shift; my $result = ''; + my ($uname,$thisdisfn); + my $const_space = 0; + if ($ENV{'request.filename'} =~ /^\/home\/([^\/]+)\/public_html\/(.*)/) { + $const_space = 1; + $uname = $1; + $thisdisfn = $2; + } + if ($ENV{'request.noversionuri'} eq '/res/adm/pages/menu.html') { return ''; } $Apache::lonxml::registered=1; @@ -244,6 +251,38 @@ sub innerregister { if ($noremote) { $newmail=' + + +
'; } + if ($textual && $const_space) { + my $formaction='/priv/'.$uname.'/'.$thisdisfn; + $formaction=~s/\/+/\//g; + my $titleinfo = '
'. + &Apache::lonhtmlcommon::crumbs($uname.'/'.$thisdisfn,'_top','/priv','','-1'). + &Apache::lonhtmlcommon::select_recent('construct','recent', + 'this.form.action=this.form.recent.value;this.form.submit()'). + '
'; + &Apache::lonhtmlcommon::store_recent('construct',$formaction,$formaction); + $newmail .= &constspaceform(); +# role and realm + my ($role,$realm) = &Apache::lonnet::plaintext((split(/\./,$ENV{'request.role'}))[0]); + unless ($realm) { $realm=' '; } + $newmail .= < +
+$titleinfo + + + $ENV{'environment.firstname'} + $ENV{'environment.middlename'} + $ENV{'environment.lastname'} + $ENV{'environment.generation'} +  
+ $role  +
+END + } if (($textual) && ($ENV{'request.symb'}) && ($ENV{'request.course.id'})) { my ($mapurl,$rid,$resurl)=&Apache::lonnet::decode_symb($ENV{'request.symb'}); $newmail.=$ENV{'course.'.$ENV{'request.course.id'}.'.description'}; @@ -348,7 +387,7 @@ sub innerregister { } } # Finally, turn the button on or off - if ($cfile) { + if ($cfile && !$const_space) { $editbutton=&switch ('','',6,1,'cstr.gif','edit[_1]','resource[_2]', "go('".$cfile."');","Edit this resource"); @@ -359,7 +398,19 @@ sub innerregister { ### ### # Prepare the rest of the buttons - my $menuitems=(< + + +
+ + +
+ENDCONSTSPACEFORM +} + + sub get_nav_status { my $navstatus="swmenu.w_loncapanav_flag="; if ($ENV{'environment.remotenavmap'} eq 'on') {