[LON-CAPA-cvs] cvs: loncom /interface lonhtmlcommon.pm lonsearchcat.pm
www
lon-capa-cvs@mail.lon-capa.org
Tue, 13 Jun 2006 14:42:25 -0000
www Tue Jun 13 10:42:25 2006 EDT
Modified files:
/loncom/interface lonhtmlcommon.pm lonsearchcat.pm
Log:
Jumping from Search to Import: clicking on filename in crumbs makes no sense
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.131 loncom/interface/lonhtmlcommon.pm:1.132
--- loncom/interface/lonhtmlcommon.pm:1.131 Thu Jun 1 15:30:49 2006
+++ loncom/interface/lonhtmlcommon.pm Tue Jun 13 10:42:24 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.131 2006/06/01 19:30:49 albertel Exp $
+# $Id: lonhtmlcommon.pm,v 1.132 2006/06/13 14:42:24 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -948,7 +948,7 @@
# ------------------------------------------------------- Puts directory header
sub crumbs {
- my ($uri,$target,$prefix,$form,$size,$noformat)=@_;
+ my ($uri,$target,$prefix,$form,$size,$noformat,$skiplast)=@_;
if (! defined($size)) {
$size = '+2';
}
@@ -964,7 +964,14 @@
foreach my $dir (split('/',$uri)) {
if (! $dir) { next; }
$path .= $dir;
- unless ($path eq $uri) { $path.='/'; }
+ if ($path eq $uri) {
+ if ($skiplast) {
+ $output.=$dir;
+ last;
+ }
+ } else {
+ $path.='/';
+ }
my $linkpath = &Apache::loncommon::escape_single($path);
if ($form) {
$linkpath=
Index: loncom/interface/lonsearchcat.pm
diff -u loncom/interface/lonsearchcat.pm:1.268 loncom/interface/lonsearchcat.pm:1.269
--- loncom/interface/lonsearchcat.pm:1.268 Thu Jun 8 12:58:56 2006
+++ loncom/interface/lonsearchcat.pm Tue Jun 13 10:42:24 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Search Catalog
#
-# $Id: lonsearchcat.pm,v 1.268 2006/06/08 16:58:56 www Exp $
+# $Id: lonsearchcat.pm,v 1.269 2006/06/13 14:42:24 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3283,7 +3283,7 @@
&Apache::lonhtmlcommon::crumbs($item,
(($env{'form.catalogmode'} eq 'import')?'_top':'preview'),
'/res',
- (($env{'form.catalogmode'} eq 'import')?'parent.statusframe.document.forms.statusform':''),1);
+ (($env{'form.catalogmode'} eq 'import')?'parent.statusframe.document.forms.statusform':''),2,0,1);
}
} elsif (exists($field->{'format'}) && $field->{'format'} ne ''){
$result.= &mt($field->{'translate'},
@@ -3295,7 +3295,7 @@
&Apache::lonhtmlcommon::crumbs($jumpurl,
(($env{'form.catalogmode'} eq 'import')?'_top':'preview'),
'',
- (($env{'form.catalogmode'} eq 'import')?'parent.statusframe.document.forms.statusform':''),1);
+ (($env{'form.catalogmode'} eq 'import')?'parent.statusframe.document.forms.statusform':''),3,0,1);
} else {
$result.= &mt($field->{'translate'},
$values{$field->{'name'}});
@@ -3355,7 +3355,7 @@
my $link=&Apache::lonhtmlcommon::crumbs($jumpurl,
(($env{'form.catalogmode'} eq 'import')?'_top':'preview'),
'',
- (($env{'form.catalogmode'} eq 'import')?'parent.statusframe.document.forms.statusform':''),1);
+ (($env{'form.catalogmode'} eq 'import')?'parent.statusframe.document.forms.statusform':''),2,0,1);
$result.=<<END;
<a href="$jumpurl"
@@ -3396,7 +3396,7 @@
my $link=&Apache::lonhtmlcommon::crumbs($jumpurl,
(($env{'form.catalogmode'} eq 'import')?'_top':'preview'),
'',
- (($env{'form.catalogmode'} eq 'import')?'parent.statusframe.document.forms.statusform':''),1);
+ (($env{'form.catalogmode'} eq 'import')?'parent.statusframe.document.forms.statusform':''),1,1,1).' ';
my $result =
$prefix.'<img src="'.&Apache::loncommon::icon($values{'url'}).'">';
if (exists($env{'form.sortfield'}) &&