--- loncom/interface/portfolio.pm	2009/03/08 21:49:33	1.212
+++ loncom/interface/portfolio.pm	2010/02/19 10:20:31	1.220
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # portfolio browser
 #
-# $Id: portfolio.pm,v 1.212 2009/03/08 21:49:33 weissno Exp $
+# $Id: portfolio.pm,v 1.220 2010/02/19 10:20:31 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -88,13 +88,12 @@ sub display_common {
 
         my $iconpath= $r->dir_config('lonIconsURL') . "/";
         my %lt=&Apache::lonlocal::texthash(
-					 'upload' => 'Upload',
-					 'upload_label' => 'Upload file to current directory',
-					 'createdir' => 'Create Subdirectory',
-					 'createdir_label' => 
-					 'Create subdirectory in current directory',
-                                         'parse' => 'If HTML file, upload embedded images/multimedia/css/linked files'
-                                            );
+                   'upload'          => 'Upload',
+                   'upload_label'    => 'Upload file to current directory',
+                   'createdir'       => 'Create Subdirectory',
+                   'createdir_label' => 'Create subdirectory in current directory',
+                   'parse'           => 'Upload embedded images/multimedia/css/linked files if HTML file',
+               );
         my $escuri = &HTML::Entities::encode($r->uri,'&<>"');
 	my $help_fileupload = &Apache::loncommon::help_open_topic('Portfolio AddFiles');
 	my $help_createdir = &Apache::loncommon::help_open_topic('Portfolio CreateDirectory');
@@ -105,8 +104,9 @@ sub display_common {
             $parse_check = <<"END";
         <br />
         <span class="LC_nobreak">
-         <label>$lt{'parse'}
-         <input type="checkbox" name="parserflag" checked="checked" />
+         <label>
+          <input type="checkbox" name="parserflag" checked="checked" />
+          $lt{'parse'}
          </label>
         </span>
 END
@@ -158,6 +158,7 @@ END
         'fieldname'     => $env{"form.fieldname"},
         'continue'      => $env{"form.continue"}
     );
