File: components.html

package info (click to toggle)
trac-subcomponents 1.3.3-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 96 kB
  • sloc: python: 223; javascript: 171; makefile: 4
file content (77 lines) | stat: -rw-r--r-- 2,532 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!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="layout.html" />
  <head>
    <title>Components</title>
  </head>
  <body>
    <h1>Components</h1>
    <div id="content">
    <form id="query" method="get" action="">
      <p class="option">
        <input type="checkbox" id="hide_description" name="hide_description"
               checked="${hide_description or None}" />
        <label for="hide_description">Hide description</label>
      </p>
      <p class="option">
        <input type="checkbox" id="no_milestone" name="no_milestone" checked="${no_milestone or None}"/>
        <label for="no_milestone">Only tickets without milestone</label>
      </p>
      <div class="buttons">
        <input type="submit" value="Update"/>
      </div>
    </form>
                   
    <table class="listing subcomponents">
      <tr>
        <th>Name</th>
        <th colspan="2">Tickets</th>
        <th py:if="not hide_description">Description</th>
      </tr>
      
      <py:for each="idx, component in enumerate(components)">
        <tr py:def="componentrow(name)" class="${name}">
          <td>
            <a style="margin: 0 0 0 ${component.subcomponent_level * 1}em"
               href="${href('query', component = component.name, status = ['assigned', 'new', 'accepted', 'reopened'])}">
              <em>${component.subname}</em>
            </a>
          </td>
          <td class="ticketcount">
            <py:choose test="">
              <py:when test="no_milestone">
                ${component.active_tickets_without_milestone}
              </py:when>
              <py:otherwise>
                ${component.active_tickets}
              </py:otherwise>
            </py:choose>
          </td> 
          <td class="ticketadd">
            <a href="${href('newticket', component = component.name)}">
              add ticket
            </a>
          </td>
          <td py:if="not hide_description" class="meta">
            ${component.description}
          </td>
        </tr>
      
        <py:choose test="">
          <py:when test="idx %2 == 0">
             ${componentrow("even")}
          </py:when>
          <py:otherwise>
            ${componentrow("odd")}
          </py:otherwise>
        </py:choose>
      </py:for>
    </table>
    </div>
  </body>
</html>