version 1.494, 2009/04/17 01:00:20
|
version 1.495, 2009/05/28 11:31:03
|
Line 1735 sub handler {
|
Line 1735 sub handler {
|
if ($filecontents eq -1) { |
if ($filecontents eq -1) { |
my $start_page=&Apache::loncommon::start_page('File Error'); |
my $start_page=&Apache::loncommon::start_page('File Error'); |
my $end_page=&Apache::loncommon::end_page(); |
my $end_page=&Apache::loncommon::end_page(); |
my $fnf=&mt('File not found'); |
my $errormsg='<p class="LC_error">' |
|
.&mt('File not found: [_1]' |
|
,'<span class="LC_filename">'.$file.'</span>') |
|
.'</p>'; |
$result=(<<ENDNOTFOUND); |
$result=(<<ENDNOTFOUND); |
$start_page |
$start_page |
<b>$fnf: $file</b> |
$errormsg |
$end_page |
$end_page |
ENDNOTFOUND |
ENDNOTFOUND |
$filecontents=''; |
$filecontents=''; |
Line 1777 ENDNOTFOUND
|
Line 1780 ENDNOTFOUND
|
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
['rawmode']); |
['rawmode']); |
if ($env{'form.rawmode'}) { $result = $filecontents; } |
if ($env{'form.rawmode'}) { $result = $filecontents; } |
if ($filetype ne 'html') { |
if ($filetype ne 'html') { |
my $nochgview = 1; |
my $nochgview = 1; |
my $controls = |
my $controls = ''; |
($env{'request.state'} eq 'construct') ? &Apache::londefdef::edit_controls($nochgview) |
if ($env{'request.state'} eq 'construct') { |
: ''; |
$controls = &Apache::loncommon::head_subbox( |
|
&Apache::loncommon::CSTR_pageheader() |
|
.&Apache::londefdef::edit_controls($nochgview)); |
|
} |
if ($filetype ne 'sty') { |
if ($filetype ne 'sty') { |
$result =~ s/</</g; |
$result =~ s/</</g; |
$result =~ s/>/>/g; |
$result =~ s/>/>/g; |
Line 1790 ENDNOTFOUND
|
Line 1796 ENDNOTFOUND
|
'</pre></b></td></tr></table>'; |
'</pre></b></td></tr></table>'; |
} |
} |
if ($env{'environment.remote'} eq 'off') { |
if ($env{'environment.remote'} eq 'off') { |
my %options = ('bgcolor' => '#FFFFFF'); |
my $brcrum; |
$result = |
if ($env{'request.state'} eq 'construct') { |
&Apache::loncommon::start_page(undef,undef,\%options). |
$brcrum = [{'href' => '', # FIXME Add link to /priv/[user] |
$controls. |
'text' => 'Construction Space'}, |
$result. |
{'href' => '', |
&Apache::loncommon::end_page(); |
'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 { |
} else { |
$result = $controls.$result; |
$result = $controls.$result; |
} |
} |
} |
} |
} |
} |
} |
} |
|
|
# |
# |
Line 1817 ENDNOTFOUND
|
Line 1833 ENDNOTFOUND
|
|
|
my %options = |
my %options = |
('add_entries' => |
('add_entries' => |
{'onresize' => $add_to_onresize, |
{'onresize' => $add_to_onresize, |
'onload' => $add_to_onload, }); |
'onload' => $add_to_onload, }); |
|
|
|
$options{'bread_crumbs'} = [{ |
|
'href' => '', # FIXME Add link to /priv/[user] |
|
'text' => 'Construction Space'}, |
|
{'href' => '', |
|
'text' => 'HTML Editor'}]; |
|
|
if ($env{'environment.remote'} ne 'off') { |
if ($env{'environment.remote'} ne 'off') { |
$options{'bgcolor'} = '#FFFFFF'; |
$options{'bgcolor'} = '#FFFFFF'; |
Line 1829 ENDNOTFOUND
|
Line 1851 ENDNOTFOUND
|
&Apache::loncommon::resize_textarea_js(); |
&Apache::loncommon::resize_textarea_js(); |
my $start_page = &Apache::loncommon::start_page(undef,$js, |
my $start_page = &Apache::loncommon::start_page(undef,$js, |
\%options); |
\%options); |
$result=$start_page. |
$result = $start_page |
&Apache::lonxml::message_location(). |
.&Apache::loncommon::head_subbox( |
$edit_info. |
&Apache::loncommon::CSTR_pageheader()) |
&Apache::loncommon::end_page(); |
.&Apache::lonxml::message_location() |
|
.$edit_info |
|
.&Apache::loncommon::end_page(); |
} |
} |
} |
} |
if ($filetype eq 'html') { &writeallows($request->uri); } |
if ($filetype eq 'html') { &writeallows($request->uri); } |