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