<%doc>
###############################################################################

=head1 NAME

help/autohandler

=head1 DESCRIPTION

This autohandler provides a wrapper around the help documents in the help
hierarchy. It provides the header and close button as well as pulling in the CSS
styles.

=head1 AUTHORS

Sam Tregar <stregar@about-inc.com>

David Wheeler <david@justatheory.com>

=cut

</%doc>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<% get_pref('Character Set') %>" />
<title><% $title %></title>
<link rel="stylesheet" type="text/css" href="/media/css/style.css" />
</head>

<body id="help">

<div id="contentContainer">
    <div id="headerContainer">
        <div class="helpBox">
            <div class="fullHeader">
                <div class="number">&nbsp;</div>
                <div class="caption"><% $title %></div>
                <div class="rightText">&nbsp;</div>
            </div>
        </div>
        <div class="buttons">
            <a href="javascript:self.close()" title="Close Window"><img src="/media/images/<% $lang_key %>/close.gif" alt="Close" /></a>
        </div>
    </div>

    <div id="breadcrumbs">
        <p><% $context %></p>
    </div>

%# Insert the table top.
% unless ($about) {
    <div class="helpBox">
        <div class="fullHeader">
            <div class="number">&nbsp;</div>
            <div class="caption"><% $page %></div>
            <div class="rightText">&nbsp;</div>
        </div>
        <div class="border">
            <% $m->call_next %>
        </div>
    </div>
% } else {
    <% $m->call_next %>
% }
%# Close up the document.
    <div style="text-align: right;">
        <a href="javascript:self.close()" title="Close Window"><img src="/media/images/<% $lang_key %>/close.gif" alt="Close" /></a>
    </div>
</div>
</body>
</html>
%#-- End HTML --#
%#-- Once --#
<%once>;
my $widget = 'help';
</%once>
%#-- Init --#
<%init>;
my ($context, $title, $page, $about);
if ($r->uri =~ m:/help/$lang_key/about\.html:) {
    $about = 1;
    $context = 'About the <a class="blackLink" target="_blank" ' .
      'href="http://bricolage.cc/">Bricolage Content Management System</a>';
    $title = "Bricolage " . Bric->VERSION;
    $page = '';
} else {
    ($context, $page) = @{ get_state_data($widget) }{qw(context page)};
    $title = 'Bricolage Help';
}
</%init>
<%cleanup>;
# Don't keep help pages in the history.
pop_page(); 
</%cleanup>
