--- loncom/interface/londocs.pm 2012/11/29 20:37:07 1.511 +++ loncom/interface/londocs.pm 2012/12/02 22:40:09 1.518 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.511 2012/11/29 20:37:07 raeburn Exp $ +# $Id: londocs.pm,v 1.518 2012/12/02 22:40:09 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2142,7 +2142,7 @@ sub entryline { &Apache::lonnet::declutter($currurl)); } } - my %lt; + my ($renamelink,%lt); if ($allowed) { my $incindex=$index+1; my $selectbox=''; @@ -2239,7 +2239,7 @@ sub entryline { $nocopy=1; } } - my ($copylink,$cutlink,$removelink,$renamelink); + my ($copylink,$cutlink,$removelink); my $skip_confirm = 0; if ( $folder =~ /^supplemental/ || ($url =~ m{( /smppg$ @@ -2279,9 +2279,11 @@ ENDREM $lt{'rm'} ENDREM } - $renamelink=(<$lt{'rn'} ENDREN + } $form_start = '
'; @@ -2313,7 +2315,6 @@ END $removelink -$renamelink $cutlink $copylink @@ -2353,7 +2354,7 @@ END } } - my $editlink; + my ($editlink,$extresform); my $orig_url = $url; $orig_url=~s{http(:|:)//https(:|:)//}{https$2//}; $url=~s{^http(|s)(:|:)//}{/adm/wrapper/ext/}; @@ -2451,7 +2452,7 @@ $form_common.' my $fileloc = &Apache::lonnet::declutter(&Apache::lonnet::filelocation('',$orig_url)); if ($isexternal) { - $editlink = ' '. + ($editlink,$extresform) = &Apache::lonextresedit::extedit_form(0,$residx,$orig_url,$title,$pathitem); } elsif (!$isfolder && !$ispage) { my ($cfile,$home,$switchserver,$forceedit,$forceview) = @@ -2465,8 +2466,8 @@ $form_common.' &escape($env{'form.folderpath'}), $renametitle); if ($jscall) { - $editlink = ' '.&mt('Edit').''; + $editlink = ''.&mt('Edit').' '."\n"; } } } @@ -2477,7 +2478,7 @@ $form_common.' } else { $reinit = &mt('(re-initialize course to access)'); } - $line.=''; + $line.=''.$editlink.$renamelink; if (($url=~m{/adm/(coursedocs|supplemental)}) || (!$allowed && $url)) { $line.=''; } elsif ($url) { @@ -2486,7 +2487,7 @@ $form_common.' } else { $line.=''; } - $line.=''; + $line.=''; if (($url=~m{/adm/(coursedocs|supplemental)}) || (!$allowed && $url)) { $line.=''.$title.''; } elsif ($url) { @@ -2495,7 +2496,7 @@ $form_common.' } else { $line.=$title.' '.$reinit.''; } - $line.=$editlink.""; + $line.="$extresform"; $rand_pick_text = ' ' if ($rand_pick_text eq ''); $rand_order_text = ' ' if ($rand_order_text eq ''); if (($allowed) && ($folder!~/^supplemental/)) { @@ -3292,7 +3293,7 @@ sub handler { if ($mapurl eq 'default') { $maptitle = 'Main Course Documents'; } - $path .= ($path ne '')? '&' : ''. + $path .= (($path ne '')? '&' : ''). &Apache::lonhtmlcommon::entity_encode($mapurl).'&'. &Apache::lonhtmlcommon::entity_encode($maptitle). ':'.$mapresobj->randompick(). @@ -3596,10 +3597,6 @@ sub handler { 'prev' => 'Preview', 'lnk' => 'Add Link', 'parse' => 'Upload embedded images/multimedia files if HTML file', - 'nd' => 'Upload Document', - 'pm' => 'Published Map', - 'sd' => 'Special Document', - 'mo' => 'More Options', ); # ----------------------------------------------------------------------------- my $fileupload=(< $lt{'imsf'} $help{'Importing_IMS_Course'} -