Diff for /loncom/interface/portfolio.pm between versions 1.197 and 1.199

version 1.197, 2008/11/28 16:10:20 version 1.199, 2008/11/28 18:18:39
Line 87  sub display_common { Line 87  sub display_common {
         my $groupitem = &group_form_data();          my $groupitem = &group_form_data();
   
         my $iconpath= $r->dir_config('lonIconsURL') . "/";          my $iconpath= $r->dir_config('lonIconsURL') . "/";
         my %text=&Apache::lonlocal::texthash(          my %lt=&Apache::lonlocal::texthash(
  'upload' => 'Upload',   'upload' => 'Upload',
  'upload_label' =>     'upload_label' => 'Upload file to current directory',
  'Upload file to current directory:',  
  'createdir' => 'Create Subdirectory',   'createdir' => 'Create Subdirectory',
  'createdir_label' =>    'createdir_label' => 
  'Create subdirectory in current directory:',   'Create subdirectory in current directory',
                                          'parse' => 'If HTML file, upload embedded images/multimedia/css/linked files'                                           'parse' => 'If HTML file, upload embedded images/multimedia/css/linked files'
                                             );                                              );
         my $escuri = &HTML::Entities::encode($r->uri,'&<>"');          my $escuri = &HTML::Entities::encode($r->uri,'&<>"');
Line 108  sub display_common { Line 107  sub display_common {
             $parse_check = <<"END";              $parse_check = <<"END";
         <br />          <br />
         <span class="LC_nobreak">          <span class="LC_nobreak">
          <label>$text{'parse'}           <label>$lt{'parse'}
          <input type="checkbox" name="parserflag" checked="checked" />           <input type="checkbox" name="parserflag" checked="checked" />
          </label>           </label>
         </span>          </span>
 END  END
         }          }
         $r->print(<<"TABLE");   
 <table id="LC_portfolio_actions">          $r->print('<div>');
   <tr id="LC_portfolio_upload">          # Upload File
     <td class="LC_label">          $r->print('<div class="LC_left_float">'
       $text{'upload_label'}                   .'<form method="post" enctype="multipart/form-data" action="'.$escuri.'">'
     </td>                   .'<fieldset>'
     <td class="LC_value">                   .'<legend>'.$lt{'upload_label'}.'</legend>'
       <form method="post" enctype="multipart/form-data" action="$escuri">                   .$groupitem 
         $groupitem                    .'<input name="uploaddoc" type="file" />'
         <input name="uploaddoc" type="file" />                   .'<input type="hidden" name="currentpath" value="'.$current_path.'" />'
  <input type="hidden" name="currentpath" value="$current_path" />                   .'<input type="hidden" name="action" value="'.$env{"form.action"}.'" />'
  <input type="hidden" name="action" value="$env{"form.action"}" />                   .'<input type="hidden" name="fieldname" value="'.$env{"form.fieldname"}.'" />'
  <input type="hidden" name="fieldname" value="$env{"form.fieldname"}" />                   .'<input type="hidden" name="mode" value="'.$env{"form.mode"}.'" />'
  <input type="hidden" name="mode" value="$env{"form.mode"}" />                   .'<input type="submit" name="storeupl" value="'.$lt{'upload'}.'" />'
  <input type="submit" name="storeupl" value="$text{'upload'}" />                   .$help_fileupload
 $help_fileupload                   .$parse_check
 $parse_check                   .'</fieldset>'
       </form>                   .'</form>'
     </td>                   .'</div>'
   </tr>          );
   <tr id="LC_portfolio_createdir">          # Create Subdirectory
     <td class="LC_label">          $r->print('<div class="LC_left_float">'
       $text{'createdir_label'}                   .'<form method="post" action="'.$escuri.'">'
     </td>                   .'<fieldset>'
     <td class="LC_value">                   .'<legend>'.$lt{'createdir_label'}.'</legend>'
       <form method="post" action="$escuri">                   .'<input name="newdir" type="input" />'.$groupitem
         <input name="newdir" type="input" />$groupitem                   .'<input type="hidden" name="currentpath" value="'.$current_path.'" />'
         <input type="hidden" name="currentpath" value="$current_path" />                   .'<input type="hidden" name="action" value="'.$env{"form.action"}.'" />'
         <input type="hidden" name="action" value="$env{"form.action"}" />                   .'<input type="hidden" name="fieldname" value="'.$env{"form.fieldname"}.'" />'
         <input type="hidden" name="fieldname" value="$env{"form.fieldname"}" />                   .'<input type="hidden" name="mode" value="'.$env{"form.mode"}.'" />'
         <input type="hidden" name="mode" value="$env{"form.mode"}" />                   .'<input type="submit" name="createdir" value="'.$lt{'createdir'}.'" />'
         <input type="submit" name="createdir" value="$text{'createdir'}" />$help_createdir                   .$help_createdir
       </form>                   .'</fieldset>'
     </td>                   .'</form>'
   </tr>                   .'</div>'
 </table>          );
 TABLE          $r->print('</div>');
     }      } # end "if can_upload"
   
     my @tree = split (/\//,$current_path);      my @tree = split (/\//,$current_path);
     my %anchor_fields = (      my %anchor_fields = (
         'selectfile'    => $port_path,          'selectfile'    => $port_path,
Line 271  sub display_directory { Line 271  sub display_directory {
         $display_out = '<form method="post" action="'.$url.'">'.          $display_out = '<form method="post" action="'.$url.'">'.
     &group_form_data().      &group_form_data().
         '<input type="hidden" name="action" value="deletedir" />'.          '<input type="hidden" name="action" value="deletedir" />'.
           '<p>'.
         '<input type="submit" name="deletedir" value="'.&mt("Delete Directory").'" />'.          '<input type="submit" name="deletedir" value="'.&mt("Delete Directory").'" />'.
           '</p>'.
         '<input type="hidden" name="selectfile" value="" />'.          '<input type="hidden" name="selectfile" value="" />'.
         '<input type="hidden" name="currentpath" value="'.$current_path.'" />'.          '<input type="hidden" name="currentpath" value="'.$current_path.'" />'.
         '</form>';          '</form>';
Line 477  sub display_directory { Line 479  sub display_directory {
             <input type="hidden" name="continue" value="true" />              <input type="hidden" name="continue" value="true" />
             <input type="hidden" name="fieldname" value="'.$env{'form.fieldname'}.'" />              <input type="hidden" name="fieldname" value="'.$env{'form.fieldname'}.'" />
             <input type="hidden" name="mode" value="selectfile" />              <input type="hidden" name="mode" value="selectfile" />
             <input type="submit" name="submit" value="Select checked files, and continue selecting." /><br />              <p>
             <input type="button" name="doit" onClick= "finishSelect();" value="Select checked files, and close window" />              <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').'" />
               </p>
             <input type="hidden" name="currentpath" value="'.$current_path.'" />              <input type="hidden" name="currentpath" value="'.$current_path.'" />
         </form>');                  </form>');        
     } else {      } else {
         $r->print(&Apache::loncommon::end_data_table());          $r->print(&Apache::loncommon::end_data_table());
         if ($can_delete) {          if ($can_delete) {
             $r->print('              $r->print('
           <p>
         <input type="submit" name="doit" value="'.&mt('Delete Selected').'" />'.          <input type="submit" name="doit" value="'.&mt('Delete Selected').'" />'.
  &Apache::loncommon::help_open_topic('Portfolio DeleteFile').'   &Apache::loncommon::help_open_topic('Portfolio DeleteFile').'
           </p>
         <input type="hidden" name="action" value="delete" />          <input type="hidden" name="action" value="delete" />
         <input type="hidden" name="currentpath" value="'.$current_path.'" />          <input type="hidden" name="currentpath" value="'.$current_path.'" />
         </form>'          </form>'
Line 1773  ENDSMP Line 1779  ENDSMP
         </script>          </script>
 ENDSMP  ENDSMP
     $r->print($javascript);      $r->print($javascript);
     $r->print("<h1>".&mt('Select portfolio files')."</h1>".      $r->print("<h1>".&mt('Select portfolio files')."</h1>");
                 &mt('Check as many as you wish in response to the problem.')."<br />");  
     my @otherfiles=&Apache::lonnet::files_not_in_path($env{'user.name'}, $env{'form.currentpath'});      my @otherfiles=&Apache::lonnet::files_not_in_path($env{'user.name'}, $env{'form.currentpath'});
     if (@otherfiles) {      if (@otherfiles) {
  $r->print("<strong>".&mt('Files selected from other directories:')."</strong><br />");   $r->print(&Apache::loncommon::start_data_table()
                    .&Apache::loncommon::start_data_table_header_row()
                    .'<th>'.&mt('Files selected from other directories:')."</th>"
                    .&Apache::loncommon::end_data_table_header_row()
           );
  foreach my $file (@otherfiles) {   foreach my $file (@otherfiles) {
     $r->print($file."<br />");      $r->print(&Apache::loncommon::start_data_table_row()
                        .'<td>'.$file."</td>"
                        .&Apache::loncommon::end_data_table_row()
               );
  }   }
           $r->print(&Apache::loncommon::end_data_table()
                    .'<br />'
           );
     }      }
       $r->print('<div>'
                .&mt('Check as many files as you wish in response to the problem:')
                .'</div>'
       );
 }  }
   
   

Removed from v.1.197  
changed lines
  Added in v.1.199


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>