--- loncom/interface/londocs.pm 2010/12/04 16:17:27 1.441 +++ loncom/interface/londocs.pm 2010/12/07 01:15:39 1.442 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.441 2010/12/04 16:17:27 www Exp $ +# $Id: londocs.pm,v 1.442 2010/12/07 01:15:39 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2238,6 +2238,7 @@ sub list_symbs { my $crstype = &Apache::loncommon::course_type(); $r->print(&Apache::loncommon::start_page('Symb List')); $r->print(&Apache::lonhtmlcommon::breadcrumbs('Symb List')); + &startContentScreen($r,'tools'); my $navmap = Apache::lonnavmaps::navmap->new(); if (!defined($navmap)) { $r->print('

'.&mt('Retrieval of List Failed').'

'. @@ -2252,7 +2253,6 @@ sub list_symbs { } $r->print("\n\n"); } - $r->print('
'.&mt('Back to Course Editor').''); } @@ -2261,6 +2261,7 @@ sub verifycontent { my $crstype = &Apache::loncommon::course_type(); $r->print(&Apache::loncommon::start_page('Verify '.$crstype.' Documents')); $r->print(&Apache::lonhtmlcommon::breadcrumbs('Verify '.$crstype.' Documents')); + &startContentScreen($r,'tools'); $hashtied=0; undef %alreadyseen; %alreadyseen=(); @@ -2279,13 +2280,7 @@ sub verifycontent { } } &untiehash(); - $r->print( - '

'.&mt('Done').'

' - .'
' - .'

' - .&mt('Back to Course Editor') - .'

' - ); + $r->print('

'.&mt('Done').'

'); } @@ -2300,6 +2295,8 @@ sub checkversions { my $crstype = &Apache::loncommon::course_type(); $r->print(&Apache::loncommon::start_page("Check $crstype Document Versions")); $r->print(&Apache::lonhtmlcommon::breadcrumbs("Check $crstype Document Versions")); + &startContentScreen($r,'tools'); + my $header=''; my $startsel=''; my $monthsel=''; @@ -2629,6 +2626,57 @@ sub create_form_ul { return $ul; } +# +# Start tabs +# + +sub startContentScreen { + my ($r,$mode)=@_; + $r->print(''); + $r->print('
' + .'
'); + $r->print('
'); +} + +# +# End tabs +# + +sub endContentScreen { + my ($r)=@_; + $r->print('
'); +} sub handler { my $r = shift; @@ -2959,14 +3007,15 @@ SEDFFORM SEDFFORM - my $extresourcesform=(< - $uploadtag - - $lt{'extr'}$help{'Adding_External_Resource'} - + my $extresourcesform=(< + $uploadtag + + $lt{'extr'}$help{'Adding_External_Resource'} + ERFORM + if ($allowed) { &update_paste_buffer($coursenum,$coursedom); my %lt=&Apache::lonlocal::texthash( @@ -2990,57 +3039,19 @@ ERFORM HIDDENFORM } -# --------------------------------------------------------- Main tab structure - - my $activeClass = 1; - my $active = ''; - my %tabtitles = ( - main => { - Course => &mt('Main Course Documents'), - Community => &mt('Main Community Documents'), - }, - supplemental => { - Course => &mt('Supplemental Course Documents'), - Community => &mt('Supplemental Community Documents'), - }, - ); + +# Generate the tabs + &startContentScreen($r,'docs'); +# + + my $savefolderpath; + if ($allowed) { - $r->print(''); - } else { - $r->print('
'); - } - $r->print('
' - .'
'); -# --------------------------------------------------------- Standard documents - my $savefolderpath; - $active = 'style="display: none;"'; - if($activeClass == 0){ - $active = 'style="display: block;"'; - } - if ($allowed) { - $r->print('
'); my $folder=$env{'form.folder'}; if ($folder eq '' || $folder=~/^supplemental/) { $folder='default'; $savefolderpath = $env{'form.folderpath'}; - $env{'form.folderpath'}='default&'.&escape($tabtitles{'main'}{$crstype}); + $env{'form.folderpath'}='default&'.&escape(&mt('Content')); $uploadtag = ''; } @@ -3286,12 +3297,7 @@ $r->print(&generate_edit_table($tid,\%or $r->print('
'); } -# ----------------------------------------------------- Supplemental documents - $active = 'style="display: none;"'; - if($activeClass == 1){ - $active = 'style="display: block;"'; - } - $r->print('
'); + my $folder=$env{'form.folder'}; unless ($folder=~/^supplemental/) { $folder='supplemental'; @@ -3403,10 +3409,7 @@ my %suporderhash = ( } } - -$r->print('
'); -$r->print('
'); - + &endContentScreen($r); if ($allowed) { $r->print('