[LON-CAPA-cvs] cvs: loncom /publisher lonpubdir.pm

www lon-capa-cvs@mail.lon-capa.org
Thu, 23 Jun 2005 22:24:56 -0000


www		Thu Jun 23 18:24:56 2005 EDT

  Modified files:              
    /loncom/publisher	lonpubdir.pm 
  Log:
  * Was missing Library file option from lonpubmenu
  * Internationalized
  * Really, this should share subroutines with lonpubmenu - no time right now.
  
  
Index: loncom/publisher/lonpubdir.pm
diff -u loncom/publisher/lonpubdir.pm:1.83 loncom/publisher/lonpubdir.pm:1.84
--- loncom/publisher/lonpubdir.pm:1.83	Sat May 28 21:46:16 2005
+++ loncom/publisher/lonpubdir.pm	Thu Jun 23 18:24:54 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Construction Space Directory Lister
 #
-# $Id: lonpubdir.pm,v 1.83 2005/05/29 01:46:16 www Exp $
+# $Id: lonpubdir.pm,v 1.84 2005/06/23 22:24:54 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -319,21 +319,53 @@
 
 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(<<END);
         <table cellspacing="4" cellpadding="4" width="100%">
          <tr>
-          <td bgcolor="#DDDDDD" align="middle"><font face="Arial, Helvetica, sans-serif" size="-1"><b>Actions for current directory</b></font></td>
-          <td bgcolor="#DDDDDD" align="middle"><font face="Arial, Helvetica, sans-serif" size="-1"><b>Upload a new document</b></font></td>
-          <td bgcolor="#DDDDDD" align="middle"><font face="Arial, Helvetica, sans-serif" size="-1"><b>Create a new directory or LON-CAPA document</b></font></td>
+          <td bgcolor="#DDDDDD" align="middle"><font face="Arial, Helvetica, sans-serif" size="-1"><b>$lt{'acti'}</b></font></td>
+          <td bgcolor="#DDDDDD" align="middle"><font face="Arial, Helvetica, sans-serif" size="-1"><b>$lt{'updc'}</b></font></td>
+          <td bgcolor="#DDDDDD" align="middle"><font face="Arial, Helvetica, sans-serif" size="-1"><b>$lt{'crea'}</b></font></td>
         </tr>
         <tr>
          <td bgcolor="#ccddaa" valign="top" align="center">
           <form name="curractions" method="post" action="">
            <select name="dirtask" onChange="currdiract(this.form)">
-            <option>Select action</option>
-            <option value="publish">Publish directory</option>
-            <option value="editcat">Edit catalog information</option>
-            <option value="printdir">Print contents of directory</option>
+            <option>$lt{'sela'}</option>
+            <option value="publish">$lt{'pubd'}</option>
+            <option value="editcat">$lt{'edit'}</option>
+            <option value="printdir">$lt{'prnt'}</option>
            </select>
            <input type="hidden" name="filename" value="/~$uname$thisdisfn/" />
           </form>
@@ -349,23 +381,24 @@
 	    <form name="upublisher" enctype="multipart/form-data" method="post" action="/adm/upload" target="_parent">
 	      <input type="hidden" name="filename" value="/~$uname$thisdisfn/" />
 	      <input type="file" name="upfile" size="20" />
-	      <input type="button" value="Upload file"  onclick="checkUpload(this.form)" />
+	      <input type="button" value="$lt{'uplo'}"  onclick="checkUpload(this.form)" />
 	    </form>
 	 </td>
 	 <td bgcolor="#ccddaa" align="center">
 	    <form name="fileaction" method="post" action="/adm/cfile" target="_parent">
 	      <nobr>
 		<input type="hidden" name="filename" value="/~$uname$thisdisfn/" />
-		  <select name="action">
-		    <option>Select Action</option>
-		    <option value="newfile">New file:</option>
-		    <option value="newhtmlfile">New HTML file:</option>
-		    <option value="newproblemfile">New problem:</option>
-                    <option value="newpagefile">New assembled page:</option>
-                    <option value="newsequencefile">New assembled sequence:</option>
-                    <option value="newrightsfile">New custom rights file:</option>
-                    <option value="newstyfile">New style file:</option>
-		    <option value="newdir">New subdirectory:</option>
+			  <select name="action">
+			    <option value="Select Action">$lt{'sela'}</option>
+			    <option value="newfile">$lt{'nfil'}:</option>
+			    <option value="newhtmlfile">$lt{'nhtm'}:</option>
+			    <option value="newproblemfile">$lt{'nprb'}:</option>
+                            <option value="newpagefile">$lt{'npag'}:</option>
+                            <option value="newsequencefile">$lt{'nseq'}:</option>
+                            <option value="newrightsfile">$lt{'ncrf'}:</option>
+                            <option value="newstyfile">$lt{'nsty'}:</option>
+                            <option value="newlibraryfile">$lt{'nlib'}:</option>
+			    <option value="newdir">$lt{'nsub'}:</option>
 		  </select>&nbsp;<input type="text" name="newfilename" value="Type Name Here" onfocus="if (this.value == 'Type Name Here') this.value=''" />&nbsp;<input type="button" value="Go" onclick="document.fileaction.submit()" />
 		 </nobr>
 		</form>