--- loncom/publisher/lonpubdir.pm 2004/11/08 22:42:20 1.65
+++ loncom/publisher/lonpubdir.pm 2005/02/28 08:22:09 1.77
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Construction Space Directory Lister
#
-# $Id: lonpubdir.pm,v 1.65 2004/11/08 22:42:20 albertel Exp $
+# $Id: lonpubdir.pm,v 1.77 2005/02/28 08:22:09 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -94,6 +94,8 @@ sub handler {
if ($ENV{'environment.remote'} eq 'off') {
&dircontrols($r,$uname,$udom,$thisdisfn); # Put out actions for directory,
# browse/upload + new file page.
+ } else {
+ &pubbuttons($r,$uname,$thisdisfn);
}
&resourceactions($r,$uname,$udom,$thisdisfn); #Put out form used for printing/deletion etc.
@@ -189,32 +191,33 @@ sub startpage {
my $currdir = '/priv/'.$uname.$thisdisfn;
&Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
+ my $html=&Apache::lonxml::xmlbegin();
+ $r->print($html.'
LON-CAPA Construction Space');
- $r->print('LON-CAPA Construction Space');
-
- my $pagetitle;
- my $formaction='/priv/'.$uname.'/'.$thisdisfn;
+ my $pagetitle;
+ my $formaction='/priv/'.$uname.$thisdisfn.'/';
$formaction=~s/\/+/\//g;
- $pagetitle .= ('');
- &Apache::lonhtmlcommon::store_recent('construct',$formaction,$formaction);
+ '';
+ &Apache::lonhtmlcommon::store_recent('construct',$formaction,$formaction);
if ($ENV{'environment.remote'} eq 'off') {
- $ENV{'request.noversionuri'}=$currdir;
+ $ENV{'request.noversionuri'}=$currdir.'/';
$r->print(&Apache::loncommon::bodytag('Construction Space',undef,undef,undef,undef,undef,$pagetitle));
} else {
$r->print($pagetitle);
}
- $r->print(&Apache::loncommon::help_open_menu('','','','',3,'Authoring'));
my $pubdirscript=(<
+
ENDPUBDIRSCRIPT
$r->print($pubdirscript);
- if (($uname ne $ENV{'user.name'}) || ($udom ne $ENV{'user.domain'})) {
+ if ((($uname ne $ENV{'user.name'}) || ($udom ne $ENV{'user.domain'})) &&
+ $ENV{'environment.remote'} ne 'off') {
$r->print(''.&mt('Co-Author').': '.$uname.' at '.$udom.
'
');
}
@@ -370,9 +345,9 @@ sub dircontrols {
$r->print(<
- Actions for current directory |
- Upload a new document |
- Create a new directory or LON-CAPA document |
+ Actions for current directory |
+ Upload a new document |
+ Create a new directory or LON-CAPA document |
@@ -393,8 +368,6 @@ sub dircontrols {
|
@@ -409,7 +382,7 @@ sub dircontrols {
|
-
-
END
}
+sub pubbuttons {
+ my ($r,$uname,$thisdisfn) = @_;
+ $r->print('');
+}
+
sub resourceactions {
my ($r,$uname,$udom,$thisdisfn) = @_;
$r->print(<
';
$$numdir ++;
@@ -589,7 +575,7 @@ sub putresource {
# $action_buttons='';
# }
$title=''.
+ '.meta" target="cat">'.
&getTitleString($targetdir.'/'.$filename).'';
} else {
$pubstatus = 'modified';
@@ -598,17 +584,17 @@ sub putresource {
&mt(&getSourceRightString($targetdir.'/'.$filename));
$bgcolor='#FFFF77';
# $action_buttons='';
- $title=''.
+ $title=''.
&getTitleString($targetdir.'/'.$filename).'';
if (&Apache::loncommon::fileembstyle(($filename=~/\.(\w+)$/)) eq 'ssi') {
$status.='
'.&mt('Diffs').'';
+ '&versiontwo=priv" target="cat">'.&mt('Diffs').'';
}
}
- $title.='
'.
+ $title.="\n".'
'.
($$bombs{$targetdir.'/'.$filename}?'':'Edit Metadata').'';
- $status.='
'.&mt('Retrieve').'';
}
my $editlink='';
@@ -646,31 +632,29 @@ sub create_pubselect {
$$pub_select = '
';
+ $uname.$thisdisfn.'/'.$filename.'" />';
$$numres ++;
}