--- loncom/interface/portfolio.pm 2004/07/28 19:00:19 1.18 +++ loncom/interface/portfolio.pm 2004/08/24 04:55:49 1.22 @@ -220,7 +220,7 @@ sub handler { # 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 +250,67 @@ sub handler { # Display begins here # ############################## + $r->print(''); + $r->print('
'); + my $displayOut = '
'; + $displayOut = $displayOut.''. + ''. + ''. + '
'; + $r->print($displayOut); + $r->print('
'); + my $displayOut = '
'; + $displayOut = $displayOut.''. + ''. + ''. + '
'; + $r->print($displayOut); + $r->print('
'); + my @tree = split (/\//,$currentPath); + $r->print(''.makeAnchor('/','/')); + if (@tree > 1){ + my $newCurrentPath = ''; + for (my $i = 1; $i< @tree; $i++){ + $newCurrentPath .= $tree[$i].'/'; + $r->print(makeAnchor($tree[$i],'/'.$newCurrentPath).'/'); + } + } + $r->print(''); + &Apache::lonhtmlcommon::store_recent('portfolio',$currentPath,$currentPath); + $r->print('
'. + &Apache::lonhtmlcommon::select_recent('portfolio','currentpath', + 'this.form.submit();')); + $r->print("
"); $r->print(''. - ''); + ''); + my $href_location="/uploaded/$ENV{'user.domain'}/$ENV{'user.name'}/portfolio/$currentPath/"; 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(''); + my ($fileName,$dom,undef,$testdir,undef,undef,undef,undef,$size,undef,$mtime,undef,undef,undef,$obs,undef)=split(/\&/,$line,16); + 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 @@ -267,7 +318,7 @@ sub handler { # $r->print(displayDirectory($currentPath, $currentFile, @dirList)); # $r->print('>
 ActionsNameTitleStatusLast Modified
Actions NameSizeLast Modified
Go to ...'.makeAnchor($fileName.'/',$currentPath.$fileName.'/').'
+ + +'. + $fileName.''.$size.''.&Apache::lonlocal::locallocaltime($mtime).'
'); # $r->print(displayActions($currentPath, $currentFile, $isEmpty)); - $r->print('
'); + $r->print(''); $r->print(''); $r->print("\n\n"); $r->rflush();