Diff for /loncom/interface/portfolio.pm between versions 1.236 and 1.240

version 1.236, 2012/07/30 13:10:57 version 1.240, 2013/04/11 14:59:49
Line 63  sub group_form_data { Line 63  sub group_form_data {
     return $output;      return $output;
 }   } 
   
 # receives a file name and path stub from username/userfiles/portfolio/  # receives a filename and path stub from username/userfiles/portfolio/
 # returns an anchor tag consisting encoding filename and currentpath  # returns an anchor tag consisting encoding filename and currentpath
 sub make_anchor {  sub make_anchor {
     my ($url, $anchor_fields, $inner_text) = @_;      my ($url, $anchor_fields, $inner_text) = @_;
Line 650  sub done { Line 650  sub done {
         'symb'      => $env{'form.symb'},          'symb'      => $env{'form.symb'},
         'mode'      => $env{'form.mode'}          'mode'      => $env{'form.mode'}
     );      );
     my $result = '<h3>'.&make_anchor($url,\%anchor_fields,&mt($message)).'</h3>';      my $result = '<p>'.&make_anchor($url,\%anchor_fields,&mt($message)).'</p>';
     return $result;      return $result;
 }  }
   
Line 670  sub delete { Line 670  sub delete {
             $r->print('<p>'.&mt('Delete [_1]?',&display_file(undef,\@files)).'</p>');              $r->print('<p>'.&mt('Delete [_1]?',&display_file(undef,\@files)).'</p>');
             &close_form($r,$url);              &close_form($r,$url);
         } else {          } else {
             $r->print("No file was checked to delete.<br />");              $r->print('<p class="LC_warning">'.&mt('No file was checked to delete.').'</p>');
             $r->print(&done(undef,$url));              $r->print(&done(undef,$url));
         }          }
     }      }
Line 809  sub rename_confirmed { Line 809  sub rename_confirmed {
         return;          return;
     }      }
     if ($filenewname ne $env{'form.filenewname'}) {      if ($filenewname ne $env{'form.filenewname'}) {
         $r->print(&mt("The new file name was changed from:<br />[_1] to [_2]",          $r->print(&mt("The new filename was changed from:<br />[_1] to [_2]",
       '<strong>'.&display_file('',$env{'form.filenewname'}).'</strong>',        '<strong>'.&display_file('',$env{'form.filenewname'}).'</strong>',
       '<strong>'.&display_file('',$filenewname).'</strong>'));        '<strong>'.&display_file('',$filenewname).'</strong>'));
     }      }
Line 2119  sub print_dependency_form { Line 2119  sub print_dependency_form {
             $r->print('<h3>'.&mt("Reference Information").'</h3>');              $r->print('<h3>'.&mt("Reference Information").'</h3>');
         }          }
         if ($num) {          if ($num) {
             $r->print('<p>'.&mt("Completed upload of the file. This file contained references to other files. You must upload the referenced files or else the uploaded file may not work properly.").'</p>'.              $r->print('<p>'.&mt('Completed upload of the file.').' '.
                         &mt('This file contained references to other files.').' '.
                         &mt('You must upload the referenced files or else the uploaded file may not work properly.').
                         '</p>'.
                       '<p>'.&mt("Please select the locations from which the referenced files are to be uploaded.").'</p>'.                        '<p>'.&mt("Please select the locations from which the referenced files are to be uploaded.").'</p>'.
                        $embedded.                         $embedded.
                        '<p>'.&mt('or').'</p>'.&done('Return to directory',$url));                         '<p>'.&mt('or').'</p>'.&done('Return to directory',$url));
Line 2376  sub get_port_path { Line 2379  sub get_port_path {
   
 sub missing_priv {  sub missing_priv {
     my ($r,$url,$priv) = @_;      my ($r,$url,$priv) = @_;
     my $longtext = {      my %longtext = 
           &Apache::lonlocal::texthash(
                       upload => 'upload files',                        upload => 'upload files',
                       delete => 'delete files',                        delete => 'delete files',
                       rename => 'rename files',                        rename => 'rename files',
                       setacl => 'set access controls for files',                        setacl => 'set access controls for files',
                    };      );
     my $escpath = &HTML::Entities::encode($env{'form.currentpath'},'&<>"');      my $escpath = &HTML::Entities::encode($env{'form.currentpath'},'&<>"');
     my $rtnlink = '<a href="'.$url;      my $rtnlink = '<a href="'.$url;
     if ($url =~ /\?/) {      if ($url =~ /\?/) {
Line 2391  sub missing_priv { Line 2395  sub missing_priv {
     }      }
     $rtnlink .= 'currentpath='.$escpath;      $rtnlink .= 'currentpath='.$escpath;
     $r->print('<h3>'.&mt('Action disallowed').'</h3>');      $r->print('<h3>'.&mt('Action disallowed').'</h3>');
     $r->print(&mt('You do not have sufficient privileges to [_1] ',      $r->print(&mt('You do not have sufficient privileges to [_1]',
                   $longtext->{$priv}));                    $longtext{$priv}));
     if (defined($env{'form.group'})) {      if (defined($env{'form.group'})) {
         $r->print(&mt("in the group's group portfolio."));          $r->print(' '.&mt("in the group's group portfolio."));
         $rtnlink .= &group_args()          $rtnlink .= &group_args()
     } else {      } else {
         $r->print(&mt('in this portfolio.'));          $r->print(' '.&mt('in this portfolio.'));
     }      }
     $rtnlink .= '">'.&mt('Return to directory').'</a>';      $rtnlink .= '">'.&mt('Return to directory').'</a>';
     $r->print('<br />'.$rtnlink);      $r->print('<br />'.$rtnlink);
Line 2617  sub handler { Line 2621  sub handler {
         }          }
     }      }
     if (($env{'form.storeupl'}) & (!$env{'form.uploaddoc.filename'})){      if (($env{'form.storeupl'}) & (!$env{'form.uploaddoc.filename'})){
     $r->print('<span class="LC_error">');      $r->print('<span class="LC_warning">');
     $r->print(&mt('No file was selected to upload.').' ');      $r->print(&mt('No file was selected to upload.').' ');
  $r->print(&mt('To upload a file, click <strong>Browse...</strong> and select a file, then click <strong>Upload</strong>.'));   $r->print(&mt('To upload a file, click <strong>Browse...</strong> and select a file, then click <strong>Upload</strong>.'));
  $r->print('</span>');   $r->print('</span>');

Removed from v.1.236  
changed lines
  Added in v.1.240


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