%attr>
ajax => 1
%attr>
<%args>
$noback => undef
$histdir => undef
$base => undef
%args>
<%perl>
my $backurl = "javascript: nav_navigate('/tools/filebrowser.html:sub_navigation','/tools/filebrowser.html&basedir=$histdir')" if $histdir;
$backurl = "javascript: navigate('$base')" if $base;
%perl>
<& SELF:e_nav_bar, %ARGS &>
<& SELF:e_content, %ARGS &>
<%method e_nav_bar>
<%attr>
ajax => 1
%attr>
<%args>
$file => undef
%args>
%method>
<%method e_content>
<%attr>
ajax => 1
%attr>
<%args>
$file
$text => undef
$basedir => undef
%args>
<%init>
use URI::Escape;
%init>
<%perl>
$basedir = uri_unescape( $basedir );
$basedir =~ s/___H___/#/g;
$file = uri_unescape( $file );
$file =~ s/___H___/#/g;
if ( defined $basedir) {
$file = $basedir . '/' . $file;
}
( my $ffile = $file ) =~ s/#/___H___/g;
%perl>
% ## check text and save to file
% if ( defined $text ) {
<& '/include/system:save_file', file => $file, text => $text &>
% }
<%perl>
my $line = $m->comp('/include/system:read_file', file => $file);
%perl>
%method>