[LON-CAPA-cvs] cvs: loncom /interface londocs.pm
www
lon-capa-cvs@mail.lon-capa.org
Fri, 05 Jan 2007 19:40:43 -0000
www Fri Jan 5 14:40:43 2007 EDT
Modified files:
/loncom/interface londocs.pm
Log:
You actually can "cut" a folder that includes folders
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.267 loncom/interface/londocs.pm:1.268
--- loncom/interface/londocs.pm:1.267 Fri Jan 5 13:45:40 2007
+++ loncom/interface/londocs.pm Fri Jan 5 14:40:43 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.267 2007/01/05 18:45:40 www Exp $
+# $Id: londocs.pm,v 1.268 2007/01/05 19:40:43 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1695,6 +1695,7 @@
'rn' => 'Rename',
'cp' => 'Copy');
my $nocopy=0;
+ my $nocut=0;
if ($url=~/\.(page|sequence)$/) {
foreach (&Apache::lonsequence::attemptread(&Apache::lonnet::filelocation('',$url))) {
my ($title,$url,$ext,$type)=split(/\:/,$_);
@@ -1704,15 +1705,20 @@
}
}
}
- if ($url=~/^\/res\/lib\/templates\//) { $nocopy=1; }
+ if ($url=~/^\/res\/lib\/templates\//) {
+ $nocopy=1;
+ $nocut=1;
+ }
my $copylink=' ';
my $cutlink=' ';
if ($env{'form.pagepath'}) {
- unless ($nocopy) {
+ if (!$nocopy) {
$copylink=(<<ENDCOPY);
<a href='javascript:markcopy("$pagepath","$index","$renametitle","page","$pagesymb");'>
<font size="-2" color="#000099">$lt{'cp'}</font></a></td>
ENDCOPY
+ }
+ if (!$nocut) {
$cutlink=(<<ENDCUT);
<a href='javascript:cutres("$pagepath","$index","$renametitle","page","$pagesymb");'>
<font size="-2" color="#550044">$lt{'ct'}</font></a>
@@ -1744,11 +1750,13 @@
$copylink
END
} else {
- unless ($nocopy) {
+ if (!$nocopy) {
$copylink=(<<ENDCOPY);
<a href='javascript:markcopy("$folderpath","$index","$renametitle","sequence");'>
<font size="-2" color="#000099">$lt{'cp'}</font></a></td>
ENDCOPY
+ }
+ if (!$nocut) {
$cutlink=(<<ENDCUT);
<a href='javascript:cutres("$folderpath","$index","$renametitle","sequence");'>
<font size="-2" color="#550044">$lt{'ct'}</font></a>