--- loncom/interface/portfolio.pm 2005/04/07 06:56:23 1.82
+++ loncom/interface/portfolio.pm 2005/12/19 20:41:45 1.91
@@ -34,43 +34,62 @@ use Apache::lonnet;
# receives a file name and path stub from username/userfiles/portfolio/
# returns an anchor tag consisting encoding filename and currentpath
sub make_anchor {
- my ($filename, $current_path, $current_mode, $field_name) = @_;
- my $anchor = ''.$filename.'';
+ my ($filename, $current_path, $current_mode, $field_name, $continue_select) = @_;
+ if ($continue_select ne 'true') {$continue_select = 'false'};
+ my $anchor = ''.$filename.'';
return $anchor;
}
my $dirptr=16384;
sub display_common {
my ($r,$current_path,$is_empty,$dir_list)=@_;
my $iconpath= $r->dir_config('lonIconsURL') . "/";
- $r->print('
');
- $r->print('');
- my $displayOut = '';
- $r->print($displayOut);
- $r->print(' |
');
- $displayOut = '';
- $r->print($displayOut);
- $r->print(' |
');
+ my %text=&Apache::lonlocal::texthash('upload' => 'Upload',
+ 'upload_label' =>
+ 'Upload file to current directory:',
+ 'createdir' => 'Create Subdirectory',
+ 'createdir_label' =>
+ 'Create subdirectory in current directory:');
+ $r->print(<<"TABLE");
+
+TABLE
my @tree = split (/\//,$current_path);
- $r->print(''.&make_anchor('portfolio','/',$env{"form.mode"},$env{"form.fieldname"}).'/');
+ $r->print(''.&make_anchor('portfolio','/',$env{"form.mode"},$env{"form.fieldname"},$env{"form.continue"}).'/');
if (@tree > 1){
my $newCurrentPath = '';
for (my $i = 1; $i< @tree; $i++){
$newCurrentPath .= $tree[$i].'/';
- $r->print(&make_anchor($tree[$i],'/'.$newCurrentPath, $env{"form.mode"},$env{"form.fieldname"}).'/');
+ $r->print(&make_anchor($tree[$i],'/'.$newCurrentPath, $env{"form.mode"},$env{"form.fieldname"}, $env{"form.continue"}).'/');
}
}
$r->print('');
@@ -113,7 +132,7 @@ sub display_directory {
$r->print('