--- loncom/interface/portfolio.pm 2004/07/28 19:00:19 1.18 +++ loncom/interface/portfolio.pm 2004/07/28 22:30:31 1.19 @@ -218,9 +218,10 @@ sub handler { # as well as information about the home server directory structure, specifically # the path to the users userfiles directory. # + $r->print('/userfiles/portfolio'.$currentPath.'
'); my $portfolio_root = &Apache::loncommon::propath($ENV{'user.domain'}, $ENV{'user.name'}). - '/userfiles/portfolio'.$currentPath; + '/userfiles/portfolio'; @dirList = &Apache::lonnet::dirlist($currentPath, $ENV{'user.domain'}, $ENV{'user.name'}, $portfolio_root); if (@dirList == 2) { # need to know if directory is empty so it can be removed if desired @@ -250,16 +251,37 @@ sub handler { # Display begins here # ############################## + my @tree = split (/\//,$currentPath); + $r->print(''.makeAnchor('portfolio','/').'/'); + if (@tree > 1){ + my $newCurrentPath = ''; + for (my $i = 1; $i< @tree; $i++){ + $newCurrentPath .= $tree[$i].'/'; + $r->print(makeAnchor($tree[$i],'/'.$newCurrentPath).'/'); + } + } + $r->print(''); $r->print(''. ''); foreach my $line (@dirList) { #$strip holds directory/file name #$dom my ($fileName,$dom,undef,$testdir,undef,undef,undef,undef,undef,undef,undef,undef,undef,undef,$obs,undef)=split(/\&/,$line,16); - if ($dirptr&$testdir){ - $r->print(''); - }else{ - $r->print(''); + if (($fileName ne '.') && ($fileName ne '..')){ + if ($dirptr&$testdir){ + $r->print(''); + $r->print(''); + $r->print(''); + $r->print(''); + }else{ + $r->print(''); + $r->print(''); + $r->print(''); + $r->print(''); + $r->print(''); + $r->print(''); + $r->print(''); + } } } # pink bg
 ActionsNameTitleStatusLast Modified
Go to ...'.makeAnchor($fileName.'/',$currentPath.$fileName.'/').'
Edit'.$fileName.'Title HereStatus HereModified Here