[LON-CAPA-cvs] cvs: loncom /interface lonmeta.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 19 Dec 2005 21:56:10 -0000
albertel Mon Dec 19 16:56:10 2005 EDT
Modified files:
/loncom/interface lonmeta.pm
Log:
- add a return button
- elminate the filename for the linked paths
Index: loncom/interface/lonmeta.pm
diff -u loncom/interface/lonmeta.pm:1.146 loncom/interface/lonmeta.pm:1.147
--- loncom/interface/lonmeta.pm:1.146 Mon Dec 19 16:49:12 2005
+++ loncom/interface/lonmeta.pm Mon Dec 19 16:56:07 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Metadata display handler
#
-# $Id: lonmeta.pm,v 1.146 2005/12/19 21:49:12 albertel Exp $
+# $Id: lonmeta.pm,v 1.147 2005/12/19 21:56:07 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -295,11 +295,13 @@
my $result = &Apache::portfolio::make_anchor('portfolio','/');
my $fullpath = '/';
my (undef,@tree) = split('/',$path);
+ my $filename = pop(@tree);
foreach my $dir (@tree) {
$fullpath .= $dir.'/';
$result .= '/';
$result .= &Apache::portfolio::make_anchor($dir,$fullpath);
}
+ $result .= "/$filename";
return $result;
}
@@ -1069,8 +1071,9 @@
$disuri=~s/^\/\~/\/priv\//;
$disuri=~s/\.meta$//;
my $meta_uri = $disuri;
+ my $path;
if ($disuri =~ m|/portfolio/|) {
- ($disuri, $meta_uri) = &portfolio_display_uri($disuri,1);
+ ($disuri, $meta_uri, $path) = &portfolio_display_uri($disuri,1);
}
my $target=$uri;
$target=~s/^\/\~/\/res\/$env{'request.role.domain'}\//;
@@ -1256,7 +1259,12 @@
$r->print($output.'<br /><input type="submit" name="store" value="'.
&mt('Store Catalog Information').'">');
-
+
+ $r->print('</form>
+ <br /><br /><form method="POST" action="/adm/portfolio">'.
+ '<input type="hidden" name="currentpath" value="'.$path.'" />'.
+ '<input type="submit" name="cancel" value="'.&mt('Discard Edits and Return to Portfolio').'">');
+
}
$r->print('</form>');