[LON-CAPA-cvs] cvs: loncom /publisher lonpubdir.pm
www
lon-capa-cvs@mail.lon-capa.org
Tue, 04 Jun 2002 13:13:38 -0000
www Tue Jun 4 09:13:38 2002 EDT
Modified files:
/loncom/publisher lonpubdir.pm
Log:
Bug 498
Links to top frame so URL in browser corresponds to URL worked on.
Status colors back. Show "[untitled]" for unnamed modified files.
Index: loncom/publisher/lonpubdir.pm
diff -u loncom/publisher/lonpubdir.pm:1.24 loncom/publisher/lonpubdir.pm:1.25
--- loncom/publisher/lonpubdir.pm:1.24 Tue Apr 9 02:01:56 2002
+++ loncom/publisher/lonpubdir.pm Tue Jun 4 09:13:38 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# (Publication Handler
#
-# $Id: lonpubdir.pm,v 1.24 2002/04/09 06:01:56 albertel Exp $
+# $Id: lonpubdir.pm,v 1.25 2002/06/04 13:13:38 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -95,7 +95,7 @@
my $resdir=$docroot.'/res/'.$udom.'/'.$uname.$thisdisfn; # Resource directory
my $targetdir=$udom.'/'.$uname.$thisdisfn; # Publiction target directory.
- my $linkdir='/~'.$uname.$thisdisfn; # Full URL name of constr space.
+ my $linkdir='/priv/'.$uname.$thisdisfn; # Full URL name of constr space.
@@ -236,14 +236,14 @@
}
unless (( ($dirname eq '..') && ($reqfile eq '')) ||
($dirname eq '.')) {
- $r->print('<tr>'.
- '<td>Click to cwd</td>'.
- '<td><a href="'.$here.'/'.$dirname.'/">'.
+ $r->print('<tr bgcolor="#CCCCFF">'.
+ '<td>Go to ...</td>'.
+ '<td><a href="'.$here.'/'.$dirname.'/" target="_top">'.
$disfilename.'</a></td>'.
'<td> </td>'.
'<td> </td>'.
'<td>'.localtime($modtime).'</td>'.
- '</tr>');
+ "</tr>\n");
}
return OK;
}
@@ -256,6 +256,7 @@
$cmtime) = @_;
my $status='Unpublished';
+ my $bgcolor='#FFCCCC';
my $title=' ';
if (-e $resdir.'/'.$filename) {
my ($rdev,$rino,$rmode,$rnlink,
@@ -264,13 +265,15 @@
$rblksize,$rblocks)=stat($resdir.'/'.$filename);
if ($rmtime>=$cmtime) {
$status='Published';
+ $bgcolor='#CCFFCC';
$title='<a href="/res/'.$targetdir.'/'.$filename.
'.meta" target=cat>'.
getTitleString($targetdir.'/'.$filename, 'title').'</a>';
} else {
$status='Modified';
+ $bgcolor='#FFFFCC';
$title='<a href="/res/'.$targetdir.'/'.$filename.'.meta" target=cat>'.
- &Apache::lonnet::metadata($targetdir.'/'.$filename,'title').'</a>';
+ getTitleString($targetdir.'/'.$filename,'title').'</a>';
if (&Apache::loncommon::fileembstyle(($filename=~/\.(\w+)$/)) eq 'ssi') {
$status.='<br><a href="/adm/diff?filename=/~'.$uname.
$thisdisfn.'/'.$filename.
@@ -280,17 +283,18 @@
$status.='<br><a href="/adm/retrieve?filename=/~'.$uname.
$thisdisfn.'/'.$filename.'" target=cat>Retrieve</a>';
}
- $r->print('<tr>'.
+ $r->print('<tr bgcolor="'.$bgcolor.'">'.
'<td><a target="_parent" href="/adm/publish?filename=/~'.
$uname.$thisdisfn.'/'.$filename.'">'.'Publish</a>'.
'</td>'.
'<td>'.
- '<a href="'.$linkdir.'/'.$filename.'">'.$filename.'</a>'.
+ '<a href="'.$linkdir.'/'.$filename.'" target="_top">'.
+ $filename.'</a>'.
'</td>'.
'<td>'.$title.'</td>'.
'<td>'.$status.'</td>'.
'<td>'.localtime($cmtime).'</td>'.
- '</tr>');
+ "</tr>\n");
return OK;
}
#