--- loncom/publisher/lonpubdir.pm 2005/05/28 02:18:03 1.82 +++ loncom/publisher/lonpubdir.pm 2005/07/14 18:27:35 1.87 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Construction Space Directory Lister # -# $Id: lonpubdir.pm,v 1.82 2005/05/28 02:18:03 www Exp $ +# $Id: lonpubdir.pm,v 1.87 2005/07/14 18:27:35 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -111,7 +111,7 @@ sub handler { ''.&mt('Title').''. ''.&mt('Status').''. ''.&mt('Last Modified'). - ''); + ''."\n"); my $filename; my $dirptr=16384; # Mask indicating a directory in stat.cmode. @@ -319,21 +319,53 @@ ENDPUBDIRSCRIPT sub dircontrols { my ($r,$uname,$udom,$thisdisfn) = @_; + my %lt=&Apache::lonlocal::texthash( + cnpd => 'Cannot publish directory', + cnrd => 'Cannot retrieve directory', + mcdi => 'Must create new subdirectory inside a directory', + pubr => 'Publish this Resource', + pubd => 'Publish this Directory', + rtrv => 'Retrieve Old Version', + pubs => 'Publish with Subdirectories', + list => 'List Directory', + uplo => 'Upload file', + dele => 'Delete', + edit => 'Edit Catalog Information', + sela => 'Select Action', + nfil => 'New file', + nhtm => 'New HTML file', + nprb => 'New problem', + npag => 'New assembled page', + nseq => 'New assembled sequence', + ncrf => 'New custom rights file', + nsty => 'New style file', + nlib => 'New library file', + nsub => 'New subdirectory', + renm => 'Rename current file to', + move => 'Move current file to', + copy => 'Copy current file to', + type => 'Type Name Here', + go => 'Go', + prnt => 'Print contents of directory', + crea => 'Create a new directory or LON-CAPA document', + acti => 'Actions for current directory', + updc => 'Upload a new document' + ); $r->print(< - Actions for current directory - Upload a new document - Create a new directory or LON-CAPA document + $lt{'acti'} + $lt{'updc'} + $lt{'crea'}
- + + + +
@@ -349,23 +381,24 @@ sub dircontrols {
- +
- + + + + + + + + + +   
@@ -381,7 +414,7 @@ sub pubbuttons { '
'. ''. -'
'); } @@ -480,15 +513,14 @@ sub putdirectory { $actionitem = '
'. - ''. ''. ''. ''. - ''. ''. ''. ''. - ''. + ''. ''. ''. '
'; @@ -496,9 +528,9 @@ sub putdirectory { } $r->print(''. ''. + $Apache::lonnet::perlvar{'lonIconsURL'}.'/folder_closed.gif" alt="folder" />'. ''.$actionitem.''. - ''. + ''. $disfilename.''. ''.($kaputt?&Apache::lonhtmlcommon::authorbombs($resdir.'/'.$disfilename.'/'):'').$Apache::lonpublisher::metadatafields{'title'}.' '. $Apache::lonpublisher::metadatafields{'subject'}.' '. @@ -564,7 +596,7 @@ sub putresource { } } $title.="\n".'
'. - ($$bombs{$targetdir.'/'.$filename}?'':'Edit Metadata').''; + ($$bombs{$targetdir.'/'.$filename}?'bomb':'Edit Metadata').''; $status.="\n".'
'.&mt('Retrieve').''; } @@ -578,8 +610,8 @@ sub putresource { $editlink2='
('.&mt('Edit').')'; } if ($filename=~/\.(problem|exam|quiz|assess|survey|form|library|xml|html|htm|xhtml|xhtm|sty)$/) { - $editlink.=''.&mt('Clean Up').''; + $editlink.=' ('.&mt('Clean Up').')'; } if ($filename=~/\.(zip|tar|bz2|gz|tar.gz|tar.bz2|tgz)$/) { $editlink=' ('. ''.($filename=~/[\#\~]$/?' ': - ''). + '').''. ''.$pub_select.''. ''. ''. @@ -606,7 +638,7 @@ sub create_pubselect { my ($r,$pub_select,$udom,$uname,$thisdisfn,$filename,$resdir,$pubstatus,$publish_button,$numres) = @_; $$pub_select = '
- '. ''; if ($pubstatus eq 'obsolete' || $pubstatus eq 'unpublished') { @@ -630,7 +662,7 @@ sub create_pubselect { ''. '
'; + &HTML::Entities::encode($uname.$thisdisfn.'/'.$filename,'<>&"').'" />'; $$numres ++; }