<!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:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="macros.html" />
<xi:include href="layout.html" />
<head><title>${_('All Project Tickets')}</title></head>
<body>
<div id="content">
<py:if test="query=='all'">
<h1>${_('All Project Tickets')}
<py:if test="show_myticket==1">
(<a href="?query=mine">${_('Show My Tickets')}</a>,
<a href="?query=reported_by_me">${_('Tickets Reported by Me')}</a>)
</py:if>
</h1>
</py:if><py:if test="query=='mine'">
<h1>${_('Show My Tickets')}
(<a href="?query=all">${_('All Project Tickets')}</a>,
<a href="?query=reported_by_me">${_('Tickets Reported by Me')}</a>)</h1>
</py:if><py:if test="query=='reported_by_me'">
<h1>${_('Tickets Reported by Me')}
(<a href="?query=all">${_('All Project Tickets')}</a>,
<a href="?query=mine">${_('Show My Tickets')}</a>)</h1>
</py:if>
<py:for each="project in projects">
  <h2><a href="${project.href}/query">${project.name}</a></h2>
  <table class="listing tickets">

    <thead><tr>
      <th class="id">${_('Ticket')}</th>
      <th class="summary">${_('Summary')}</th>
      <th class="owner">${_('Owner')}</th>
      <th class="status">${_('Status')}</th>
      <th class="type">${_('Type')}</th>
      <th class="priority asc">${_('Priority')}</th>
      <th class="milestone">${_('Milestone')}</th>
    </tr></thead>
    <tbody>
<py:for each="idx, ticket in enumerate(project.tickets)">
      <tr class="${idx % 2 and 'odd' or 'even'} prio${ticket.priority_value}">
        <td class="summary"><a href="${project.href}/ticket/${ticket.id}">${ticket.id}</a></td>
        <td class="summary"><a href="${project.href}/ticket/${ticket.id}">${ticket.summary}</a></td>
        <td class="owner"><span>${ticket.owner}</span></td>
        <td class="status"><span>${ticket.status}</span></td>
        <td class="type"><span>${ticket.type}</span></td>
        <td class="priority"><span>${ticket.priority}</span></td>
        <td class="milestone"><span>${ticket.milestone}</span></td>
      </tr>
</py:for>
    </tbody>
  </table>
</py:for>
</div>
</body>
</html>
