[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface londocs.pm
raeburn
raeburn at source.lon-capa.org
Wed Dec 12 22:59:56 EST 2012
raeburn Thu Dec 13 03:59:56 2012 EDT
Modified files: (Branch: version_2_11_X)
/loncom/interface londocs.pm
Log:
- For 2.11
- Backport 1.505, 1.506, 1.507
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.484.2.15 loncom/interface/londocs.pm:1.484.2.16
--- loncom/interface/londocs.pm:1.484.2.15 Thu Dec 13 02:45:27 2012
+++ loncom/interface/londocs.pm Thu Dec 13 03:59:56 2012
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.484.2.15 2012/12/13 02:45:27 raeburn Exp $
+# $Id: londocs.pm,v 1.484.2.16 2012/12/13 03:59:56 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1961,7 +1961,7 @@
&Apache::lonhtmlcommon::add_item_funclist(
'<a href="/adm/coursedocs?command=direct&forcesupplement=1&'.
'supppath='.&HTML::Entities::encode($env{'form.folderpath'}).'">'.
- '<img src="/res/adm/pages/docs.png" alt="'.$funcname.'" class="LC_icon" />'.
+ '<img src="/res/adm/pages/docs-22x22.png" alt="'.$funcname.'" class="LC_icon" />'.
'<span class="LC_menubuttons_inline_text">'.$funcname.'</span></a>').
&Apache::lonhtmlcommon::end_funclist()));
}
@@ -2163,9 +2163,13 @@
$esc_path=&escape($env{'form.pagepath'});
$path = &HTML::Entities::encode($env{'form.pagepath'},'<>&"');
}
+ my $isexternal;
if (!$supplementalflag && $residx) {
my $currurl = $url;
$currurl =~ s{^http(|s)(:|:)//}{/adm/wrapper/ext/};
+ if ($currurl =~ m{^/adm/wrapper/ext/}) {
+ $isexternal = 1;
+ }
my $path = 'uploaded/'.
$env{'course.'.$env{'request.course.id'}.'.domain'}.'/'.
$env{'course.'.$env{'request.course.id'}.'.num'}.'/';
@@ -2270,9 +2274,7 @@
$nocopy=1;
}
}
- my $copylink=' ';
- my $cutlink=' ';
- my $removelink=' ';
+ my ($copylink,$cutlink,$removelink,$renamelink);
my $skip_confirm = 0;
if ( $folder =~ /^supplemental/
@@ -2281,26 +2283,40 @@
|/aboutme$
|/navmaps$
|/bulletinboard$
- |\.html$
- |^/adm/wrapper/ext)}x)) {
+ |\.html$)}x)
+ || $isexternal) {
$skip_confirm = 1;
}
-
- if (!$nocopy) {
- $copylink=(<<ENDCOPY);
+ if ($nocopy) {
+ $copylink=(<<ENDCOPY);
+<span style="visibility: hidden;">$lt{'cp'}</span>
+ENDCOPY
+ } else {
+ $copylink=(<<ENDCOPY);
<a href="javascript:markcopy('$esc_path','$index','$renametitle','$container','$symb','$folder');" class="LC_docs_copy">$lt{'cp'}</a>
ENDCOPY
}
- if (!$nocut) {
- $cutlink=(<<ENDCUT);
+ if ($nocut) {
+ $cutlink=(<<ENDCUT);
+<span style="visibility: hidden;">$lt{'ct'}</span>
+ENDCUT
+ } else {
+ $cutlink=(<<ENDCUT);
<a href="javascript:cutres('$esc_path','$index','$renametitle','$container','$symb','$folder',$skip_confirm);" class="LC_docs_cut">$lt{'ct'}</a>
ENDCUT
}
- if (!$noremove) {
+ if ($noremove) {
+ $removelink=(<<ENDREM);
+<span style="visibility: hidden;">$lt{'rm'}</a>
+ENDREM
+ } else {
$removelink=(<<ENDREM);
<a href='javascript:removeres("$esc_path","$index","$renametitle","$container","$symb",$skip_confirm);' class="LC_docs_remove">$lt{'rm'}</a>
ENDREM
}
+ $renamelink=(<<ENDREN);
+<a href='javascript:changename("$esc_path","$index","$renametitle","$container","$symb");' class="LC_docs_rename">$lt{'rn'}</a>
+ENDREN
$form_start = '
<form action="/adm/coursedocs" method="post">
';
@@ -2330,11 +2346,12 @@
$selectbox
$form_end
</td>
-<td class="LC_docs_entry_commands">
+<td class="LC_docs_entry_commands"><span class="LC_nobreak">
$removelink
+$renamelink
$cutlink
- <a href='javascript:changename("$esc_path","$index","$renametitle","$container","$symb");' class="LC_docs_rename">$lt{'rn'}</a>
$copylink
+</span>
</td>
END
More information about the LON-CAPA-cvs
mailing list