--- loncom/interface/lonindexer.pm 2003/09/27 13:20:46 1.78
+++ loncom/interface/lonindexer.pm 2003/12/22 18:58:26 1.82
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Directory Indexer
#
-# $Id: lonindexer.pm,v 1.78 2003/09/27 13:20:46 www Exp $
+# $Id: lonindexer.pm,v 1.82 2003/12/22 18:58:26 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -83,6 +83,20 @@ my @Only = ();
my @Omit = ();
+# ------------------------------------------------------- Puts directory header
+
+sub crumbs {
+ my $uri=shift;
+ my $output='
/';
+ my $path='/';
+ foreach (split('/',$uri)) {
+ unless ($_) { next; }
+ $path.=$_.'/';
+ $output.=''.$_.'/';
+ }
+ return $output.'
';
+}
+
# ----------------------------- Handling routine called via Apache and mod_perl
sub handler {
my $r = shift;
@@ -118,7 +132,7 @@ sub handler {
# Get the parameters from the query string
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
['catalogmode','launch','acts','mode','form','element',
- 'only','omit']);
+ 'only','omit','titleelement']);
#-------------------------------------------------------------------
my $closebutton='';
my $groupimportbutton='';
@@ -179,11 +193,12 @@ END
# $element is the name of the element in $formname which receives
# the URL.
# &Apache::lonxml::debug('Checking mode, form, element');
- &setvalues(\%hash,'form.mode' ,\%ENV,'form.mode' );
- &setvalues(\%hash,'form.form' ,\%ENV,'form.form' );
- &setvalues(\%hash,'form.element',\%ENV,'form.element');
- &setvalues(\%hash,'form.only' ,\%ENV,'form.only' );
- &setvalues(\%hash,'form.omit' ,\%ENV,'form.omit' );
+ &setvalues(\%hash,'form.mode' ,\%ENV,'form.mode' );
+ &setvalues(\%hash,'form.form' ,\%ENV,'form.form' );
+ &setvalues(\%hash,'form.element' ,\%ENV,'form.element');
+ &setvalues(\%hash,'form.titleelement',\%ENV,'form.titleelement');
+ &setvalues(\%hash,'form.only' ,\%ENV,'form.only' );
+ &setvalues(\%hash,'form.omit' ,\%ENV,'form.omit' );
# Deal with 'omit' and 'only'
if (exists $ENV{'form.omit'}) {
@@ -194,12 +209,14 @@ END
}
my $mode = $ENV{'form.mode'};
- my ($form,$element);
+ my ($form,$element,$titleelement);
if ($mode eq 'edit' || $mode eq 'parmset') {
- $form = $ENV{'form.form'};
- $element = $ENV{'form.element'};
+ $form = $ENV{'form.form'};
+ $element = $ENV{'form.element'};
+ $titleelement = $ENV{'form.titleelement'};
}
- &Apache::lonxml::debug("mode=$mode form=$form element=$element");
+ &Apache::lonxml::debug("mode=$mode form=$form element=$element
+ titleelement=$titleelement");
# ------ set catalogmodefunctions to have extra needed javascript functionality
my $catalogmodefunctions='';
if ($ENV{'form.catalogmode'} eq 'interactive' or
@@ -248,6 +265,7 @@ END
// mode = $mode
function select_data(title,url) {
changeURL(url);
+ changeTitle(title);
self.close();
}
@@ -262,8 +280,20 @@ function changeURL(val) {
alert("The file you selected is: "+val);
}
}
-
END
+ if (!$titleelement) {
+ $catalogmodefunctions.='function changeTitle(val) {}';
+ } else {
+ $catalogmodefunctions.=<print(&Apache::loncommon::bodytag('B
'av' => 'All versions',
'ud' => 'Update Display'
);
+ my $Displayfileattributes=&mt('Display file attributes');
$r->print(<
-Display file attributes
+$Displayfileattributes