Diff for /loncom/interface/londocs.pm between versions 1.354 and 1.356

version 1.354, 2009/03/10 18:49:22 version 1.356, 2009/03/16 21:44:38
Line 2889  HIDDENFORM Line 2889  HIDDENFORM
     }      }
 # --------------------------------------------------------- Main tab structure  # --------------------------------------------------------- Main tab structure
     my $activeClass = 1;      my $activeClass = 1;
       my $active = '';
     $r->print('<ul class="LC_TabContentBigger" id="mainnav">');      $r->print('<ul class="LC_TabContentBigger" id="mainnav">');
     if (($standard) && ($allowed) && (!$forcesupplement)) {      if (($standard) && ($allowed) && (!$forcesupplement) && ($env{'form.folderpath'}=~/^default/)) {
  my $active = '';  
         if($activeClass == 1){          if($activeClass == 1){
            $active = 'class="active"';             $active = 'class="active"';
    $activeClass = 0;     $activeClass = 0;
  }   }
  $r->print('<li '.$active.'onclick="javascript:showPage(this,\'Main Course Documents\',\'mainnav\',\'maincoursedoc\');">'.&mt('Main Course Documents').'</li>');  
     }      }
     if (!$forcestandard) {      $r->print('<li '.$active.'onclick="javascript:showPage(this,\'Main Course Documents\',\'mainnav\',\'maincoursedoc\');">'.&mt('Main Course Documents').'</li>');
  my $active = '';      $active = '';
       if (!$forcestandard || ($env{'form.folderpath'}=~/^supplemental/)) {
         if($activeClass == 1){          if($activeClass == 1){
            $active = 'class="active"';             $active = 'class="active"';
         }          }
  $r->print('<li '.$active.'onclick="javascript:showPage(this,\'Supplemental Course Documents\',\'mainnav\',\'maincoursedoc\');">'.&mt('Supplemental Course Documents').'</li>');  
     }      }
       $r->print('<li '.$active.'onclick="javascript:showPage(this,\'Supplemental Course Documents\',\'mainnav\',\'maincoursedoc\');">'.&mt('Supplemental Course Documents').'</li>');
     $r->print('</ul><div class="LC_ContentBoxSpecial" style="margin:0 0;padding:0 0;"><div id="maincoursedoc" style="margin:0 0;padding:0 0;">');      $r->print('</ul><div class="LC_ContentBoxSpecial" style="margin:0 0;padding:0 0;"><div id="maincoursedoc" style="margin:0 0;padding:0 0;">');
 # --------------------------------------------------------- Standard documents  # --------------------------------------------------------- Standard documents
     if (($standard) && ($allowed) && (!$forcesupplement)) {         my $savefolderpath;
        my $active = 'style="display: none;"';         my $active = 'style="display: none;"';
        if($activeClass == 0){         if($activeClass == 0){
           $active = 'style="display: block;"';            $active = 'style="display: block;"';
Line 2916  HIDDENFORM Line 2916  HIDDENFORM
         $r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc',          $r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc',
                      &mt('Editing the Table of Contents for your '.$type)));                       &mt('Editing the Table of Contents for your '.$type)));
        my $folder=$env{'form.folder'};         my $folder=$env{'form.folder'};
        if ($folder eq '' || $folder eq 'supplemental') {         if ($folder eq '' || $folder=~/^supplemental/) {
            $folder='default';             $folder='default';
      $savefolderpath = $env{'form.folderpath'};
    $env{'form.folderpath'}='default&'.&escape(&mt('Main '.$type.' Documents'));     $env{'form.folderpath'}='default&'.&escape(&mt('Main '.$type.' Documents'));
            $uploadtag = '<input type="hidden" name="folderpath" value="'.             $uploadtag = '<input type="hidden" name="folderpath" value="'.
        &HTML::Entities::encode($env{'form.folderpath'},'<>&"').'" />';         &HTML::Entities::encode($env{'form.folderpath'},'<>&"').'" />';
Line 3154  $r->print(&generate_edit_table($tid,$con Line 3155  $r->print(&generate_edit_table($tid,$con
 $r->print('</div>');  $r->print('</div>');
        if ($env{'form.pagepath'}) {         if ($env{'form.pagepath'}) {
        }         }
     }  
 # ----------------------------------------------------- Supplemental documents  # ----------------------------------------------------- Supplemental documents
     if (!$forcestandard) {  
        my $active = 'style="display: none;"';         my $active = 'style="display: none;"';
        if($activeClass == 1){         if($activeClass == 1){
           $active = 'style="display: block;"';            $active = 'style="display: block;"';
Line 3170  $r->print('</div>'); Line 3169  $r->print('</div>');
    (($env{'form.folderpath'} =~ /^default\&/) || ($env{'form.folderpath'} eq ''))) {     (($env{'form.folderpath'} =~ /^default\&/) || ($env{'form.folderpath'} eq ''))) {
           $env{'form.folderpath'} = 'supplemental&'.            $env{'form.folderpath'} = 'supplemental&'.
                                     &escape(&mt('Supplemental '.$type.' Documents'));                                      &escape(&mt('Supplemental '.$type.' Documents'));
          }else{
     $env{'form.folderpath'} = $savefolderpath;
        }         }
        if ($allowed) {         if ($allowed) {
    my $folderseq=     my $folderseq=
Line 3274  my $error = &editor($r,$coursenum,$cours Line 3275  my $error = &editor($r,$coursenum,$cours
        }         }
 $r->print('</div>');  $r->print('</div>');
  }    } 
    }  
 $r->print('</div>');  $r->print('</div>');
     if ($allowed) {      if ($allowed) {
  $r->print('   $r->print('

Removed from v.1.354  
changed lines
  Added in v.1.356


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