--- loncom/interface/portfolio.pm 2006/07/08 01:51:07 1.133
+++ loncom/interface/portfolio.pm 2006/07/18 02:20:19 1.135
@@ -1,7 +1,7 @@
# The LearningOnline Network
# portfolio browser
#
-# $Id: portfolio.pm,v 1.133 2006/07/08 01:51:07 raeburn Exp $
+# $Id: portfolio.pm,v 1.135 2006/07/18 02:20:19 banghart Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -128,6 +128,26 @@ TABLE
'this.form.submit();'));
$r->print("");
}
+sub display_directory_line {
+ my ($r,$select_mode,$fullpath, $filename, $mtime, $size, $css_class, $line, $access_controls, $curr_access,
+ $now, $version_flag, $href_location, $url, $current_path, $groupecho, $access_admin_text)=@_;
+ # my ($filename,$dom,undef,$testdir,undef,undef,undef,undef,$size,undef,$mtime,undef,undef,undef,$obs,undef)=split(/\&/,$line,16);
+ $r->print('
');
+ $r->print($line);
+ $r->print(' | ');
+ $r->print(''.$$version_flag{$filename}.''.
+ $filename.' | ');
+ $r->print(''.$size.' | ');
+ $r->print(''.&Apache::lonlocal::locallocaltime($mtime).' | ');
+ if ($select_mode ne 'true') {
+ $r->print(''.
+ &mt($curr_access).' ');
+ $r->print(''.$access_admin_text.' | ');
+ }
+ $r->print('
'.$/);
+}
sub display_directory {
my ($r,$url,$current_path,$is_empty,$dir_list,$group,$can_upload,
$can_modify,$can_delete,$can_setacl)=@_;
@@ -214,7 +234,11 @@ sub display_directory {
$show_versions = 'true';
}
if (exists($versioned{$filename})) {
- $version_flag{$filename} = '';
+ if ($show_versions) {
+ $version_flag{$filename} = '';
+ } else {
+ $version_flag{$filename} = '';
+ }
} else {
$version_flag{$filename} = '';
}
@@ -260,8 +284,6 @@ sub display_directory {
$line .= '';
}
}
- $r->print('');
- $r->print($line);
my $curr_access;
if ($select_mode ne 'true') {
my $pub_access = 0;
@@ -295,19 +317,28 @@ sub display_directory {
$curr_access = join('+ ',@allaccesses);
}
}
- $r->print(' | ');
- $r->print(''.$version_flag{$filename}.''.
- $filename.' | ');
- $r->print(''.$size.' | ');
- $r->print(''.&Apache::lonlocal::locallocaltime($mtime).' | ');
- if ($select_mode ne 'true') {
- $r->print(''.
- &mt($curr_access).' ');
- $r->print(''.$access_admin_text.' | ');
+ &display_directory_line($r,$select_mode,$fullpath, $filename, $mtime, $size, $css_class, $line, \%access_controls, $curr_access,
+ $now, \%version_flag, $href_location, $url, $current_path, $groupecho, $access_admin_text);
+# $r->print('
');
+# $r->print($line);
+# $r->print(' | ');
+# $r->print(''.$version_flag{$filename}.''.
+# $filename.' | ');
+# $r->print(''.$size.' | ');
+# $r->print(''.&Apache::lonlocal::locallocaltime($mtime).' | ');
+# if ($select_mode ne 'true') {
+# $r->print(''.
+# &mt($curr_access).' ');
+# $r->print(''.$access_admin_text.' | ');
+# }
+# $r->print('
'.$/);
+ if ($show_versions) {
+ &display_directory_line($r,$select_mode,$fullpath, $css_class, $line, \%access_controls,
+ $now, \%version_flag, $href_location, $url, $current_path, $groupecho, $access_admin_text);
+
}
- $r->print(''.$/);
}
}
}