Diff for /loncom/interface/portfolio.pm between versions 1.165 and 1.168

version 1.165, 2006/10/19 20:36:12 version 1.168, 2006/11/01 16:09:04
Line 95  sub display_common { Line 95  sub display_common {
  'createdir_label' =>    'createdir_label' => 
  'Create subdirectory in current directory:');   'Create subdirectory in current directory:');
         my $escuri = &HTML::Entities::encode($r->uri,'&<>"');          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');
   
    # FIXME: This line should be deleted once Portfolio uses breadcrumbs
    $r->print(&Apache::loncommon::help_open_topic('Portfolio About', 'Help on the portfolio'));
   
   
         $r->print(<<"TABLE");           $r->print(<<"TABLE"); 
 <table id="LC_portfolio_actions">  <table id="LC_portfolio_actions">
   <tr id="LC_portfolio_upload">    <tr id="LC_portfolio_upload">
Line 109  sub display_common { Line 116  sub display_common {
  <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="$text{'upload'}" />   <input type="submit" name="storeupl" value="$text{'upload'}" />$help_fileupload
       </form>        </form>
     </td>      </td>
   </tr>    </tr>
Line 124  sub display_common { Line 131  sub display_common {
         <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="$text{'createdir'}" />          <input type="submit" name="createdir" value="$text{'createdir'}" />$help_createdir
       </form>        </form>
     </td>      </td>
   </tr>    </tr>
Line 155  TABLE Line 162  TABLE
         }          }
     }      }
     $r->print('</span>');      $r->print('</span>');
       $r->print(&Apache::loncommon::help_open_topic('Portfolio ChangeDirectory'));
     &Apache::lonhtmlcommon::store_recent($namespace,$current_path,$current_path);      &Apache::lonhtmlcommon::store_recent($namespace,$current_path,$current_path);
     $r->print('<br /><form method="post" action="'.$url.'?mode='.$env{"form.mode"}.'&amp;fieldname='.$env{"form.fieldname"}.&group_args());      $r->print('<br /><form method="post" action="'.$url.'?mode='.$env{"form.mode"}.'&amp;fieldname='.$env{"form.fieldname"}.&group_args());
     $r->print('">'.      $r->print('">'.
Line 259  sub display_directory { Line 267  sub display_directory {
             '<tr><th>Select</th><th>&nbsp;</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 {      } else {
         $r->print('<form method="post" action="'.$url.'">');          $r->print('<form method="post" action="'.$url.'">');
    $r->print(&Apache::loncommon::help_open_topic('Portfolio FileList',
         'Using the portfolio file list'));
         $r->print('<table id="LC_browser">'.          $r->print('<table id="LC_browser">'.
             '<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>');              '<tr><th colspan="2">Actions</th><th>&nbsp;</th><th>&nbsp;</th><th>Name'.
     &Apache::loncommon::help_open_topic('Portfolio OpenFile').
     '</th><th>Size</th><th>Last Modified</th><th>Current Access Status'.
     &Apache::loncommon::help_open_topic('Portfolio ShareFile').
     '</th></tr>');
     }      }
     $r->print("\n".&group_form_data()."\n");      $r->print("\n".&group_form_data()."\n");
   
Line 436  sub display_directory { Line 450  sub display_directory {
         $r->print('</table>');          $r->print('</table>');
         if ($can_delete) {          if ($can_delete) {
             $r->print('              $r->print('
         <input type="submit" name="doit" value="Delete Checked Files" />          <input type="submit" name="doit" value="Delete Checked Files" />'.
    &Apache::loncommon::help_open_topic('Portfolio DeleteFile').'
         <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 550  sub delete_confirmed { Line 565  sub delete_confirmed {
        $env{'form.currentpath'}.         $env{'form.currentpath'}.
        $delete_file);         $delete_file);
         if ($result ne 'ok') {          if ($result ne 'ok') {
     $r->print('<span class="LC_error"> An error occured ('.$result.      $r->print('<span class="LC_error">'.
          ') while trying to delete '.                       &mt('An error occured ([_1]) while trying to delete 
                       &display_file(undef, $delete_file).'</span><br />');                           [_2].',$result,&display_file(undef, $delete_file)).
                         '</span><br /><br />');
         } else {          } else {
             $r->print(&mt('File: [_1] deleted.',              $r->print(&mt('File: [_1] deleted.',
                           &display_file(undef,$delete_file)));                            &display_file(undef,$delete_file)));
Line 563  sub delete_confirmed { Line 579  sub delete_confirmed {
                                                          $group,$file_name);                                                           $group,$file_name);
             if (keys(%access_controls) > 0) {              if (keys(%access_controls) > 0) {
                 my %changes;                   my %changes; 
                 foreach my $key (%{$access_controls{$file_name}}) {                  foreach my $key (keys(%{$access_controls{$file_name}})) {
                     $changes{'delete'}{$key} = 1;                      $changes{'delete'}{$key} = 1;
                 }                  }
                 if (keys(%changes) > 0) {                  if (keys(%changes) > 0) {
Line 573  sub delete_confirmed { Line 589  sub delete_confirmed {
                     if ($outcome ne 'ok') {                      if ($outcome ne 'ok') {
                            $r->print('<br />'.&mt("An error occured ([_1]) while ".                             $r->print('<br />'.&mt("An error occured ([_1]) while ".
                                "trying to delete access controls for the file.",$outcome).                                 "trying to delete access controls for the file.",$outcome).
                                '</span><br />');                                 '</span><br /><br />');
                     } else {                      } else {
                         if ($deloutcome eq 'ok') {                          if ($deloutcome eq 'ok') {
                             $r->print('<br />'.&mt('Access controls also deleted for the file.'));                              $r->print('<br />'.&mt('Access controls also deleted for the file.').'<br /><br />');
                         } else {                          } else {
                             $r->print('<span class="LC_error">'.'<br />'.                              $r->print('<span class="LC_error">'.'<br />'.
                                &mt("An error occured ([_1]) while ".                                 &mt("An error occured ([_1]) while ".
                                    "trying to delete access controls for the file.",$deloutcome).                                     "trying to delete access controls for the file.",$deloutcome).
                                    '</span><br />');                                     '</span><br /><br />');
                         }                          }
                     }                      }
                 }                  }
Line 747  sub display_access { Line 763  sub display_access {
     if ($group eq '') {      if ($group eq '') {
         $info .= (&mt("A listing of files viewable without log-in is available at: <a href='/adm/$udom/$uname/aboutme/portfolio'>http://$ENV{'SERVER_NAME'}/adm/$udom/$uname/aboutme/portfolio</a>.<br />For logged in users a 'Display file listing' link will also appear (when there are viewable files) on your personal information page:<br /><a href='/adm/$udom/$uname/aboutme'>http://$ENV{'SERVER_NAME'}/adm/$udom/$uname/aboutme</a><br />"));          $info .= (&mt("A listing of files viewable without log-in is available at: <a href='/adm/$udom/$uname/aboutme/portfolio'>http://$ENV{'SERVER_NAME'}/adm/$udom/$uname/aboutme/portfolio</a>.<br />For logged in users a 'Display file listing' link will also appear (when there are viewable files) on your personal information page:<br /><a href='/adm/$udom/$uname/aboutme'>http://$ENV{'SERVER_NAME'}/adm/$udom/$uname/aboutme</a><br />"));
     }      }
       
     if ($can_setacl) {      if ($can_setacl) {
         &open_form($r,$url);          &open_form($r,$url);
         $r->print($header.$info);          $r->print($header.$info);
    $r->print ('<br/>'.&Apache::loncommon::help_open_topic('Portfolio ShareFile SetAccess', 'Help on setting up share access'));
    $r->print (&Apache::loncommon::help_open_topic('Portfolio ShareFile ChangeSetting', 'Help on changing settings'));
    $r->print (&Apache::loncommon::help_open_topic('Portfolio ShareFile StopAccess', 'Help on removing share access'));
         &access_setting_table($r,$access_controls{$file_name});          &access_setting_table($r,$access_controls{$file_name});
         my $button_text = {          my $button_text = {
                         'continue' => &mt('Proceed'),                          'continue' => &mt('Proceed'),

Removed from v.1.165  
changed lines
  Added in v.1.168


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