version 1.405, 2009/05/15 18:06:20
|
version 1.412, 2009/10/15 22:39:58
|
Line 538 sub start_body {
|
Line 538 sub start_body {
|
|
|
my $extra_head = &generate_css_links(); |
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 = |
$currentstring = |
&Apache::loncommon::start_page($Apache::londefdef::title, |
&Apache::loncommon::start_page($Apache::londefdef::title, |
$Apache::londefdef::head |
$Apache::londefdef::head |
Line 546 sub start_body {
|
Line 561 sub start_body {
|
# 'no_title' => 1, |
# 'no_title' => 1, |
'force_register' => 1}); |
'force_register' => 1}); |
|
|
if ($env{'request.state'} ne 'published') { |
if ($env{'request.state'} eq 'construct') { |
$currentstring.=&Apache::lonmenu::constspaceform(); |
$currentstring .= &Apache::lonhtmlcommon::breadcrumbs(); |
$currentstring.=&Apache::londefdef::edit_controls(); |
} |
} |
|
$currentstring.=&Apache::lonxml::message_location(); |
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') { |
} elsif ($target eq 'tex') { |
$currentstring = ''; # '\begin{document}' is in header. |
$currentstring = ''; # '\begin{document}' is in header. |
} |
} |
|
|
return $currentstring; |
return $currentstring; |
} |
} |
|
|
Line 570 sub edit_controls {
|
Line 601 sub edit_controls {
|
</div>'; |
</div>'; |
} |
} |
$result .= ' |
$result .= ' |
<div class="LC_edit_problem_header_edit_row"><input type="submit" name="editmode" accesskey="e" value="'.&mt('Edit').'" /></div></div> |
<div><input type="submit" name="editmode" accesskey="e" value="'.&mt('Edit').'" />'; |
|
if (($env{'request.course.id'}) && ($env{'form.forceedit'})) { |
|
$result .= (' ' x 3).'<input type="button" value="'.&mt('Course View').'" onclick="javascript:location.href=currentURL" />'; |
|
} |
|
$result .= '</div> |
|
</div> |
</form> |
</form> |
<br />'; |
'; |
return $result; |
return $result; |
} |
} |
|
|