[LON-CAPA-cvs] cvs: loncom /interface portfolio.pm

banghart lon-capa-cvs@mail.lon-capa.org
Fri, 04 Aug 2006 22:22:35 -0000


banghart		Fri Aug  4 18:22:35 2006 EDT

  Modified files:              
    /loncom/interface	portfolio.pm 
  Log:
  	remove border from icons, put folder icon in separate cell
  
  
Index: loncom/interface/portfolio.pm
diff -u loncom/interface/portfolio.pm:1.145 loncom/interface/portfolio.pm:1.146
--- loncom/interface/portfolio.pm:1.145	Fri Aug  4 17:44:19 2006
+++ loncom/interface/portfolio.pm	Fri Aug  4 18:22:32 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # portfolio browser
 #
-# $Id: portfolio.pm,v 1.145 2006/08/04 21:44:19 banghart Exp $
+# $Id: portfolio.pm,v 1.146 2006/08/04 22:22:32 banghart Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -154,7 +154,7 @@
     $r->print('<tr class="'.$css_class.'">');
     $r->print($line);
     $r->print('<td><img alt="" src="'.&Apache::loncommon::icon($filename).'" /></td>');
-    $r->print('<td>'.$$version_flag{$filename}.'<a href="'.$href_location.$filename.'">'.
+    $r->print('<td>'.$$version_flag{$filename}.'</td><td><a href="'.$href_location.$filename.'">'.
 	      $filename.'</a></td>'); 
     $r->print('<td>'.$size.'</td>');
     $r->print('<td>'.&Apache::lonlocal::locallocaltime($mtime).'</td>');
@@ -208,11 +208,11 @@
     if ($select_mode eq 'true') {
         $r->print('<form method="post" name="checkselect" action="'.$url.'">');
         $r->print('<table id="LC_browser">'.
-            '<tr><th>Select</th><th>&nbsp;</th><th>Name</th><th>Size</th><th>Last Modified</th></tr>');
+            '<tr><th>Select</th><th>&nbsp;</th><th>&nbsp;</th><th>Name</th><th>Size</th><th>Last Modified</th></tr>');
     } else {
         $r->print('<form method="post" action="'.$url.'">');
         $r->print('<table id="LC_browser">'.
-            '<tr><th colspan="2">Actions</th><th>&nbsp;</th><th>Name</th><th>Size</th><th>Last Modified</th><th>Current Access Status</th></tr>');
+            '<tr><th colspan="2">Actions</th><th>&nbsp;</th><th>&nbsp;</th><th>Name</th><th>Size</th><th>Last Modified</th><th>Current Access Status</th></tr>');
     }
     $r->print("\n".&group_form_data()."\n");
 
@@ -250,12 +250,12 @@
     	    }
     	    if (exists($versioned{$filename})) {
     	        if ($show_versions) {
-                    $version_flag{$filename} = '<a href="portfolio"><img alt="'.&mt('opened folder').'" src="'.$iconpath.'folder_pointer_opened.gif" /></a>';
+                    $version_flag{$filename} = '<a href="portfolio"><img class="LC_icon" alt="'.&mt('opened folder').'" src="'.$iconpath.'folder_pointer_opened.gif" /></a>';
     	        } else {
-                    $version_flag{$filename} = '<a href="portfolio?showversions='.$filename.'"><img alt="'.&mt('closed folder').'" src="'.$iconpath.'folder_pointer_closed.gif" /></a>';
+                    $version_flag{$filename} = '<a href="portfolio?showversions='.$filename.'"><img class="LC_icon" alt="'.&mt('closed folder').'" src="'.$iconpath.'folder_pointer_closed.gif" /></a>';
                 }
     	    } else {
-    	        $version_flag{$filename} = '';
+    	        $version_flag{$filename} = '&nbsp;';
     	    }
             if ($dirptr&$testdir) {
 		my $colspan='colspan="2"';
@@ -264,7 +264,7 @@
                 }
 		$r->print('<tr class="LC_browser_folder"><td '.$colspan.'><img alt="'.&mt('closed folder').'" src="'.$iconpath.'folder_closed.gif" /></td>');
                 $r->print('<td>Go to ...</td>');
-                $r->print('<td>'.$version_flag{$filename}.&make_anchor($url,$filename.'/',$current_path.$filename.'/',$env{'form.mode'},$env{"form.fieldname"},$env{'form.continue'}).'/</td>'); 
+                $r->print('<td>'.$version_flag{$filename}.'</td><td>'.&make_anchor($url,$filename.'/',$current_path.$filename.'/',$env{'form.mode'},$env{"form.fieldname"},$env{'form.continue'}).'/</td>'); 
                 $r->print('</tr>'); 
             } else {
 		my $css_class = 'LC_browser_file';
@@ -291,7 +291,7 @@
                             $line .= '<input type="checkbox" name="selectfile" value="'.$filename.'" />';
                         }
                         if ($can_modify) {
-                            my $cat='<img alt="'.&mt('Catalog Information').
+                            my $cat='<img class="LC_icon" alt="'.&mt('Catalog Information').
                             '" src="'.&Apache::loncommon::lonhttpdurl('/res/adm/pages/catalog.gif').'" />';
                             $line .= '<a href="'.$url.'?rename='.$filename.'&amp;currentpath='.$current_path.&group_args().'">Rename</a>';
                             $line .= '</td><td>'.'<a href="'.$href_edit_location.$filename.'.meta">'.$cat.'</a>';
@@ -1476,6 +1476,7 @@
         }
     }
     $fname=&Apache::lonnet::clean_filename($fname);
+
     my $portfolio_root=&get_portfolio_root();
     my ($uname,$udom) = &get_name_dom();
     my $port_path = &get_port_path();
@@ -1595,10 +1596,7 @@
 }
 
 sub get_portfolio_root {
-    my ($udom,$uname) = @_;
-    if (!defined($uname) || !defined($udom)) {
-	($uname,$udom) = &get_name_dom();
-    }
+    my ($uname,$udom) = &get_name_dom();
     my $path;
     if (defined($env{'form.group'})) {
         $path = '/userfiles/groups/'.$env{'form.group'}.'/portfolio';