'.
- 'Actions | | Name | Size | Last Modified | Current Access Status |
');
+ 'Actions | | | Name | Size | Last Modified | Current Access Status |
');
}
$r->print("\n".&group_form_data()."\n");
@@ -249,13 +268,21 @@ sub display_directory {
$show_versions = 'true';
}
if (exists($versioned{$filename})) {
+ my %anchor_fields = (
+ 'selectfile' => $filename,
+ 'continue' => 'false',
+ 'currentpath' => $current_path,
+ );
if ($show_versions) {
- $version_flag{$filename} = '
';
+ $version_flag{$filename} = &make_anchor('portfolio',\%anchor_fields,
+ '
');
} else {
- $version_flag{$filename} = '
';
+ $anchor_fields{'showversions'} = $filename;
+ $version_flag{$filename} = &make_anchor('portfolio',\%anchor_fields,
+ '
');
}
} else {
- $version_flag{$filename} = '';
+ $version_flag{$filename} = ' ';
}
if ($dirptr&$testdir) {
my $colspan='colspan="2"';
@@ -264,7 +291,14 @@ sub display_directory {
}
$r->print(' | ');
$r->print('Go to ... | ');
- $r->print(''.$version_flag{$filename}.&make_anchor($url,$filename.'/',$current_path.$filename.'/',$env{'form.mode'},$env{"form.fieldname"},$env{'form.continue'}).'/ | ');
+ my %anchor_fields = (
+ 'selectfile' => $filename.'/',
+ 'currentpath' => $current_path.$filename.'/',
+ 'mode' => $env{"form.mode"},
+ 'fieldname' => $env{"form.fieldname"},
+ 'continue' => $env{"form.continue"}
+ );
+ $r->print(''.$version_flag{$filename}.' | '.&make_anchor($url,\%anchor_fields,$filename.'/').' | ');
$r->print('
');
} else {
my $css_class = 'LC_browser_file';
@@ -279,7 +313,10 @@ sub display_directory {
$line.=' />';
} else {
if (exists $locked_files{$fullpath}) {
- $line.='Locked | ';
+ my %anchor_fields = (
+ 'lockinfo' => $current_path.$filename
+ );
+ $line.=''.&make_anchor($url,\%anchor_fields,'Locked').' | ';
$css_class= 'LC_browser_file_locked';
} else {
if (!$can_modify) {
@@ -291,10 +328,15 @@ sub display_directory {
$line .= '';
}
if ($can_modify) {
- my $cat='
';
- $line .= 'Rename';
- $line .= ''.$version_flag{$filename}.''.$cat.'';
+ my %anchor_fields = (
+ 'rename' => $filename,
+ currentpath => $current_path
+ );
+ $line .= &make_anchor($url,\%anchor_fields,'Rename');
+ $line .= ' | '.&make_anchor($href_edit_location.$filename.'.meta',undef,$cat);
+ # ''.$cat.'';
}
$line .= ' | ';
}
@@ -1476,6 +1518,7 @@ sub upload {
}
}
$fname=&Apache::lonnet::clean_filename($fname);
+
my $portfolio_root=&get_portfolio_root();
my ($uname,$udom) = &get_name_dom();
my $port_path = &get_port_path();
@@ -1595,10 +1638,7 @@ sub createdir {
}
sub get_portfolio_root {
- my ($udom,$uname) = @_;
- if (!defined($uname) || !defined($udom)) {
- ($uname,$udom) = &get_name_dom();
- }
+ my ($uname,$udom) = &get_name_dom();
my $path;
if (defined($env{'form.group'})) {
$path = '/userfiles/groups/'.$env{'form.group'}.'/portfolio';