+    $r->print('<br clear="all" />');
     $r->print('<span class="LC_current_location">'.&make_anchor($url,\%anchor_fields,$port_path).'/');
     if (@tree > 1){
         my $newCurrentPath = '/';
@@ -222,7 +223,7 @@ sub display_usage {
 '    <div id="meter3" style="display:block; background-color:'.$color.'; width:'.$prog_width.'%; height:10px; color:#000000; margin:0px;"></div>'."\n".
 '   </div>'."\n".
 '  </div>';
-    return $disk_meter;
+    return &Apache::loncommon::head_subbox($disk_meter);
 }
 
 sub display_directory_line {
@@ -235,7 +236,7 @@ sub display_directory_line {
     $r->print($line); # contains first two cells of table
     my $lock_info;
     if ($version_flag) { # versioned can't be versioned, so TRUE when root file
-        $r->print('<td><img alt="" src="'.&Apache::loncommon::icon($filename).'" /></td>');
+        $r->print('<td><img alt="" src="'.&Apache::loncommon::icon($filename).'" class="LC_fileicon" /></td>');
         $r->print('<td>'.$version_flag.'</td>');
     } else { # this is a graded or handed back file
         my ($user,$domain) = &get_name_dom($env{'form.group'});
@@ -413,7 +414,7 @@ sub display_directory {
                     $colspan_fill=' colspan="4"';
                 }
 		$r->print('<tr class="LC_browser_folder">');
-                $r->print('<td'.$colspan_folder.'><img alt="'.&mt('closed folder').'" src="'.$iconpath.'folder_closed.gif" /></td>'
+                $r->print('<td'.$colspan_folder.'><img alt="'.&mt('closed folder').'" src="'.$iconpath.'navmap.folder.closed.gif" class="LC_fileicon" /></td>'
                          .'<td>'.&mt('Go to ...').'</td>');
                 my %anchor_fields = (
                     'selectfile'    => $filename.'/',
@@ -452,8 +453,7 @@ sub display_directory {
                             $line .= '<input type="checkbox" name="selectfile" value="'.$filename.'" />';
                         }
                         if ($can_modify) {
-                            my $cat='<img class="LC_icon" alt="'.&mt('Metadata').'"/>';
-# 	src="'.#&Apache::loncommon::lonhttpdurl('/res/adm/pages/catalog.gif').'" />';
+                            my $cat='<img class="LC_icon" alt="'.&mt('Metadata').'" title="'.&mt('Metadata').'" src="'.&Apache::loncommon::lonhttpdurl('/res/adm/pages/catalog.png').'" />';
                             my %anchor_fields = (
                                 'rename' => $filename,
                                 currentpath => $current_path
@@ -521,7 +521,7 @@ sub display_directory {
             <input type="hidden" name="mode" value="selectfile" />
             <p>
             <input type="submit" name="submit" value="'.&mt('Select checked files, and continue selecting').'" /><br />
-            <input type="button" name="doit" onClick= "finishSelect();" value="'.&mt('Select checked files, and close window').'" />
+            <input type="button" name="doit" onClick="finishSelect();" value="'.&mt('Select checked files, and close window').'" />
             </p>
             <input type="hidden" name="currentpath" value="'.$current_path.'" />
         </form>');        
@@ -1357,7 +1357,7 @@ sub standard_settings {
         &build_access_summary($r,$count,$chg,%conditionals);
         $r->print(&Apache::loncommon::end_data_table());
     } else {
-        $r->print(&make_anchor($url,\%anchor_fields,&mt('Add conditional access')).' '.&mt('based on domain, username, or course affiliation.'));
+        $r->print(&make_anchor($url,\%anchor_fields,&mt('Add conditional access')).' '.&mt('based on domain, username, or course/community affiliation.'));
     }
 }
 
@@ -1545,13 +1545,13 @@ sub course_row {
             $r->print('</table>');
         }
         $r->print('<br />'.&mt('Add a roles-based condition').
-                  '&nbsp;<input type="checkbox" name ="add_role_'.
+                  '&nbsp;<input type="checkbox" name="add_role_'.
                   $num.'" onClick="javascript:setRoleOptions('."'$num',
                   '$max_id','$content->{'domain'}','$content->{'number'}',
                   '$uctype'".')" value="" />');
         $newrole_id = $max_id;
     } else {
-        $r->print('<input type="hidden" name ="add_role_'.$num.'" value="" />');
+        $r->print('<input type="hidden" name="add_role_'.$num.'" value="" />');
     }
     $r->print(&add_course_role($num,$newrole_id));
     $r->print('</td>');
@@ -1579,7 +1579,7 @@ sub domains_row {
 	foreach my $dom (@{$all_doms}) {
             if ((@{$content->{'dom'}} > 0) 
 		&& (grep(/^\Q$dom\E$/,@{$content->{'dom'}}))) {
-                $dom_select .= '<option value="'.$dom.'" selected>'.
+                $dom_select .= '<option value="'.$dom.'" selected="selected">'.
                                $dom.'</option>';
             } else {
                 $dom_select .= '<option value="'.$dom.'">'.$dom.'</option>';
@@ -1721,7 +1721,7 @@ sub role_selectors {
             if ($caller eq 'display') {
                 if ((@{$$content{'roles'}{$role_id}{$item}} > 0) && 
                     (grep(/^\Q$entry\E$/,@{$$content{'roles'}{$role_id}{$item}}))) {
-                    $output .= '  <option value="'.$entry.'" selected>'.
+                    $output .= '  <option value="'.$entry.'" selected="selected">'.
                                   $lookup{$item}{$entry}.'</option>';
                     next;
                 }
@@ -1778,8 +1778,23 @@ function getIndexByName(item) {
 
 </script>
 END_SCRIPT
-    $r->print(&mt('Select roles, course status, section(s) and group(s) for users who will be able to access the portfolio file.'));
-    $r->print('<form name="rolepicker" action="/adm/portfolio" method="post"><table><tr><th>'.&mt('Roles').'</th><th>'.&mt('[_1] status',$type).'</th><th>'.&mt('Sections').'</th><th>'.&mt('Groups').'</th></tr><tr>'.$role_selects.'</tr></table><br /><input type="button" name="rolepickbutton" value="Save selections" onclick="setRoles()" />');
+    $r->print(
+        '<p>'
+       .&mt('Select roles, '.lc($type).' status, section(s) and group(s) for users'
+           .' who will be able to access the portfolio file.')
+       .'</p>'
+    );
+    $r->print(
+        '<form name="rolepicker" action="/adm/portfolio" method="post">'
+       .'<table><tr>'
+       .'<th>'.&mt('Roles').'</th>'
+       .'<th>'.&mt("$type status").'</th>'
+       .'<th>'.&mt('Sections').'</th>'
+       .'<th>'.&mt('Groups').'</th>'
+       .'</tr><tr>'.$role_selects.'</tr>'
+       .'</table><br />'
+       .'<input type="button" name="rolepickbutton" value="'.&mt('Save').'" onclick="setRoles()" />'
+    );
     return;
 }