<!--!  Copyright (C) 2006-2023 Edgewall Software

  This software is licensed as described in the file COPYING, which
  you should have received as part of this distribution. The terms
  are also available at https://trac.edgewall.org/wiki/TracLicense.

  This software consists of voluntary contributions made by many
  individuals. For the exact contribution history, see the revision
  history and logs, available at https://trac.edgewall.org/.
-->
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:xi="http://www.w3.org/2001/XInclude"
      xmlns:py="http://genshi.edgewall.org/"
      py:strip="">

  <py:match path="head" once="true"><head>
    <title py:with="title = list(select('title/text()'))">
      <py:if test="title">${title} – </py:if>${project.name or 'Trac'}
    </title>
    <py:if test="chrome.content_type == 'text/html'">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    </py:if>
    <meta py:for="meta in chrome.metas" py:attrs="meta"/>
    <!--[if IE]><script>
      if (/^#__msie303:/.test(window.location.hash))
        window.location.replace(window.location.hash.replace(/^#__msie303:/, '#'));
    </script><![endif]-->
    <py:if test="chrome.links">
      <py:for each="rel, links in chrome.links.items()">
        <py:for each="link in links">
          <link rel="${rel}" py:attrs="link" />
        </py:for>
      </py:for>
    </py:if>
    <style id="trac-noscript" type="text/css">.trac-noscript { display: none !important }</style>
    <py:if test="not defined('trac_error_rendering') and 'SEARCH_VIEW' in perm">
      <link type="application/opensearchdescription+xml" rel="search"
            href="${href.search('opensearch')}"
            title="${_('Search %(project)s', project=project.name)}"/>
    </py:if>
    <script py:if="chrome.script_data" type="text/javascript">
      <py:for each="key, value in chrome.script_data.iteritems()">
      var ${key}=${to_json(value)};
      </py:for>
    </script>
    <py:for each="script in chrome.scripts">
      ${script.prefix}<script type="${script.attrs.type}" src="${script.attrs.src}"></script>${script.suffix}
    </py:for>
    <script>
      jQuery("#trac-noscript").remove();
      jQuery(function($) {
        <py:if test="chrome.warnings or chrome.notices">
        $(".trac-close-msg").show().click(function () {
          $(this).closest(".system-message").hide();
          return false;
        });
        </py:if>
        $(".trac-autofocus").focus();
        $(".trac-target-new").attr("target", "_blank");
        if ($.ui) { /* is jquery-ui added? */
          $(".trac-datepicker:not([readonly])").prop("autocomplete", "off").datepicker();
          $(".trac-datetimepicker:not([readonly])").prop("autocomplete", "off").datetimepicker();
          $("#main").addClass("trac-nodatetimehint");
        }
        $(".trac-disable").disableSubmit(".trac-disable-determinant");
        setTimeout(function() { $(".trac-scroll").scrollToTop() }, 1);
        $(".trac-disable-on-submit").disableOnSubmit();
      });
    </script>
    ${select("*[local-name() != 'title']|text()|comment()")}
  </head></py:match>

  <py:match path="body" once="true" buffer="false"><body>
    ${select('*|text()|comment()')}

    <script py:if="chrome.late_links">
      <py:for each="link in chrome.late_links.get('stylesheet', [])">
        jQuery.loadStyleSheet("${link.href}", "${link.type}");
      </py:for>
    </script>
    <script py:if="chrome.late_script_data" type="text/javascript">
      <py:for each="key, value in chrome.late_script_data.iteritems()">
      var ${key}=${to_json(value)};
      </py:for>
    </script>
    <py:for each="script in chrome.late_scripts">
      ${script.prefix}<script>jQuery.loadScript("${script.attrs.src}", "${script.attrs.type}"");</script>${script.suffix}
    </py:for>

    <div id="altlinks" py:if="'alternate' in chrome.links">
      <h3>Download in other formats:</h3>
      <ul>
        <li py:for="idx, link in enumerate(chrome.links.alternate)"
            class="${first_last(idx, chrome.links.alternate)}">
          <a rel="nofollow" href="${link.href}" class="${link['class']}"
             py:content="link.title" />
        </li>
      </ul>
    </div>
  </body></py:match>

  <xi:include href="$chrome.theme"><xi:fallback /></xi:include>
  <xi:include href="site.html"><xi:fallback /></xi:include>
</html>
