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

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Sat, 26 Jul 2008 16:03:47 -0000


raeburn		Sat Jul 26 12:03:47 2008 EDT

  Modified files:              
    /loncom/publisher	lonpublisher.pm 
  Log:
  - Eliminate double line at the end of "Resource Details" and "Metadata Information" tables.
  
  
Index: loncom/publisher/lonpublisher.pm
diff -u loncom/publisher/lonpublisher.pm:1.239 loncom/publisher/lonpublisher.pm:1.240
--- loncom/publisher/lonpublisher.pm:1.239	Mon Jun 30 14:10:24 2008
+++ loncom/publisher/lonpublisher.pm	Sat Jul 26 12:03:46 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Publication Handler
 #
-# $Id: lonpublisher.pm,v 1.239 2008/06/30 18:10:24 bisitz Exp $
+# $Id: lonpublisher.pm,v 1.240 2008/07/26 16:03:46 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -325,7 +325,7 @@
 #########################################
 #########################################
 sub textfield {
-    my ($title,$name,$value)=@_;
+    my ($title,$name,$value,$noline)=@_;
     $value=~s/^\s+//gs;
     $value=~s/\s+$//gs;
     $value=~s/\s+/ /gs;
@@ -333,11 +333,11 @@
     $env{'form.'.$name}=$value;
     return "\n".&Apache::lonhtmlcommon::row_title($title)
            .'<input type="text" name="'.$name.'" size="80" value="'.$value.'" />'
-           .&Apache::lonhtmlcommon::row_closure();
+           .&Apache::lonhtmlcommon::row_closure($noline);
 }
 
 sub text_with_browse_field {
-    my ($title,$name,$value,$restriction)=@_;
+    my ($title,$name,$value,$restriction,$noline)=@_;
     $value=~s/^\s+//gs;
     $value=~s/\s+$//gs;
     $value=~s/\s+/ /gs;
@@ -352,7 +352,7 @@
 	  .'<a href="javascript:opensearcher(\'pubform\',\''.$name.'\');">'
           .&mt('Search')
           .'</a>'
-          .&Apache::lonhtmlcommon::row_closure();
+          .&Apache::lonhtmlcommon::row_closure($noline);
 }
 
 sub hiddenfield {
@@ -1309,9 +1309,12 @@
 
     $intr_scrout.=&hiddenfield('lastrevisiondate',time);
 
-
+    my $pubowner_last;
+    if ($style eq 'prv') {
+        $pubowner_last = 1;
+    }
     $intr_scrout.=&textfield('Publisher/Owner','owner',
-			     $metadatafields{'owner'});
+			     $metadatafields{'owner'},$pubowner_last);
 
 # ---------------------------------------------- Retrofix for unused copyright
     if ($metadatafields{'copyright'} eq 'free') {
@@ -1362,7 +1365,7 @@
                      .&Apache::lonhtmlcommon::row_closure(1);
         $intr_scrout.=&text_with_browse_field('Suggested Replacement for Obsolete File',
 				    'obsoletereplacement',
-				    $metadatafields{'obsoletereplacement'});
+				    $metadatafields{'obsoletereplacement'},'',1);
     } else {
 	$intr_scrout.=&hiddenfield('copyright','private');
     }
@@ -1388,7 +1391,7 @@
 	&hiddenfield('obsolete',1).
 	&text_with_browse_field('Suggested Replacement for Obsolete File',
 				    'obsoletereplacement',
-				    $metadatafields{'obsoletereplacement'});
+				    $metadatafields{'obsoletereplacement'},'',1);
    }
     if (!$batch) {
 	$scrout.=$intr_scrout
@@ -2148,32 +2151,30 @@
 
         $r->print(&Apache::lonhtmlcommon::row_title(&mt('Target'))
                  .'<tt>'.$thisdistarget.'</tt>'
-                 .&Apache::lonhtmlcommon::row_closure()
                  );
-
 # SB - ToDo:   
 	if (($cuname ne $env{'user.name'})||($cudom ne $env{'user.domain'})) {
 #           $r->print(&Apache::lonhtmlcommon::row_title('<span class="LC_warning">'.&mt('Co-Author').'</span>')
-            $r->print(&Apache::lonhtmlcommon::row_title(&mt('Co-Author'))
+            $r->print(&Apache::lonhtmlcommon::row_closure()
+                     .&Apache::lonhtmlcommon::row_title(&mt('Co-Author'))
                      .'<span class="LC_warning">'
 		     .&mt('[_1] at [_2]',$cuname,$cudom)
                      .'</span>'
-                     .&Apache::lonhtmlcommon::row_closure()
                      );
 	}
 
 	if (&Apache::loncommon::fileembstyle($thistype) eq 'ssi') {
-            $r->print(&Apache::lonhtmlcommon::row_title(&mt('Diffs')));
+            $r->print(&Apache::lonhtmlcommon::row_closure()
+                     .&Apache::lonhtmlcommon::row_title(&mt('Diffs')));
 	    $r->print(<<ENDDIFF);
 <a href='javascript:void(window.open("/adm/diff?filename=/~$cuname/$thisdisfn&versiontwo=priv","cat","height=300,width=500,scrollbars=1,resizable=1,menubar=0,location=1"))'>
 ENDDIFF
-            $r->print(&mt('Diffs with Current Version').'</a>'
-                     .&Apache::lonhtmlcommon::row_closure()
-                     );
-
+            $r->print(&mt('Diffs with Current Version').'</a>');
 	}
-
-        $r->print(&Apache::lonhtmlcommon::end_pick_box());
+        
+        $r->print(&Apache::lonhtmlcommon::row_closure(1)
+                 .&Apache::lonhtmlcommon::end_pick_box()
+                 );
   
 # ------------------ Publishing from $thisfn to $thistarget with $thisembstyle.