<!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"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude">

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

<head>
  <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
  <title>All Projects</title>
</head>

  <body>
    <py:def function="project(n, subprojects)">
      <a href="${n.url()}">${n.name}</a>
      <ul>
        <li py:for="p in subprojects">
          ${project(p, p.subprojects)}
        </li>
      </ul>
    </py:def>
    <h1 class="title">All Projects</h1>
    <div class="content">
      <div class="row">
        <div class="column grid_12">
          Add a new project at this url:
          <form method="post" action="projects/register">
            /projects/<input name="pid" class="title"/>/ &nbsp; <input type="submit" value="Register Project"/>
          </form>
          <div id="allura_directory">
            <py:for each="n, subprojects in projects">
              ${project(n, subprojects)}
            </py:for>
          </div>
        </div>
      </div>
    </div>
  </body>
</html>
