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

www lon-capa-cvs@mail.lon-capa.org
Sat, 03 Jan 2004 15:11:37 -0000


www		Sat Jan  3 10:11:37 2004 EDT

  Modified files:              
    /loncom/publisher	lonpubdir.pm 
  Log:
  Include file icons.
  
  
Index: loncom/publisher/lonpubdir.pm
diff -u loncom/publisher/lonpubdir.pm:1.52 loncom/publisher/lonpubdir.pm:1.53
--- loncom/publisher/lonpubdir.pm:1.52	Fri Jan  2 22:19:43 2004
+++ loncom/publisher/lonpubdir.pm	Sat Jan  3 10:11:37 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Construction Space Directory Lister
 #
-# $Id: lonpubdir.pm,v 1.52 2004/01/03 03:19:43 www Exp $
+# $Id: lonpubdir.pm,v 1.53 2004/01/03 15:11:37 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -92,8 +92,8 @@
   
   # Start off the directory table.
 
-  $r->print('<table border=2>'.
-	    '<tr><th>'.&mt('Actions').'</th><th>'.&mt('Name').'</th><th>'.
+  $r->print('<table border="0" cellspacing="2" cellpadding="2">'.
+	    '<tr><th>&nbsp;</th><th>'.&mt('Actions').'</th><th>'.&mt('Name').'</th><th>'.
 	    &mt('Title').'</th>'.
 	    '<th>'.&mt('Status').'</th><th>'.&mt('Last Modified').
 	    '</th></tr>');
@@ -223,7 +223,7 @@
 		  '</h3>');
     }
     $r->print(
-       &Apache::lonhtmlcommon::crumbs($uname.'/'.$thisdisfn.'/','_top','/priv'));
+       &Apache::lonhtmlcommon::crumbs($uname.'/'.$thisdisfn.'/','_top','/priv').'<br />');
 }
 
 #
@@ -278,11 +278,13 @@
        				 $construct.'/'.$dirname.'/default.meta'
 								 ));
 	$r->print('<tr bgcolor="#CCCCFF">'.
+		  '<td><img src="'.
+		  $Apache::lonnet::perlvar{'lonIconsURL'}.'/folder_closed.gif" /></td>'.
 		  '<td>'.&mt('Go to ...').'</td>'.
 		  '<td><a href="'.$here.'/'.$dirname.'/" target="_top">'.
 		  $disfilename.'</a></td>'.
-		        '<td colspan="2">'.($kaputt?'<img src="/adm/lonMisc/bomb.gif" />':'').$Apache::lonpublisher::metadatafields{'title'}.' '.
-		  $Apache::lonpublisher::metadatafields{'subject'}.' '.
+		        '<td colspan="2">'.($kaputt?'<img src="/adm/lonMisc/bomb.gif" />':'').$Apache::lonpublisher::metadatafields{'title'}.' <i>'.
+		  $Apache::lonpublisher::metadatafields{'subject'}.'</i> '.
 		  $Apache::lonpublisher::metadatafields{'keywords'}.'</td>'.
 		  '<td>'.&Apache::lonlocal::locallocaltime($modtime).'</td>'.
 		  "</tr>\n");
@@ -298,7 +300,7 @@
 	$cmtime,$bombs) = @_;
 
     my $status=&mt('Unpublished');
-    my $bgcolor='#FFCCCC';
+    my $bgcolor='#FFAA99';
     my $title='&nbsp;';
     if (-e $resdir.'/'.$filename) {
 	my ($rdev,$rino,$rmode,$rnlink,
@@ -307,7 +309,7 @@
 	    $rblksize,$rblocks)=stat($resdir.'/'.$filename);
 	if ($rmtime>=$cmtime) {
 	    $status=&mt('Published');
-            $bgcolor='#CCFFCC';
+            $bgcolor='#CCFF88';
 	    if (&Apache::lonnet::metadata($targetdir.'/'.$filename,'obsolete')) {
 		$status=&mt('Obsolete');
                 $bgcolor='#AAAAAA';
@@ -317,7 +319,7 @@
 		getTitleString($targetdir.'/'.$filename, 'title').'</a>';
 	} else {
 	    $status=&mt('Modified');
-            $bgcolor='#FFFFCC';
+            $bgcolor='#FFFF77';
 	    $title='<a href="/res/'.$targetdir.'/'.$filename.'.meta" target=cat>'.
 		getTitleString($targetdir.'/'.$filename,'title').'</a>';
 	    if (&Apache::loncommon::fileembstyle(($filename=~/\.(\w+)$/)) eq 'ssi') {
@@ -327,7 +329,7 @@
 	    }
 	}
 	$title.='<br /><a href="/~'.$uname.$thisdisfn.'/'.$filename.'.meta">'. 
-	    ($$bombs{$targetdir.'/'.$filename}?'<img src="/adm/lonMisc/bomb.gif" />':'Edit Metadata').'</a>';
+	    ($$bombs{$targetdir.'/'.$filename}?'<img src="/adm/lonMisc/bomb.gif" border="0" />':'Edit Metadata').'</a>';
 	$status.='<br><a href="/adm/retrieve?filename=/~'.$uname.
 	    $thisdisfn.'/'.$filename.'" target=cat>'.&mt('Retrieve').'</a>';
     }
@@ -345,6 +347,8 @@
 	      $uname.$thisdisfn.'/'.$filename.'">'.&mt('Decompress').'</a>)';
     }
     $r->print('<tr bgcolor="'.$bgcolor.'">'.
+	      '<td>'.($filename=~/[\#\~]$/?'&nbsp;':
+		      '<img src="'.&Apache::loncommon::icon($filename).'" /></td>').
 	      '<td><a target="_parent" href="/adm/publish?filename=/~'.
 	      $uname.$thisdisfn.'/'.$filename.'">'.&mt('Publish').'</a>'.
 	      '</td>'.