--- loncom/interface/londocs.pm 2012/12/13 02:45:27 1.484.2.15 +++ loncom/interface/londocs.pm 2012/12/13 03:59:56 1.484.2.16 @@ -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 @@ sub editor { &Apache::lonhtmlcommon::add_item_funclist( ''. - ''.$funcname.''. + ''.$funcname.''. ''.$funcname.''). &Apache::lonhtmlcommon::end_funclist())); } @@ -2163,9 +2163,13 @@ sub entryline { $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 @@ sub entryline { $nocopy=1; } } - my $copylink=' '; - my $cutlink=' '; - my $removelink=' '; + my ($copylink,$cutlink,$removelink,$renamelink); my $skip_confirm = 0; if ( $folder =~ /^supplemental/ @@ -2281,26 +2283,40 @@ sub entryline { |/aboutme$ |/navmaps$ |/bulletinboard$ - |\.html$ - |^/adm/wrapper/ext)}x)) { + |\.html$)}x) + || $isexternal) { $skip_confirm = 1; } - - if (!$nocopy) { - $copylink=(<$lt{'cp'} +ENDCOPY + } else { + $copylink=(<$lt{'cp'} ENDCOPY } - if (!$nocut) { - $cutlink=(<$lt{'ct'} +ENDCUT + } else { + $cutlink=(<$lt{'ct'} ENDCUT } - if (!$noremove) { + if ($noremove) { + $removelink=(<$lt{'rm'} +ENDREM + } else { $removelink=(<$lt{'rm'} ENDREM } + $renamelink=(<$lt{'rn'} +ENDREN $form_start = '
'; @@ -2330,11 +2346,12 @@ END $selectbox $form_end - + $removelink +$renamelink $cutlink - $lt{'rn'} $copylink + END