+ $wysiwyglink
$titledisplay
@@ -1716,8 +1721,8 @@ sub handler {
$request->set_last_modified(&Apache::lonnet::metadata($request->uri,
'lastrevisiondate'));
}
- # Embedded Flash movies (e.g., from Camtasia) served from https will not display in IE
- # if XML config file has expired from cache.
+ # Embedded Flash movies from Camtasia served from https will not display in IE
+ # if XML config file has expired from cache.
if ($ENV{'SERVER_PORT'} == 443) {
if ($request->uri =~ /\.xml$/) {
my ($httpbrowser,$clientbrowser) =
@@ -1762,10 +1767,13 @@ sub handler {
if ($filecontents eq -1) {
my $start_page=&Apache::loncommon::start_page('File Error');
my $end_page=&Apache::loncommon::end_page();
- my $fnf=&mt('File not found');
+ my $errormsg=''
+ .&mt('File not found: [_1]'
+ ,''.$file.'')
+ .'
';
$result=(<$fnf: $file
+$errormsg
$end_page
ENDNOTFOUND
$filecontents='';
@@ -1804,11 +1812,14 @@ ENDNOTFOUND
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
['rawmode']);
if ($env{'form.rawmode'}) { $result = $filecontents; }
- if ($filetype ne 'html') {
+ if ($filetype ne 'html') {
my $nochgview = 1;
- my $controls =
- ($env{'request.state'} eq 'construct') ? &Apache::londefdef::edit_controls($nochgview)
- : '';
+ my $controls = '';
+ if ($env{'request.state'} eq 'construct') {
+ $controls = &Apache::loncommon::head_subbox(
+ &Apache::loncommon::CSTR_pageheader()
+ .&Apache::londefdef::edit_controls($nochgview));
+ }
if ($filetype ne 'sty') {
$result =~ s/</g;
$result =~ s/>/>/g;
@@ -1817,17 +1828,27 @@ ENDNOTFOUND
'';
}
if ($env{'environment.remote'} eq 'off') {
- my %options = ('bgcolor' => '#FFFFFF');
- $result =
- &Apache::loncommon::start_page(undef,undef,\%options).
- $controls.
- $result.
- &Apache::loncommon::end_page();
+ my $brcrum;
+ if ($env{'request.state'} eq 'construct') {
+ $brcrum = [{'href' => &Apache::loncommon::authorspace(),
+ 'text' => 'Construction Space'},
+ {'href' => '',
+ 'text' => 'Editor'}];
+ } else {
+ $brcrum = ''; # FIXME: Where are we?
+ }
+ my %options = ('bread_crumbs' => $brcrum,
+ 'bgcolor' => '#FFFFFF');
+ $result =
+ &Apache::loncommon::start_page(undef,undef,\%options)
+ .$controls
+ .$result
+ .&Apache::loncommon::end_page();
} else {
$result = $controls.$result;
}
}
- }
+ }
}
#
@@ -1844,9 +1865,18 @@ ENDNOTFOUND
my %options =
('add_entries' =>
- {'onresize' => $add_to_onresize,
- 'onload' => $add_to_onload, });
-
+ {'onresize' => $add_to_onresize,
+ 'onload' => $add_to_onload, });
+ my $header;
+ if ($env{'request.state'} eq 'construct') {
+ $options{'bread_crumbs'} = [{
+ 'href' => &Apache::loncommon::authorspace(),
+ 'text' => 'Construction Space'},
+ {'href' => '',
+ 'text' => 'HTML Editor'}];
+ $header = &Apache::loncommon::head_subbox(
+ &Apache::loncommon::CSTR_pageheader());
+ }
if ($env{'environment.remote'} ne 'off') {
$options{'bgcolor'} = '#FFFFFF';
$options{'only_body'} = 1;
@@ -1856,14 +1886,15 @@ ENDNOTFOUND
&Apache::loncommon::resize_textarea_js();
my $start_page = &Apache::loncommon::start_page(undef,$js,
\%options);
- $result=$start_page.
- &Apache::lonxml::message_location().
- $edit_info.
- &Apache::loncommon::end_page();
+ $result = $start_page
+ .$header
+ .&Apache::lonxml::message_location()
+ .$edit_info
+ .&Apache::loncommon::end_page();
}
}
if ($filetype eq 'html') { &writeallows($request->uri); }
-
+
&Apache::lonxml::add_messages(\$result);
$request->print($result);