--- loncom/interface/londocs.pm 2009/02/02 11:23:56 1.333 +++ loncom/interface/londocs.pm 2009/02/03 18:31:59 1.335 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.333 2009/02/02 11:23:56 muellerd Exp $ +# $Id: londocs.pm,v 1.335 2009/02/03 18:31:59 ehlerst Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2874,11 +2874,35 @@ ERFORM } $r->print(&generate_admin_options($containertag,$uploadtag,\%lt,\%help,\%env)); - $r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc', - &mt('Editing the Table of Contents for your '.$type))); } +# --------------------------------------------------------- Main tab structure + my $activeClass = 1; + $r->print('
'); # --------------------------------------------------------- Standard documents if (($standard) && ($allowed) && (!$forcesupplement)) { + my $active = 'style="display: none;"'; + if($activeClass == 0){ + $active = 'style="display: block;"'; + } + $r->print('
'); + $r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc', + &mt('Editing the Table of Contents for your '.$type))); my $folder=$env{'form.folder'}; if ($folder eq '' || $folder eq 'supplemental') { $folder='default'; @@ -2893,11 +2917,6 @@ ERFORM #$postexec='self.close();'; } $hadchanges=0; - my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed, - $upload_output,$type); - if ($error) { - $r->print('

'.$error.'

'); - } if ($hadchanges) { &mark_hash_old(); } @@ -3106,24 +3125,35 @@ my %orderhash = ( 'bb' => 'Published Documents', 'cc' => 'Special Documents', 'dd' => 'More Options', - 'zz' => 'Hide all Option', + 'zz' => 'Hide all Options', ); my %namehash = ( 'New Document' => $fileuploadform, 'Published Documents' => $simpleeditdefaultform, 'Special Documents' => $specialdocumentsform, 'More Options' => $extresourcesform.'
'.$imspform.'
'.$recoverform, - 'drei' => 'dr', ); -my $tid = '1'; -my $varcd = 'Course Documents'; -$r->print(&generate_edit_table($varcd,\%namehash,\%orderhash)); +my $tid='1'; +my $content='content'; +my $navigation='navigation'; +my $varcd = 'Main Course Documents'; +$r->print(&generate_edit_table($tid,$content,$navigation,$varcd,\%namehash,\%orderhash)); +my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type); + if ($error) { + $r->print('

'.$error.'

'); + } +$r->print('
'); } if ($env{'form.pagepath'}) { } } # ----------------------------------------------------- Supplemental documents if (!$forcestandard) { + my $active = 'style="display: none;"'; + if($activeClass == 1){ + $active = 'style="display: block;"'; + } + $r->print('
'); my $folder=$env{'form.folder'}; unless ($folder=~/^supplemental/) { $folder='supplemental'; @@ -3133,10 +3163,6 @@ $r->print(&generate_edit_table($varcd,\% $env{'form.folderpath'} = 'supplemental&'. &escape(&mt('Supplemental '.$type.' Documents')); } - my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type); - if ($error) { - $r->print('

'.$error.'

'); - } if ($allowed) { my $folderseq= '/uploaded/'.$coursedom.'/'.$coursenum.'/supplemental_'.time. @@ -3227,20 +3253,21 @@ my %supnamehash = ( 'New Document' => $supupdocform, 'Special Documents' => $supnewfolderform.'
'.$supnewextform.'
'.$supnewsylform.'
'.$supnewaboutmeform, ); -my $tid='2'; -my $varscd = 'Supplemented Course Documents'; - -$r->print(< -
  • New Document
  • -
  • Special Documents
  • - -FORM -#$r->print(&generate_edit_table($varscd,\%supnamehash,\%suporderhash)); +my $tid='2'; +my $content='content'; +my $navigation='navigation'; +my $varscd = 'Supplemental Course Documents'; +$r->print(&generate_edit_table($tid,$content,$navigation,$varscd,\%supnamehash,\%suporderhash)); +my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type); + if ($error) { + $r->print('

    '.$error.'

    '); + } +$r->print('print('
    '); if ($allowed) { $r->print('
    @@ -3313,28 +3340,28 @@ ENDOPTIONFORM sub generate_edit_table { - my ($varcd,$namehash_ref,$orderhash_ref) = @_; + my ($tid,$content,$navigation,$varcd,$namehash_ref,$orderhash_ref) = @_; my %namehash = %{$namehash_ref}; #name verlinkt mit id my %orderhash = %{$orderhash_ref}; #name mit kürzel verlinkt mit name my $form; - { + - $form = '

    '.&mt('Upload '.$varcd).'

    '; - $form .= '