<!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="">
  <div py:def="navigation(category)" id="${category}" class="nav">
    <ul py:if="chrome.nav[category]">
      <li py:for="idx, item in  enumerate(chrome.nav[category])"
          class="${classes(first_last(idx, chrome.nav[category]), active=item.active)}">${item.label}</li>
    </ul>
  </div>

  <py:match path="body" once="true" buffer="false"><body>
    <div id="banner">
      <div id="header" py:choose="">
        <a py:when="chrome.logo.src" id="logo" href="${chrome.logo.link or href.wiki('TracIni')+'#header_logo-section'}"><img
          src="${chrome.logo.src}" alt="${chrome.logo.alt}"
          height="${chrome.logo.height or None}" width="${chrome.logo.width or None}" /></a>
        <h1 py:otherwise=""><a href="${chrome.logo.link}">${project.name}</a></h1>
      </div>
      <form id="search" action="${href.search()}" method="get">
        <div py:if="'SEARCH_VIEW' in perm">
          <label for="proj-search">${_('Search')}:</label>
          <input type="text" id="proj-search" name="q" size="18" accesskey="f" value="" />
          <input type="submit" value="${_('Search')}" />
        </div>
      </form>
      ${navigation('metanav')}
    </div>
    ${navigation('mainnav')}

    <div id="main">
      <div id="ctxtnav" class="nav">
        <h2>${_('Context Navigation')}</h2>
          <ul py:if="chrome.ctxtnav">
              <li py:for="i, elm in enumerate(chrome.ctxtnav)"
                  class="${classes(first_last(i, chrome.ctxtnav))}">$elm</li>
          </ul>
        <hr />
      </div>
      <div id="warning" py:if="chrome.warnings" class="system-message">
        <py:choose test="len(chrome.warnings)">
          <strong>${_('Warning')}:</strong>
          <py:when test="1">${chrome.warnings[0]}</py:when>
          <py:otherwise><ul><li py:for="warning in chrome.warnings">$warning</li></ul></py:otherwise>
        </py:choose>
      </div>
      <div id="notice" py:if="chrome.notices" class="system-message">
        <py:choose test="len(chrome.notices)">
          <py:when test="1">${chrome.notices[0]}</py:when>
          <py:otherwise><ul><li py:for="notice in chrome.notices">$notice</li></ul></py:otherwise>
        </py:choose>
      </div>

      ${select('*|text()')}
    </div>

    <div id="footer" xml:lang="en"><hr/>
      <a id="tracpowered" href="http://trac.edgewall.org/"><img
        src="${chrome.htdocs_location}trac_logo_mini.png" height="30"
        width="107" alt="Trac Powered"/></a>
      <p class="left">
        Powered by <a href="${href.about()}"><strong>Trac ${trac.version}</strong></a><br />
        By <a href="http://www.edgewall.org/">Edgewall Software</a>.
        <br />Translated by <a href="http://www.i-act.co.jp/">インタアクト株式会社</a>
      </p>
      <p class="right">${chrome.footer}</p>
    </div>
  </body></py:match>
</html>
