--- loncom/interface/portfolio.pm 2005/03/03 05:47:22 1.79 +++ loncom/interface/portfolio.pm 2005/03/15 23:11:08 1.80 @@ -112,6 +112,7 @@ sub display_directory { $r->print('<form method="post" action="/adm/portfolio">'); } my $href_location="/uploaded/$ENV{'user.domain'}/$ENV{'user.name'}/portfolio$current_path"; + my $href_edit_location="/editupload/$ENV{'user.domain'}/$ENV{'user.name'}/portfolio$current_path"; foreach my $line (sort { my ($afile)=split('&',$a,2); @@ -142,11 +143,11 @@ sub display_directory { $r->print('></td>'); } else { if (exists $locked_files{$current_path.$filename}){ - $r->print('<td colspan="2">Locked</td>'); + $r->print('<td colspan="2"><a href="portfolio?lockinfo='.$current_path.$filename.'">Locked</a></td>'); } else { $r->print('<td><input type="checkbox" name="selectfile" value="'.$filename.'" /> <a href="/adm/portfolio?rename='.$filename.'&currentpath='.$current_path.'">Rename</a></td> - <td><a href="'.$href_location.$filename.'.meta">Meta</a> + <td><a href="'.$href_edit_location.$filename.'.meta">Meta</a> </td>'); } } @@ -443,7 +444,11 @@ sub upload { } } } - +sub lock_info { + my ($r) = @_; + $r->print("lock info here"); + return 'ok'; +} sub createdir { my ($r)=@_; my $newdir=&Apache::lonnet::clean_filename($ENV{'form.newdir'}); @@ -491,7 +496,7 @@ sub handler { $ENV{'user.name'}). '/userfiles/portfolio'; &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, - ['selectfile','currentpath','meta', + ['selectfile','currentpath','meta','lockinfo', 'currentfile','action','fieldname','mode','rename']); &Apache::loncommon::no_cache($r); &Apache::loncommon::content_type($r,'text/html'); @@ -539,6 +544,8 @@ sub handler { &rename($r); } elsif ($ENV{'form.createdir'}) { &createdir($r); + } elsif ($ENV{'form.lockinfo'}) { + &lock_info($r); } else { my $current_path='/'; if ($ENV{'form.currentpath'}) {