warning-ui/common.inc
author Benjamin Smedberg <benjamin@smedbergs.us>
Fri, 19 Dec 2008 16:50:47 -0500
changeset 8 c33d0e330649
child 12 0b5a89ccda6a
permissions -rw-r--r--
Add a web frontend to the warning database: cherrypy+genshi FTW!

<!-- -*- Mode: XML -*- -->
<?python from urllib import quote, urlencode ?>
<div xmlns="http://www.w3.org/1999/xhtml"
     xmlns:py="http://genshi.edgewall.org/"
     py:strip="True">
  <py:def function="searchform(user, path, msg)">
    <form action="/search">
      User LIKE: <input type="text" name="user" size="25" value="${user}"/><br />
      Directory LIKE: <input type="text" name="path" size="25" value="${path}"/><br />
      Warning message LIKE: <input type="text" name="msg" size="30" value="${msg}"/><br />
      <input type="hidden" name="id" value="${id}" />
      <input type="submit" value="Search" />
    </form>
  </py:def>

  <py:def function="genlink(path, **params)">/${quote(path)}<py:if test="len(params)">?${urlencode(params)}</py:if></py:def>

  <head py:match="head">
    ${select("*|text()")}
    <link type="text/css" rel="stylesheet" href="/static/warnings.css" />
  </head>
  <body py:match="body">
    <div class="header">
      <a href="/">Compiler Warnings Tracker: mozilla-central</a>
    </div>
    ${select("*|text()")}
  </body>
</div>