[LON-CAPA-cvs] cvs: loncom /interface londocs.pm

bisitz lon-capa-cvs-allow@mail.lon-capa.org
Wed, 08 Oct 2008 17:19:19 -0000


bisitz		Wed Oct  8 13:19:19 2008 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
  Log:
  Dump course DOCS screen:
    - Use standard LON-CAPA table
    - Optimized &mt() call for button text
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.313 loncom/interface/londocs.pm:1.314
--- loncom/interface/londocs.pm:1.313	Mon Sep 15 11:34:10 2008
+++ loncom/interface/londocs.pm	Wed Oct  8 13:19:18 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.313 2008/09/15 15:34:10 bisitz Exp $
+# $Id: londocs.pm,v 1.314 2008/10/08 17:19:18 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -228,11 +228,19 @@
 	my $title=$origcrsdata{'description'};
 	$title=~s/[\/\s]+/\_/gs;
 	$title=&clean($title);
-	$r->print('<h3>'.&mt('Folder in Construction Space').'</h3><input type="text" size="50" name="authorfolder" value="'.$title.'" /><br />');
+	$r->print('<h3>'.&mt('Folder in Construction Space').'</h3>'
+                 .'<input type="text" size="50" name="authorfolder" value="'.$title.'" /><br />');
 	&tiehash();
-	$r->print('<h3>'.&mt('Filenames in Construction Space').'</h3><table border="2"><tr><th>'.&mt('Internal Filename').'</th><th>'.&mt('Title').'</th><th>'.&mt('Save as ...').'</th></tr>');
+	$r->print('<h3>'.&mt('Filenames in Construction Space').'</h3>'
+                 .&Apache::loncommon::start_data_table()
+                 .&Apache::loncommon::start_data_table_header_row()
+                 .'<th>'.&mt('Internal Filename').'</th>'
+                 .'<th>'.&mt('Title').'</th>'
+                 .'<th>'.&mt('Save as ...').'</th>'
+                 .&Apache::loncommon::end_data_table_header_row());
 	foreach (&Apache::lonclonecourse::crsdirlist($origcrsid,'userfiles')) {
-	    $r->print('<tr><td>'.$_.'</td>');
+	    $r->print(&Apache::loncommon::start_data_table_row()
+                     .'<td>'.$_.'</td>');
 	    my ($ext)=($_=~/\.(\w+)$/);
 	    my $title=$hash{'title_'.$hash{
 		'ids_/uploaded/'.$origcrsdata{'domain'}.'/'.$origcrsdata{'num'}.'/'.$_}};
@@ -245,12 +253,13 @@
 	    $title=~s/\.(\w+)$//;
 	    $title=&clean($title);
 	    $title.='.'.$ext;
-	    $r->print("\n<td><input type='text' size='60' name='namefor_".$_."' value='".$title."' /></td></tr>\n");
+	    $r->print("\n<td><input type='text' size='60' name='namefor_".$_."' value='".$title."' /></td>"
+                     .&Apache::loncommon::end_data_table_row());
 	}
-	$r->print("</table>\n");
+	$r->print(&Apache::loncommon::end_data_table());
 	&untiehash();
 	$r->print(
-  '<p><input type="submit" name="dumpcourse" value="'.&mt('Dump [_1] DOCS',$type).'" /></p></form>');
+  '<p><input type="submit" name="dumpcourse" value="'.&mt("Dump $type DOCS").'" /></p></form>');
     }
 }