Diff for /loncom/interface/londocs.pm between versions 1.543 and 1.550

version 1.543, 2013/04/03 02:00:19 version 1.550, 2013/05/21 19:30:11
Line 340  sub group_import { Line 340  sub group_import {
                 }                  }
                 my $initialtext = &mt('Replace with your own content.');                  my $initialtext = &mt('Replace with your own content.');
                 my $newhtml = <<END;                  my $newhtml = <<END;
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  <html>
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">  
 <head>  <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
 <title>$name</title>  <title>$name</title>
 </head>  </head>
 <body bgcolor="#ffffff">  <body bgcolor="#ffffff">
Line 490  sub docs_change_log { Line 488  sub docs_change_log {
     }      }
     my $folderpath=$env{'form.folderpath'};      my $folderpath=$env{'form.folderpath'};
     if ($folderpath eq '') {      if ($folderpath eq '') {
         $folderpath = 'default&'.&escape(&mt('Main '.$crstype.' Content').':::::');          $folderpath = 'default&'.&escape(&mt('Main Content').':::::');
     }      }
     $pathitem = '<input type="hidden" name="folderpath" value="'.      $pathitem = '<input type="hidden" name="folderpath" value="'.
                 &HTML::Entities::encode($folderpath,'<>&"').'" />';                  &HTML::Entities::encode($folderpath,'<>&"').'" />';
