[LON-CAPA-cvs] cvs: loncom /interface groupsort.pm /localize/localize de.pm

bisitz bisitz@source.lon-capa.org
Mon, 03 May 2010 13:53:50 -0000


bisitz		Mon May  3 13:53:50 2010 EDT

  Modified files:              
    /loncom/interface	groupsort.pm 
    /loncom/localize/localize	de.pm 
  Log:
  Changes related to modification of LON-CAPA screen header.
  - Explicitly re-added h1 headline which used to be in the removed title_bar.
  - "There are no resources..." message for all three kinds of routine calls.
  - Moved title text generation to another place to allow access for both start_page calls.
  - Added translation phrases.
  
  
Index: loncom/interface/groupsort.pm
diff -u loncom/interface/groupsort.pm:1.65 loncom/interface/groupsort.pm:1.66
--- loncom/interface/groupsort.pm:1.65	Fri Mar 13 15:39:43 2009
+++ loncom/interface/groupsort.pm	Mon May  3 13:53:47 2010
@@ -2,7 +2,7 @@
 # The LON-CAPA group sort handler
 # Allows for sorting prior to import into RAT.
 #
-# $Id: groupsort.pm,v 1.65 2009/03/13 15:39:43 bisitz Exp $
+# $Id: groupsort.pm,v 1.66 2010/05/03 13:53:47 bisitz Exp $
 # 
 # Copyright Michigan State University Board of Trustees
 #
@@ -307,6 +307,15 @@
 
     my $ctr = 0;
     my $clen = scalar(@resources);
+    my $title = '';
+    if ($env{'form.recover'}) {
+        $title = 'Recover Removed Resources';
+    } else {
+        $title = 'Sort Imported Resources';
+    }
+    if ($env{'form.bookmarks'}) {
+        $title = 'Import Resources from Bookmarks';
+    }
     if (($clen > 1) || ($env{'form.readfile'}) || ($env{'form.bookmarks'})) {
 	my %lt=&Apache::lonlocal::texthash(
 		'fin'=> 'Finalize order of resources',
@@ -321,17 +330,9 @@
 		'pa' => 'Path',
                 'in' => 'Include'
 		);
-        my $title = '';
-        if ($env{'form.recover'}) {
-            $title = 'Recover Removed Resources';
-        } else {
-            $title = 'Sort Imported Resources';
-        }
-        if ($env{'form.bookmarks'}) {
-            $title = 'Import Resources from Bookmarks';
-        }
 
 	$r->print(&Apache::loncommon::start_page($title, $js));
+	$r->print('<h1>'.&mt($title).'</h1>');
 
 	$r->print(<<END);
 <form method='post' action='/adm/groupsort' name='groupsort'
@@ -390,15 +391,21 @@
             $r->print("<th>$lt{'pa'}</th>");
             $r->print(&Apache::loncommon::end_data_table_header_row()."\n");
         } else {
-            $r->print('<p class="LC_info">');
+            my $errtxt = '';
+            if ($env{'form.recover'}) {
+                $errtxt = 'There are no resources to recover.';
+            } else {
+                $errtxt = 'There are no resources to import.';
+            }
             if ($env{'form.bookmarks'}) {
-                $r->print(&mt('There are no resources in your bookmarks to import.'));
+                $errtxt = 'There are no resources in your bookmarks to import.';
             }
-            $r->print('</p>');
+            $r->print('<p class="LC_info">'.&mt($errtxt).'</p>');
         }
     } else {
 	$r->print(&Apache::loncommon::start_page(undef,$js,
 						 {'only_body' => 1}));
+#       $r->print('<h1>'.&mt($title).'</h1>');
 	$r->print(<<END);
 <form method='post' action='/adm/groupsort' name='groupsort'
       enctype='application/x-www-form-urlencoded'>
Index: loncom/localize/localize/de.pm
diff -u loncom/localize/localize/de.pm:1.378 loncom/localize/localize/de.pm:1.379
--- loncom/localize/localize/de.pm:1.378	Mon May  3 10:53:20 2010
+++ loncom/localize/localize/de.pm	Mon May  3 13:53:50 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # German Localization Lexicon
 #
-# $Id: de.pm,v 1.378 2010/05/03 10:53:20 bisitz Exp $
+# $Id: de.pm,v 1.379 2010/05/03 13:53:50 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -12003,6 +12003,12 @@
    'Import Resources from Bookmarks'
 => 'Ressourcen aus Lesezeichen importieren',
 
+   'There are no resources to recover.'
+=> 'Es gibt keine Ressourcen, die wiederhergestellt werden können.',
+
+   'There are no resources to import.'
+=> 'Es gibt keine Ressourcen, die importiert werden können.',
+
    'There are no resources in your bookmarks to import.'
 => 'Es gibt keine Ressourcen in Ihren Lesezeichen, die importiert werden können.',