[% site_settings = c.cfg('settings') %]

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>[% site_settings.application_name %]</title>

        <link rel="stylesheet" type="text/css" href="[% c.query.url(base=1)
			# loads css for test suite %]/css/lims.css?v1.15" />
        <link rel="stylesheet" type="text/css" media="screen" charset="utf-8"
			href="/css/autosuggest_inquisitor.css" />
		<link type="text/css" media="print" rel="stylesheet"
			href="/css/print.css?v1.2" />
		<link rel="stylesheet" type="text/css" href="/css/font-awesome.min.css" />
        <link rel="stylesheet" type="text/css" href="/css/local.css" />
        <link rel="stylesheet" type="text/css"
			href="/css/local/[% site_settings.item('_centre') %].css?1.2" />
	  [% FOREACH css IN addcss # if tt-specific css required %]
		<link rel="stylesheet" type="text/css" href="/css/[% css %]" />
      [% END %]

        <script type="text/javascript" src="/js/common.js"></script>
        <script type="text/javascript" src="/js/FormValidator.min.js"></script>
        [% PROCESS site/js/jquery.tt # ensures loaded just once %]

      [% IF template.meta_refresh; interval = template.meta_refresh %]
        <meta http-equiv="refresh" content="[% interval %]">
        <script type="text/javascript" src="/js/jquery.countdown.js"></script>
        <script type="text/javascript">
            $(function () {
                $('#refresh').countdown({
                    until: +[% interval %], format: 's', compact: true });
            });
        </script>
      [% END %]
      [% IF c.config('use_cgi_ajax'); INCLUDE site/js/ajax.tt; END %]
   	  <meta name="msapplication-config" content="none" /> [%# for MSIE 11 %]

    </head>

    <body[% IF body_attr; ' ' _ body_attr; END # optionally passed by caller %]>

	[% UNLESS skip_wrappers %]
		<div id="header">[% PROCESS site/header.tt %]</div>
	[% END %]

    [% # PROCESS dumper.tt dump = c.flash %]
    [% # PROCESS dumper.tt dump = c.query.param('destination') %]
    [% # PROCESS dumper.tt dump = c.query.self_url %]
    [% # PROCESS dumper.tt dump = destination_url %]

    <div id="wrapper">
        <div id="content">
            [% PROCESS site/status.tt # error, warning & info msgs %]
            [% content %]
        </div>
    </div>

	[% UNLESS skip_wrappers %]
		<div id="footer">[% PROCESS site/footer.tt %]</div>
	[% END %]

    [% IF c.user_can('do_admin') %]
        <div id='pjxdebugrequest'></div>
    [% END %]
    </body>
</html>
