<html xmlns:py="http://genshi.edgewall.org/" 
  xmlns:xi="http://www.w3.org/2001/XInclude"
  py:strip=""
  >

  <py:def function="page_title">Search</py:def> 

  <div py:match="content">
    <xi:include href="search_form.html" />

    <py:if test="c.warnings">
    <div id="warnings">
      <ul>
      <py:for each="warning in c.warnings">
        <li>${warning}</li>
      </py:for>
      </ul>
    </div>
    </py:if>

    <py:if test="c.results">
    <h3>Results</h3>
    <ul class="results">
      <li class="pd" py:for="row in c.results">
          <a href="/graph?uri=${row.document.get_value(0)}">${row.document.get_value(1).decode("utf-8") or "Untitled"}</a>
          ${row.document.get_value(2).decode("utf-8")} ${row.document.get_value(3).decode("utf-8")}
          (${row.percent}%)
      </li>
    </ul>
    </py:if>
  </div>

  <xi:include href="base.html" />
</html>

