\n");
+ $r->print("\n");
+ $r->print("".&mt('Name')." | \n");
+ $r->print("".&mt('Title')." | \n")
+ if ($hash{'display_attrs_0'} == 1);
+ $r->print("".&mt("Size")." (".&mt("bytes").") ".
+ " | \n") if ($hash{'display_attrs_1'} == 1);
+ $r->print("".&mt("Last accessed")." | \n")
+ if ($hash{'display_attrs_2'} == 1);
+ $r->print("".&mt("Last modified")." | \n")
+ if ($hash{'display_attrs_3'} == 1);
+ $r->print("".&mt("Author(s)")." | \n")
+ if ($hash{'display_attrs_4'} == 1);
+ $r->print("".&mt("Keywords")." | \n")
+ if ($hash{'display_attrs_5'} == 1);
+ $r->print("".&mt("Language")." | \n")
+ if ($hash{'display_attrs_6'} == 1);
+ $r->print("".&mt("Resource")." | \n")
+ if ($hash{'display_attrs_7'} == 1);
+ $r->print("".&mt("Usage Statistics")." (".
+ &mt("Courses/Network Hits").") | \n")
+ if ($hash{'display_attrs_8'} == 1);
+ $r->print(' ');
+
+# ----------------- read in what directories have previously been set to "open"
+ foreach (keys %hash) {
+ if ($_ =~ /^diropen_status_/) {
+ my $key = $_;
+ $key =~ s/^diropen_status_//;
+ $dirs{$key} = $hash{$_};
+ }
+ }
- $r->print("\n");
- $r->print("\n");
- $r->print("Name | \n");
- $r->print("Size (bytes) | \n") if ($ENV{'form.attr0'} == 1);
- $r->print("Last accessed | \n") if ($ENV{'form.attr1'} == 1);
- $r->print("Last modified | \n") if ($ENV{'form.attr2'} == 1);
- $r->print(" ");
-
- if ($ENV{'form.openuri'} =~ /$uri\&/) {
- my @pathcom = split(/\//,$uri);
- pop @pathcom;
- my $splituri = join ('/',@pathcom);
- $uri = join ('',$splituri,"/");
- }
+ if ($ENV{'form.openuri'}) { # take care of review and refresh options
+ my $uri=$ENV{'form.openuri'};
+ if (exists($hash{'diropen_status_'.$uri})) {
+ my $cursta = $hash{'diropen_status_'.$uri};
+ $dirs{$uri} = 'open';
+ $hash{'diropen_status_'.$uri} = 'open';
+ if ($cursta eq 'open') {
+ $dirs{$uri} = 'closed';
+ $hash{'diropen_status_'.$uri} = 'closed';
+ }
+ } else {
+ $hash{'diropen_status_'.$uri} = 'open';
+ $dirs{$uri} = 'open';
+ }
+ }
+
+ my $bredir = $ENV{'form.dirPointer'};
+ my $toplevel;
+ my $indent = 0;
+ $uri = $uri.'/' if $uri !~ /.*\/$/;
+
+ if ($bredir ne 'on') {
+ $hash{'top.level'} = $uri;
+ $toplevel = $uri;
+ } else {
+ $toplevel = $hash{'top.level'};
+ }
- my $openuri = $ENV{'form.openuri'};
-# $r->print (" openuri=$openuri ");
- $openuri =~ s/$uri(.*)\&//g;
-# $r->print (" parsed openuri=$openuri ");
- @openpath = split(/\&/,$openuri);
-# $r->print (" open path=@openpath ");
- push @openpath, $uri;
-# $r->print (" append current uri to open path=@openpath ");
- @openpath = sort @openpath;
-# $r->print (" sorted open path=@openpath ");
-
-
- my $indent = -1;
- &display_line ($r,1,"/res/".$domain."&domain");
- &branch ($r,"/res/".$domain."/",$indent,@openpath);
-
- $r->print(" ");
- $r->print(" | ");
- $r->print("
|