1 <tal:block metal:use-macro="templates/page/macros/frame">
2 <title metal:fill-slot="head_title" >
3 <span tal:omit-tag="true" i18n:translate="" >List of milestones</span>
4 <span tal:condition="request/dispname"
5 tal:replace="python:' - %s '%request.dispname"
6 /> - <span tal:replace="config/TRACKER_NAME" />
7 </title>
8 <span metal:fill-slot="body_title" tal:omit-tag="true">
9 <span tal:omit-tag="true" i18n:translate="" >List of milestones</span>
10 <span tal:condition="request/dispname"
11 tal:replace="python:' - %s' % request.dispname" />
12 </span>
13 <tal:block metal:fill-slot="content">
15 <p tal:condition="python:not (context.is_view_ok()
16 or request.user.hasRole('Anonymous'))" i18n:translate="">
17 You are not allowed to view this page.</p>
19 <p tal:condition="python:not context.is_view_ok()
20 and request.user.hasRole('Anonymous')" i18n:translate="">
21 Please login with your username and password.</p>
23 <tal:block tal:define="batch request/batch" tal:condition="context/is_view_ok">
24 <table class="list">
25 <tr>
26 <th tal:condition="request/show/id" i18n:translate="">ID</th>
27 <th tal:condition="request/show/title" i18n:translate="">Title</th>
28 <th tal:condition="request/show/status" i18n:translate="">Status</th>
29 <!-- <th tal:condition="request/show/type" i18n:translate="">Type</th>-->
30 </tr>
31 <tal:block tal:repeat="i batch" condition=true>
32 <tr tal:define="group python:[r[1] for r in request.group]"
33 tal:condition="python:group and batch.propchanged(*group)">
34 <th tal:attributes="colspan python:len(request.columns)" class="group">
35 <tal:block tal:repeat="g group">
36 <tal:block tal:content="python:str(i[g]) or '(no %s set)'%g"/>
37 </tal:block>
38 </th>
39 </tr>
41 <tr tal:attributes="class python:['even','odd'][repeat['i'].even()]">
42 <td tal:condition="request/show/id" tal:content="i/id"> </td>
43 <td tal:condition="request/show/title">
44 <a tal:attributes="href string:milestone${i/id}"
45 tal:content="python:str(i.title.plain(hyperlink=0)) or '[no title]'">title</a>
46 </td>
47 <td tal:condition="request/show/status"
48 tal:content="python:i.status.plain() or default"> </td>
49 </tr>
51 </tal:block>
53 <metal:index define-macro="batch-footer">
54 <tr tal:condition="batch">
55 <th tal:attributes="colspan python:len(request.columns)">
56 <table width="100%">
57 <tr class="navigation">
58 <th>
59 <a tal:define="prev batch/previous" tal:condition="prev"
60 tal:attributes="href python:request.indexargs_url(request.classname,
61 {'@startwith':prev.first, '@pagesize':prev.size})"
62 i18n:translate=""><< previous</a>
63
64 </th>
65 <th i18n:translate=""><span tal:replace="batch/start" i18n:name="start"
66 />..<span tal:replace="python: batch.start + batch.length -1" i18n:name="end"
67 /> out of <span tal:replace="batch/sequence_length" i18n:name="total"
68 /></th>
69 <th>
70 <a tal:define="next batch/next" tal:condition="next"
71 tal:attributes="href python:request.indexargs_url(request.classname,
72 {'@startwith':next.first, '@pagesize':next.size})"
73 i18n:translate="">next >></a>
74
75 </th>
76 </tr>
77 </table>
78 </th>
79 </tr>
80 </metal:index>
81 </table>
82 <!--
83 <a tal:attributes="href python:request.indexargs_url('milestone',
84 {'@action':'export_csv'})" i18n:translate="">Download as CSV</a>
85 -->
86 <form method="get" class="index-controls"
87 tal:attributes="action request/classname">
89 <table class="form" tal:define="n_sort python:2">
90 <!--
91 <tal:block tal:repeat="n python:range(n_sort)" tal:condition="batch">
92 <tr tal:define="key python:len(request.sort)>n and request.sort[n]">
93 <th>
94 <tal:block tal:condition="not:n" i18n:translate="">Sort on:</tal:block>
95 </th>
96 <td>
97 <select tal:attributes="name python:'@sort%d'%n">
98 <option value="" i18n:translate="">- nothing -</option>
99 <option tal:repeat="col context/properties"
100 tal:attributes="value col/_name;
101 selected python:key and col._name == key[1]"
102 tal:content="col/_name"
103 i18n:translate="">column</option>
104 </select>
105 </td>
106 <th i18n:translate="">Descending:</th>
107 <td><input type="checkbox" tal:attributes="name python:'@sortdir%d'%n;
108 checked python:key and key[0] == '-'"/>
109 </td>
110 </tr>
111 </tal:block>
112 -->
113 <tal:block tal:repeat="n python:range(n_sort)" tal:condition="batch">
114 <tr tal:define="key python:len(request.group)>n and request.group[n]">
115 <th>
116 <tal:block tal:condition="not:n" i18n:translate="">Group on:</tal:block>
117 </th>
118 <td>
119 <select tal:attributes="name python:'@group%d'%n">
120 <option value="" i18n:translate="">- nothing -</option>
121 <option tal:repeat="col context/properties"
122 tal:attributes="value col/_name;
123 selected python:key and col._name == key[1]"
124 tal:content="col/_name"
125 i18n:translate="">column</option>
126 </select>
127 </td>
128 <th i18n:translate="">Descending:</th>
129 <td><input type="checkbox" tal:attributes="name python:'@groupdir%d'%n;
130 checked python:key and key[0] == '-'"/>
131 </td>
132 </tr>
133 </tal:block>
134 <tr><td colspan="4">
135 <input type="submit" value="Redisplay" i18n:attributes="value"/>
136 <tal:block tal:replace="structure
137 python:request.indexargs_form(sort=0, group=0)" />
138 </td></tr>
139 </table>
140 </form>
142 </tal:block>
143 </tal:block>
144 </tal:block>