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

bisitz bisitz@source.lon-capa.org
Thu, 14 May 2009 11:13:49 -0000


bisitz		Thu May 14 11:13:49 2009 EDT

  Modified files:              
    /loncom/publisher	lonpublisher.pm 
  Log:
  - Replaced missusage of <h1> to highlight text by standard warning styles
  - Corrected <p>-tag closure
  - Added standard pick_box to publish directory (inlcuding removal of another wrong usage of <h1>)
  Co-Author username display:
      - Consistent username:domain output
      - Now also display plainname and not only username
  
  
Index: loncom/publisher/lonpublisher.pm
diff -u loncom/publisher/lonpublisher.pm:1.257 loncom/publisher/lonpublisher.pm:1.258
--- loncom/publisher/lonpublisher.pm:1.257	Wed May  6 16:19:50 2009
+++ loncom/publisher/lonpublisher.pm	Thu May 14 11:13:49 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Publication Handler
 #
-# $Id: lonpublisher.pm,v 1.257 2009/05/06 16:19:50 bisitz Exp $
+# $Id: lonpublisher.pm,v 1.258 2009/05/14 11:13:49 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1166,15 +1166,16 @@
 	}
     }
     if ($chparms) {
-	$scrout.='<p><b>'.&mt('Obsolete parameters or saved values').':</b> '.
-	    $chparms.'</p><h1><span class="LC_warning">'.&mt('Warning!').
-	    '</span></h1><p><span class="LC_warning">'.
-	    &mt('If this resource is in active use, student performance data from the previous version may become inaccessible.').'</span></p><hr />';
+        $scrout.='<p><b>'.&mt('Obsolete parameters or saved values').':</b> '
+	        .$chparms.'</p>'
+                .'<p class="LC_warning"><b>'.&mt('Warning!').'</b><br />'
+                .&mt('If this resource is in active use, student performance data from the previous version may become inaccessible.')
+                .'</p><hr />';
     }
     if ($metadatafields{'copyright'} eq 'priv') {
-        $scrout.='</p><h1><span class="LC_warning">'.&mt('Warning!').
-            '</span></h1><p><span class="LC_warning">'.
-            &mt('Copyright/distribution option "Private" is no longer supported. Select another option from below. Consider "Custom Rights" for maximum control over the usage of your resource.').'</span></p><hr />';
+        $scrout.='<p class="LC_warning"><b>'.&mt('Warning!').'</b><br />'
+                .&mt('Copyright/distribution option "Private" is no longer supported. Select another option from below. Consider "Custom Rights" for maximum control over the usage of your resource.')
+                .'</p><hr />';
     }
 
 # ------------------------------------------------------- Now have all metadata
@@ -1875,12 +1876,20 @@
     my $resdir=
 	$Apache::lonnet::perlvar{'lonDocRoot'}.'/res/'.$cudom.'/'.$cuname.'/'.
 	$thisdisfn;
-    $r->print('<h1>'.&mt('Directory').' <tt>'.$thisdisfn.'</tt></h1>'.
-	      &mt('Target').': <tt>'.$resdir.'</tt><br />');
+    $r->print(&Apache::lonhtmlcommon::start_pick_box()
+             .&Apache::lonhtmlcommon::row_title(&mt('Directory'))
+            .'<span class="LC_filename">'.$thisdisfn.'</span>'
+            .&Apache::lonhtmlcommon::row_closure()
+            .&Apache::lonhtmlcommon::row_title(&mt('Target'))
+            .'<span class="LC_filename">'.$resdir.'</span>'
+    );
 
     my $dirptr=16384;		# Mask indicating a directory in stat.cmode.
     unless ($env{'form.phase'} eq 'two') {
 # ask user what they want
+        $r->print(&Apache::lonhtmlcommon::row_closure()
+                 .&Apache::lonhtmlcommon::row_title(&mt('Options'))
+        );
         $r->print('<form name="pubdirpref" method="post">'.
 		  &hiddenfield('phase','two').
 		  &hiddenfield('filename',$env{'form.filename'}).
@@ -1889,8 +1898,14 @@
                   &checkbox('obsolete','make file(s) obsolete').
 		  &checkbox('forceoverride','force directory level metadata over existing').
 		  '<br /><input type="submit" value="'.&mt('Publish Directory').'" /></form>');
+        $r->print(&Apache::lonhtmlcommon::row_closure(1)
+                 .&Apache::lonhtmlcommon::end_pick_box()
+        );
         $lock=0;
     } else {
+        $r->print(&Apache::lonhtmlcommon::row_closure(1)
+                 .&Apache::lonhtmlcommon::end_pick_box()
+        );
         unless ($lock) { $lock=&Apache::lonnet::set_lock(&mt('Publishing [_1]',$fn)); }
 # actually publish things
 	opendir(DIR,$fn);
@@ -2215,7 +2230,7 @@
             $r->print(&Apache::lonhtmlcommon::row_closure()
                      .&Apache::lonhtmlcommon::row_title(&mt('Co-Author'))
                      .'<span class="LC_warning">'
-		     .&mt('[_1] at [_2]',$cuname,$cudom)
+		     .&Apache::loncommon::plainname($cuname,$cudom) .' ('.$cuname.':'.$cudom.')'
                      .'</span>'
                      );
 	}