--- loncom/xml/londefdef.pm 2010/02/02 15:34:58 1.403.4.1 +++ loncom/xml/londefdef.pm 2009/10/15 22:39:58 1.412 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.403.4.1 2010/02/02 15:34:58 raeburn Exp $ +# $Id: londefdef.pm,v 1.412 2009/10/15 22:39:58 raeburn Exp $ # # # Copyright Michigan State University Board of Trustees @@ -538,22 +538,53 @@ sub start_body { my $extra_head = &generate_css_links(); + # Breadcrumbs + &Apache::lonhtmlcommon::clear_breadcrumbs(); + if ($env{'request.state'} eq 'construct') { + &Apache::lonhtmlcommon::add_breadcrumb({ + 'text' => 'Construction Space', + 'href' => &Apache::loncommon::authorspace(), + }); + &Apache::lonhtmlcommon::add_breadcrumb({ + 'text' => 'HTML Editor', + 'href' => '', + }); + } else { + # FIXME Where are we? + } + $currentstring = &Apache::loncommon::start_page($Apache::londefdef::title, $Apache::londefdef::head .$extra_head, {'add_entries' => $token->[2], - 'no_title' => 1, +# 'no_title' => 1, 'force_register' => 1}); - if ($env{'request.state'} ne 'published') { - $currentstring.=&Apache::lonmenu::constspaceform(); - $currentstring.=&Apache::londefdef::edit_controls(); - } - $currentstring.=&Apache::lonxml::message_location(); + if ($env{'request.state'} eq 'construct') { + $currentstring .= &Apache::lonhtmlcommon::breadcrumbs(); + } + + my $header = ''; + if ($env{'request.state'} ne 'published' && + $env{'request.state'} ne 'construct') { + $header=&Apache::lonmenu::constspaceform(); + } + if ($env{'request.state'} ne 'published') { + $header.=&Apache::londefdef::edit_controls(); + } + if ($env{'request.state'} eq 'construct') { + $currentstring.=&Apache::loncommon::head_subbox( + &Apache::loncommon::CSTR_pageheader() + .$header); + } elsif ($env{'request.state'} eq 'edit') { + $currentstring.=&Apache::loncommon::head_subbox($header); + } + $currentstring.=&Apache::lonxml::message_location(); } elsif ($target eq 'tex') { - $currentstring = ''; # '\begin{document}' is in header. - } + $currentstring = ''; # '\begin{document}' is in header. + } + return $currentstring; } @@ -570,9 +601,14 @@ sub edit_controls { '; } $result .= ' -
+
'; + if (($env{'request.course.id'}) && ($env{'form.forceedit'})) { + $result .= (' ' x 3).''; + } + $result .= '
+ -
'; +'; return $result; } @@ -1349,10 +1385,6 @@ sub start_font { my $currentstring = ''; if ($target eq 'web' || $target eq 'webgrade') { my $face=&Apache::lonxml::get_param('face',$parstack,$safeeval); - if ($face!~/symbol/i) { - if (($env{'browser.fontenhance'} eq 'on') || - ($env{'browser.blackwhite'} eq 'on')) { return ''; } - } $currentstring = $token->[4]; } elsif ($target eq 'tex') { my $fontsize=&Apache::lonxml::get_param('TeXsize',$parstack,$safeeval); @@ -3508,7 +3540,7 @@ sub start_frameset { &Apache::loncommon::start_page($Apache::londefdef::title, $Apache::londefdef::head, {'add_entries' => $token->[2], - 'no_title' => 1, +# 'no_title' => 1, 'force_register' => 1, 'frameset' => 1,}); @@ -4721,7 +4753,7 @@ sub align_latex_image { # Even though we set a default alignment value, the user # could have given us an illegal value. In that case we # just use the default alignment of bottom.. - $currentstring = ''; + $currentstring = "\n% figurewrapping \n"; if ($align eq "top") { $currentstring .= '\raisebox{-'.$height.'mm}{'.$image; $closure = '}'; @@ -4764,6 +4796,8 @@ sub align_latex_image { $currentstring .= "{$image"; $closure = '}'; } + $currentstring .= "\n% end wrappage\n"; + $closure = "\n% Begin closure\n".$closure."\n% End closure\n"; return ($currentstring, $closure); } @@ -4783,7 +4817,8 @@ sub is_inside_of { # # This sub provides the typical LaTeX prefix matter for tex output: # -sub latex_header { +sub latex_header +{ my ($mode) = @_; my $currentstring = '';