--- loncom/publisher/lonpublisher.pm 2008/06/30 18:10:24 1.239
+++ loncom/publisher/lonpublisher.pm 2008/08/01 18:09:38 1.243
@@ -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.243 2008/08/01 18:09:38 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -123,6 +123,7 @@ use Apache::loncacc;
use DBI;
use Apache::lonnet;
use Apache::loncommon();
+use Apache::lonhtmlcommon;
use Apache::lonmysql;
use Apache::lonlocal;
use Apache::loncfile;
@@ -325,7 +326,7 @@ string which presents the form field (fo
#########################################
#########################################
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 +334,11 @@ sub textfield {
$env{'form.'.$name}=$value;
return "\n".&Apache::lonhtmlcommon::row_title($title)
.' '
- .&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 +353,7 @@ sub text_with_browse_field {
.''
.&mt('Search')
.' '
- .&Apache::lonhtmlcommon::row_closure();
+ .&Apache::lonhtmlcommon::row_closure($noline);
}
sub hiddenfield {
@@ -886,17 +887,21 @@ sub checkonthis {
'return_only_error_and_warning_counts' => 1));
my ($errorcount,$warningcount)=split(':',$result);
if (($errorcount) || ($warningcount)) {
- $r->print(''.$uri.' : ');
- if ($errorcount) {
- $r->print(''.
- $errorcount.' '.
- &mt('error(s)').' ');
- }
- if ($warningcount) {
- $r->print(''.
- $warningcount.' '.
- &mt('warning(s)').' ');
- }
+ $r->print('
'.&mt('Warnings and Errors').' ');
+ $r->print(''.$uri.' :');
+ $r->print('');
} else {
#$r->print(''.&mt('ok').' ');
}
@@ -1237,11 +1242,14 @@ END
.' '
.' '
.' '
- .''
+ $keywordout.=&Apache::loncommon::end_data_table_row()
+ .&Apache::loncommon::end_data_table()
.&Apache::lonhtmlcommon::row_closure();
$intr_scrout.=$keywordout;
@@ -1309,9 +1326,12 @@ END
$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 +1382,7 @@ END
.&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 +1408,7 @@ END
&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 +2168,30 @@ ENDCAPTION
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Target'))
.''.$thisdistarget.' '
- .&Apache::lonhtmlcommon::row_closure()
);
-
# SB - ToDo:
if (($cuname ne $env{'user.name'})||($cudom ne $env{'user.domain'})) {
# $r->print(&Apache::lonhtmlcommon::row_title(''.&mt('Co-Author').' ')
- $r->print(&Apache::lonhtmlcommon::row_title(&mt('Co-Author'))
+ $r->print(&Apache::lonhtmlcommon::row_closure()
+ .&Apache::lonhtmlcommon::row_title(&mt('Co-Author'))
.''
.&mt('[_1] at [_2]',$cuname,$cudom)
.' '
- .&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
- $r->print(&mt('Diffs with Current Version').''
- .&Apache::lonhtmlcommon::row_closure()
- );
-
+ $r->print(&mt('Diffs with Current Version').'');
}
-
- $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.