--- loncom/interface/londocs.pm 2009/08/28 19:43:16 1.384 +++ loncom/interface/londocs.pm 2009/10/16 19:00:44 1.393 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.384 2009/08/28 19:43:16 raeburn Exp $ +# $Id: londocs.pm,v 1.393 2009/10/16 19:00:44 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1032,11 +1032,7 @@ sub breadcrumbs { if ($3) { $isencrypted=1; } if ($4 ne '') { $is_random_order = 1; } if ($folder eq 'supplemental') { - if ($allowed) { - $name = &mt('Supplemental '.$type.' Documents'); - } else { - $name = &mt($type.' Documents'); - } + $name = &mt('Supplemental '.$type.' Documents'); } &Apache::lonhtmlcommon::add_breadcrumb( {'href'=>$url.$cpinfo, @@ -1493,7 +1489,6 @@ sub handle_edit_cmd { sub editor { my ($r,$coursenum,$coursedom,$folder,$allowed,$upload_output,$type)=@_; - my $container= ($env{'form.pagepath'}) ? 'page' : 'sequence'; @@ -1632,18 +1627,21 @@ sub editor { $shown++; } if ($shown) { - $r->print(&Apache::loncommon::start_data_table() - .&Apache::loncommon::start_data_table_header_row() - .'
' .&mt('Currently no documents.') .'
' @@ -1793,7 +1791,6 @@ sub parse_supplemental_title { sub entryline { my ($index,$title,$url,$folder,$allowed,$residx,$coursenum)=@_; - my ($foldertitle,$pagetitle,$renametitle); if (&is_supplemental_title($title)) { ($title,$foldertitle,$renametitle) = &parse_supplemental_title($title); @@ -2744,11 +2741,28 @@ sub create_form_ul { .$script."\n" .'// ]]>'."\n" .''."\n"; - my $brcrum = [{href=>"/adm/createuser",text=>"$type Documents"}]; - $r->print(&Apache::loncommon::start_page("$type Documents", $script, - {'force_register' => $showdoc, - 'bread_crumbs' => $brcrum}). - &Apache::loncommon::help_open_menu('','',273,'RAT')); + + # Breadcrumbs + &Apache::lonhtmlcommon::clear_breadcrumbs(); + if ($allowed) { + &Apache::lonhtmlcommon::add_breadcrumb({ + href=>"/adm/coursedocs",text=>"$type Editor"}); + + $r->print(&Apache::loncommon::start_page("$type Editor", $script, + {'force_register' => $showdoc,}) + .&Apache::loncommon::help_open_menu('','',273,'RAT') + .&Apache::lonhtmlcommon::breadcrumbs( + 'Editing the Table of Contents for your '.$type, + 'Docs_Adding_Course_Doc') + ); + } else { + my $lc_type = lc($type); + &Apache::lonhtmlcommon::add_breadcrumb({ + href=>"/adm/coursedocs",text=>"Supplemental $lc_type documents"}); + + $r->print(&Apache::loncommon::start_page("Supplemental documents"). + &Apache::lonhtmlcommon::breadcrumbs()); + } my %allfiles = (); my %codebase = (); @@ -2892,7 +2906,7 @@ FIUP CHBO my @fileuploada = ( - { pic01 => "$lt{'upld'} $help{'Uploading_From_Harddrive'}" }, + { '' => " $help{'Uploading_From_Harddrive'}" }, ); my $fileuploadform=(<'.$error.'
'); + } + my $tid='2'; + my $varscd = 'Supplemental Course Documents'; + $r->print(&generate_edit_table($tid,$varscd,\%suporderhash)); + } else { + my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type); + if ($error) { + $r->print(''.$error.'
'); + } + } -$r->print(&generate_edit_table($tid,$varscd,\%suporderhash)); -} -my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type); - if ($error) { - $r->print(''.$error.'
'); - } $r->print(''); $r->print(''); @@ -3415,15 +3426,15 @@ sub generate_admin_options { my $dumpbut=&dumpbutton(); my $exportbut=&exportbutton(); my @list = ( - {pic21=>"$lt{'vc'}$help{'Verify_Content'}"}, - {pic22=>"$lt{'cv'}$help{'Check_Resource_Versions'}"}, + {''=>"$lt{'vc'}$help{'Verify_Content'}"}, + {''=>"$lt{'cv'}$help{'Check_Resource_Versions'}"}, ); if($dumpbut ne ''){ - push @list, {pic23=>$dumpbut}; + push @list, {''=>$dumpbut}; } - push @list, ({pic24=>$exportbut}, - {pic25=>"$lt{'ls'}"}, - {pic26=>"$lt{'sl'}"}, + push @list, ({''=>$exportbut}, + {''=>"$lt{'ls'}"}, + {''=>"$lt{'sl'}"}, ); return ''; @@ -3442,26 +3453,22 @@ sub generate_edit_table { $form = '