Line 2332  sub editor { Line 2330  sub editor {
     my $jumpto;      my $jumpto;
   
     unless ($supplementalflag) {      unless ($supplementalflag) {
         $jumpto = "'uploaded/$coursedom/$coursenum/$folder.$container'";          $jumpto = "uploaded/$coursedom/$coursenum/$folder.$container";
     }      }
   
     unless ($allowed) {      unless ($allowed) {
Line 2630  sub editor { Line 2628  sub editor {
   
     my $need_save;      my $need_save;
     if (($allowed) || ($supplementalflag && $folder eq 'supplemental')) {      if (($allowed) || ($supplementalflag && $folder eq 'supplemental')) {
         my $toolslink = '<table><tr><td>'          my $toolslink;
           if ($allowed || &Apache::lonnet::allowed('mdc',$env{'request.course.id'})) {
               $toolslink = '<table><tr><td>'
                        .&Apache::loncommon::help_open_menu('Navigation Screen',                         .&Apache::loncommon::help_open_menu('Navigation Screen',
                                                            'Navigation_Screen',undef,'RAT')                                                             'Navigation_Screen',undef,'RAT')
                        .'</td><td class="LC_middle">'.&mt('Tools:').'</td>'                         .'</td><td class="LC_middle">'.&mt('Tools:').'</td>'
Line 2640  sub editor { Line 2640  sub editor {
                        .'class="LC_toolbarItem" '                         .'class="LC_toolbarItem" '
                        .'title="'.&mt('Supplemental Content Editor').'">'                         .'title="'.&mt('Supplemental Content Editor').'">'
                        .'</a></li></ul></td></tr></table><br />';                         .'</a></li></ul></td></tr></table><br />';
           }
         if ($shown) {          if ($shown) {
             if ($allowed) {              if ($allowed) {
                 $to_show = &Apache::loncommon::start_scrollbox('900px','880px','400px','contentscroll')                  $to_show = &Apache::loncommon::start_scrollbox('900px','880px','400px','contentscroll')
Line 2703  sub editor { Line 2704  sub editor {
             }              }
             $to_show .= &Apache::loncommon::start_scrollbox('400px','380px','200px','contentscroll')              $to_show .= &Apache::loncommon::start_scrollbox('400px','380px','200px','contentscroll')
                        .'<div class="LC_info" id="contentlist">'                         .'<div class="LC_info" id="contentlist">'
                        .&mt('Currently no documents.')                         .&mt('Currently empty')
                        .'</div>'                         .'</div>'
                        .&Apache::loncommon::end_scrollbox();                         .&Apache::loncommon::end_scrollbox();
         }          }
Line 2716  sub editor { Line 2717  sub editor {
                       .'</div>';                        .'</div>';
         } else {          } else {
             $to_show = '<div class="LC_info" id="contentlist">'              $to_show = '<div class="LC_info" id="contentlist">'
                       .&mt('Currently no documents.')                        .&mt('Currently empty')
                       .'</div>'                        .'</div>'
         }          }
     }      }
Line 3650  sub list_symbs { Line 3651  sub list_symbs {
 sub verifycontent {  sub verifycontent {
     my ($r) = @_;      my ($r) = @_;
     my $crstype = &Apache::loncommon::course_type();      my $crstype = &Apache::loncommon::course_type();
     $r->print(&Apache::loncommon::start_page('Verify '.$crstype.' Documents'));      $r->print(&Apache::loncommon::start_page('Verify '.$crstype.' Content'));
     $r->print(&Apache::lonhtmlcommon::breadcrumbs('Verify '.$crstype.' Documents'));      $r->print(&Apache::lonhtmlcommon::breadcrumbs('Verify '.$crstype.' Content'));
     $r->print(&startContentScreen('tools'));      $r->print(&startContentScreen('tools'));
     $r->print('<h4 class="LC_info">'.&mt($crstype.' content verification').'</h4>');       $r->print('<h4 class="LC_info">'.&mt($crstype.' content verification').'</h4>'); 
    $hashtied=0;     $hashtied=0;
Line 3753  sub checkversions { Line 3754  sub checkversions {
     &changewarning($r,'');      &changewarning($r,'');
     if ($env{'form.timerange'} eq 'all') {      if ($env{'form.timerange'} eq 'all') {
 # show all documents  # show all documents
  $header=&mt('All Documents in '.$crstype);   $header=&mt('All content in '.$crstype);
  $allsel=' selected="selected"';   $allsel=' selected="selected"';
  foreach my $key (keys(%hash)) {   foreach my $key (keys(%hash)) {
     if ($key=~/^ids\_(\/res\/.+)$/) {      if ($key=~/^ids\_(\/res\/.+)$/) {
Line 4031  sub startContentScreen { Line 4032  sub startContentScreen {
         $output .= '<li'.(($mode eq 'courseindex')?' class="active"':'').'><a href="/adm/indexcourse"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.&mt('Content Index').'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></a></li>'."\n";          $output .= '<li'.(($mode eq 'courseindex')?' class="active"':'').'><a href="/adm/indexcourse"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.&mt('Content Index').'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></a></li>'."\n";
         $output .= '<li '.(($mode eq 'suppdocs')?' class="active"':'').'><a href="/adm/supplemental"><b>'.&mt('Supplemental Content').'</b></a></li>';          $output .= '<li '.(($mode eq 'suppdocs')?' class="active"':'').'><a href="/adm/supplemental"><b>'.&mt('Supplemental Content').'</b></a></li>';
     } else {      } else {
         $output .= '<li '.(($mode eq 'docs')?' class="active"':'').' id="tabbededitor"><a href="/adm/coursedocs?forcestandard=1"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.&mt('Content Editor').'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></a></li>'."\n";          $output .= '<li '.(($mode eq 'docs')?' class="active"':'').' id="tabbededitor"><a href="/adm/coursedocs?forcestandard=1"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.&mt('Main Content Editor').'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></a></li>'."\n";
         $output .= '<li '.(($mode eq 'suppdocs')?' class="active"':'').'><a href="/adm/coursedocs?forcesupplement=1"><b>'.&mt('Supplemental Content Editor').'</b></a></li>'."\n";          $output .= '<li '.(($mode eq 'suppdocs')?' class="active"':'').'><a href="/adm/coursedocs?forcesupplement=1"><b>'.&mt('Supplemental Content Editor').'</b></a></li>'."\n";
         $output .= '<li '.(($mode eq 'tools')?' class="active"':'').'><a href="/adm/coursedocs?tools=1"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.&mt('Content Utilities').'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></a></li>'."\n";          $output .= '<li '.(($mode eq 'tools')?' class="active"':'').'><a href="/adm/coursedocs?tools=1"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.&mt('Content Utilities').'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></a></li>'."\n";
                    '><a href="/adm/coursedocs?tools=1"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.&mt('Content Utilities').'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></a></li>';                     '><a href="/adm/coursedocs?tools=1"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.&mt('Content Utilities').'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></a></li>';
Line 4052  sub endContentScreen { Line 4053  sub endContentScreen {
 }  }
   
 sub supplemental_base {  sub supplemental_base {
     return 'supplemental&'.&escape(&mt('Supplemental '.&Apache::loncommon::course_type().' Content'));      return 'supplemental&'.&escape(&mt('Supplemental Content'));
 }  }
   
 sub handler {  sub handler {
Line 4185  sub handler { Line 4186  sub handler {
        }         }
    } elsif ($env{'form.command'} eq 'editdocs') {     } elsif ($env{'form.command'} eq 'editdocs') {
        $env{'form.folderpath'} = 'default&'.         $env{'form.folderpath'} = 'default&'.
                                  &escape(&mt('Main '.$crstype.' Content').':::::');                                   &escape(&mt('Main Content').':::::');
        &Apache::lonnet::appenv({'docs.exit.'.$env{'request.course.id'} => $env{'form.command'}});         &Apache::lonnet::appenv({'docs.exit.'.$env{'request.course.id'} => $env{'form.command'}});
    } elsif ($env{'form.command'} eq 'editsupp') {     } elsif ($env{'form.command'} eq 'editsupp') {
        $env{'form.folderpath'} = 'supplemental&'.         $env{'form.folderpath'} = 'supplemental&'.
Line 4230  sub handler { Line 4231  sub handler {
        if ($supplementalflag) {         if ($supplementalflag) {
           $env{'form.folderpath'}=&supplemental_base();            $env{'form.folderpath'}=&supplemental_base();
        } else {         } else {
           $env{'form.folderpath'}='default'.&escape(&mt('Main '.$crstype.' Content').            $env{'form.folderpath'}='default&'.&escape(&mt('Main Content').
                                   ':::::');                                    ':::::');
        }         }
     }      }
Line 4256  sub handler { Line 4257  sub handler {
             if ($env{'form.folder'} eq '' ||              if ($env{'form.folder'} eq '' ||
                 $env{'form.folder'} eq 'supplemental') {                  $env{'form.folder'} eq 'supplemental') {
                 $folderpath='default&'.                  $folderpath='default&'.
                             &escape(&mt('Main '.$crstype.' Content').':::::');                              &escape(&mt('Main Content').':::::');
             }              }
         }          }
         $containertag = '<input type="hidden" name="folderpath" value="" />';          $containertag = '<input type="hidden" name="folderpath" value="" />';
Line 4581  HIDDENFORM Line 4582  HIDDENFORM
        if ($folder eq '' || $supplementalflag) {         if ($folder eq '' || $supplementalflag) {
            $folder='default';             $folder='default';
    $savefolderpath = $env{'form.folderpath'};     $savefolderpath = $env{'form.folderpath'};
    $env{'form.folderpath'}='default&'.&escape(&mt('Content'));     $env{'form.folderpath'}='default&'.&escape(&mt('Main Content'));
            $pathitem = '<input type="hidden" name="folderpath" value="'.             $pathitem = '<input type="hidden" name="folderpath" value="'.
        &HTML::Entities::encode($env{'form.folderpath'},'<>&"').'" />';         &HTML::Entities::encode($env{'form.folderpath'},'<>&"').'" />';
        }         }
Line 5234  sub generate_edit_table { Line 5235  sub generate_edit_table {
     $form = '<div class="LC_Box" style="margin:0;">'.      $form = '<div class="LC_Box" style="margin:0;">'.
             '<ul id="navigation'.$tid.'" class="LC_TabContent">'."\n".              '<ul id="navigation'.$tid.'" class="LC_TabContent">'."\n".
             '<li class="goback">'.              '<li class="goback">'.
             '<a href="javascript:toContents('.$jumpto.');">'.              '<a href="javascript:toContents('."'$jumpto'".');">'.
             '<img src="'.$backicon.'" class="LC_icon" style="border: none; vertical-align: top;"'.              '<img src="'.$backicon.'" class="LC_icon" style="border: none; vertical-align: top;"'.
             '  alt="'.$backtext.'" />'.$backtext.'</a></li>'."\n".              '  alt="'.$backtext.'" />'.$backtext.'</a></li>'."\n".
             '<li>'.              '<li>'.
Line 5365  sub editing_js { Line 5366  sub editing_js {
         $main_container_page = 1;          $main_container_page = 1;
     }      }
     my $toplevelmain =       my $toplevelmain = 
         &escape(&mt('Main '.$crstype.' Content').':::::');          &escape(&mt('Main Content').':::::');
     my $toplevelsupp = &supplemental_base();      my $toplevelsupp = &supplemental_base();
   
     my $backtourl;      my $backtourl;
Line 5379  sub editing_js { Line 5380  sub editing_js {
             if (&Apache::lonnet::is_on_map($res)) {              if (&Apache::lonnet::is_on_map($res)) {
                 $backtourl = &HTML::Entities::encode(&Apache::lonnet::clutter($res),'<>&"').'?symb='.                  $backtourl = &HTML::Entities::encode(&Apache::lonnet::clutter($res),'<>&"').'?symb='.
                              &HTML::Entities::encode($caller,'<>&"');                               &HTML::Entities::encode($caller,'<>&"');
               } else {
                   $backtourl = '/adm/navmaps';
             }              }
         }          }
     } elsif ($env{'docs.exit.'.$env{'request.course.id'}} eq '/adm/menu') {      } elsif ($env{'docs.exit.'.$env{'request.course.id'}} eq '/adm/menu') {

Removed from v.1.543  
changed lines
  Added in v.1.550


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