Code

Multilinks can be filtered by combining elements with AND, OR and NOT
[roundup.git] / share / roundup / templates / devel / html / page.html
1 <tal:block metal:define-macro="frame">
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html>
4  <head>
5   <title metal:define-slot="head_title">title goes here</title>
6   <link rel="stylesheet" type="text/css" href="@@file/style.css" />
7   <meta http-equiv="Content-Type"
8         tal:attributes="content string:text/html;; charset=${request/client/charset}" />
9   <script tal:replace="structure request/base_javascript"></script>
10   <metal:x define-slot="more-javascript" />
11  </head>
12  <body tal:attributes="class request/classname"
13        tal:define="kw_create python:request.user.hasPermission('Create', 'keyword');
14                    bug_columns string:id,activity,title,creator,status;
15                    bug_columns_showall string:id,activity,title,creator,assignee,status;
16                    bug_status_notclosed string:-1,1,2,4;
18                    task_columns string:id,activity,title,creator,status;
19                    task_columns_showall string:id,activity,title,creator,assignee,status;
20                    task_status_notclosed string:-1,1,2,4;
22                    milestone_columns string:id,activity,title,creator,status;
23                    milestone_columns_showall string:id,activity,title,creator,assignee,status;
24                    milestone_status_notclosed string:-1,1,2,4;">
25   <div class="header">
26    <h1><a href="/">Roundup Demo Tracker</a></h1>
27    <div id="searchbox">
28     <form name="searchform" method="get" action="bug" id="searchform">
29      <div id="search">
30       <input type="hidden" name="@columns"
31              tal:attributes="value bug_columns_showall"/>
32       <input type="hidden" name="@sort" value="-activity" />
33       <input type="hidden" name="@group" value="priority" />
34       <input type="hidden" name="@filter" value="status"/>
35       <input type="hidden" name="status" tal:attributes="value bug_status_notclosed"/>
36       <input class="input-text" id="search-text" name="@search_text" size="10" />
37       <input type="submit" id="submit" value="search in open bugs" name="submit" class="input-button"/>
38      </div>
39     </form>
40    </div> <!-- searchbox -->
41   </div> <!-- header -->
42   <div class="navigation">
43    <div class="menu">
44     <ul>
45      <li class="current"><a href="/" i18n:translate="">Bugs</a>
46       <ul tal:condition="python:request.user.hasPermission('View', 'bug')">
47        <li tal:condition="python:request.user.hasPermission('Create', 'bug')">
48         <a href="bug?@template=item" i18n:translate="">Create New</a>
49        </li>
50        <li>
51         <a href="#"
52            tal:attributes="href python:request.indexargs_url('bug', {
53                                 '@sort': '-activity',
54                                 '@group': 'priority',
55                                 '@filter': 'status',
56                                 '@columns': bug_columns_showall,
57                                 '@search_text': '',
58                                 'status': bug_status_notclosed,
59                                 '@dispname': i18n.gettext('Show All'),
60                                 '@startwith': 0,
61                                 })"
62                 i18n:translate="">Show Open</a>
63        </li>
64        <li><a href="#"
65               tal:attributes="href python:request.indexargs_url('bug', {
66                                 '@sort': '-activity',
67                                 '@group': 'priority',
68                                 '@filter': 'status,assignee',
69                                 '@columns': bug_columns,
70                                 '@search_text': '',
71                                 'status': bug_status_notclosed,
72                                 'assignee': '-1',
73                                 '@dispname': i18n.gettext('Show Unassigned'),
74                                 '@startwith': 0,
75                                 })"
76                 i18n:translate="">Show Unassigned</a>
77        </li>
78        <li>
79         <a href="bug?@template=search&status=1" i18n:translate="">Search</a>
80        </li>
81        <li>
82         <form method="post" action="#">
83          <input type="submit" class="form-small" value="Show bug:" i18n:attributes="value"/>
84          <input class="form-small" size="4" type="text" name="@number"/>
85          <input type="hidden" name="@type" value="bug"/>
86          <input type="hidden" name="@action" value="show"/>
87         </form>
88        </li>
89       </ul>
90      </li>
91      <li class="current"><a href="/" i18n:translate="">Tasks</a>
92       <ul tal:condition="python:request.user.hasPermission('View', 'task')">
93        <li tal:condition="python:request.user.hasPermission('Create', 'task')">
94         <a href="task?@template=item" i18n:translate="">Create New</a>
95        </li>
96        <li>
97         <a href="#" tal:attributes="href python:request.indexargs_url('task', {
98                                 '@sort': '-activity',
99                                 '@group': 'priority',
100                                 '@filter': 'status',
101                                 '@columns': task_columns_showall,
102                                 '@search_text': '',
103                                 'status': task_status_notclosed,
104                                 '@dispname': i18n.gettext('Show All'),
105                                 '@startwith': 0,
106                                 })"
107                 i18n:translate="">Show Open</a>
108        </li>
109        <li>
110         <a href="#" tal:attributes="href python:request.indexargs_url('task', {
111                                 '@sort': '-activity',
112                                 '@group': 'priority',
113                                 '@filter': 'status,assignee',
114                                 '@columns': task_columns,
115                                 '@search_text': '',
116                                 'status': task_status_notclosed,
117                                 'assignee': '-1',
118                                 '@dispname': i18n.gettext('Show Unassigned'),
119                                 '@startwith': 0,
120                                 })"
121                 i18n:translate="">Show Unassigned</a>
122        </li>
123        <li>
124         <a href="task?@template=search&status=1" i18n:translate="">Search</a>
125        </li>
126        <li>
127         <form method="post" action="#">
128          <input type="submit" class="form-small" value="Show task:" i18n:attributes="value"/>
129          <input class="form-small" size="4" type="text" name="@number"/>
130          <input type="hidden" name="@type" value="task"/>
131          <input type="hidden" name="@action" value="show"/>
132         </form>
133        </li>
134       </ul>
135      </li>
136      <li class="current"><a href="milestone" i18n:translate="">Milestones</a>
137       <ul tal:condition="python:request.user.hasPermission('View', 'milestone')">
138        <li tal:condition="python:request.user.hasPermission('Create', 'milestone')">
139         <a href="milestone?@template=item" i18n:translate="">Create New</a>
140        </li>
141        <li>
142         <a href="#" tal:attributes="href python:request.indexargs_url('milestone', {
143                                 '@filter': 'status',
144                                 'status': milestone_status_notclosed,
145                                 '@dispname': i18n.gettext('Show Open'),
146                                 '@startwith': 0,
147                                 })"
148                 i18n:translate="">Show Open</a>
149        </li>
150       </ul>
151      </li>
152     </ul>
153     <ul class="user">
154      <li tal:condition="python:request.user.username=='anonymous'" class="submenu">
155       <b i18n:translate="">User</b>
156       <form method="post" action="#">
157        <ul>
158         <li>
159          <tal:span i18n:translate="">Login</tal:span><br/>
160          <input size="10" name="__login_name"/><br/>
161          <input size="10" type="password" name="__login_password"/><br/>
162          <input type="hidden" name="@action" value="Login"/>
163          <input type="checkbox" name="remember" id="remember"/>
164          <label for="remember" i18n:translate="">Remember me?</label><br/>
165          <input class="form-small" type="submit" value="Login" i18n:attributes="value"/><br/>
166          <input type="hidden" name="__came_from" tal:attributes="value string:${request/env/PATH_INFO}"/>
167          <span tal:replace="structure request/indexargs_form" />
168         </li>
169         <li>
170          <a href="user?@template=register"
171             tal:condition="python:request.user.hasPermission('Create', 'user')"
172             i18n:translate="">Register</a>
173         </li>
174         <li>
175          <a href="user?@template=forgotten" i18n:translate="">Lost&nbsp;your&nbsp;login?</a>
176         </li>
177        </ul>
178       </form>
179      </li>
180      <li tal:condition="python:request.user.username != 'anonymous'" class="submenu">
181       <p class="label"><b tal:replace="request/user/username">username</b></p>
182       <ul>
183        <li>
184         <a href="#" tal:attributes="href python:request.indexargs_url('bug', {
185                                      '@sort': '-activity',
186                                      '@group': 'priority',
187                                      '@filter': 'status,assignee',
188                                      '@columns': bug_columns,
189                                      '@search_text': '',
190                                      'status': bug_status_notclosed,
191                                      'assignee': request.user.id,
192                                      '@dispname': i18n.gettext('Bugs assigned to you'),
193                                      '@startwith': 0})"
194                     i18n:translate="">Bugs assigned to you</a>
195        </li>
196        <li>
197         <a tal:attributes="href string:user${request/user/id}" i18n:translate="">Your Details</a>
198        </li>
199        <li>
200         <a tal:attributes="href python:request.indexargs_url('', {'@action':'logout'})" 
201            i18n:translate="">Logout</a>
202        </li>
203        <li class="" tal:condition="python:request.user.hasPermission('View', 'query')">
204         <span i18n:translate=""><b>Your Queries</b> (<a class="nomargin" href="query?@template=edit">edit</a>)</span><br/>
205         <ul tal:repeat="qs request/user/queries">
206          <li>
207           <a tal:attributes="href string:${qs/klass}?${qs/url}&@dispname=${qs/name}" tal:content="qs/name">link</a>
208          </li>
209         </ul>
210        </li>
211        <li class="" tal:condition="python:request.user.hasPermission('View', 'user')">
212         <b i18n:translate="">Administration</b>
213         <ul>
214          <li tal:condition="python:request.user.hasPermission('Edit', None)">
215           <a href="home?@template=classlist" i18n:translate="">Class List</a>
216          </li>
217          <li tal:condition="python:request.user.hasPermission('View', 'user')
218                             or request.user.hasPermission('Edit', 'user')">
219           <a href="user?@sort=username"  i18n:translate="">User List</a>
220          </li>
221          <li tal:condition="python:request.user.hasPermission('Create', 'user')">
222           <a href="user?@template=item" i18n:translate="">Add User</a>
223          </li>
224          <li tal:condition="python:request.user.hasPermission('Edit', 'keyword')">
225           <a href="keyword" i18n:translate="">Edit Keywords</a>
226          </li>
227         </ul>
228        </li>
229       </ul>
230      </li>
231     </ul> <!-- user -->
232    </div> <!-- menu -->
233   </div> <!-- navigation -->
234   <div class="content">
235    <h1 id="breadcrumb"><span metal:define-slot="body_title">body title</span></h1>
236    <p tal:condition="options/error_message | nothing" class="error-message"
237       tal:repeat="m options/error_message" tal:content="structure m" />
238    <p tal:condition="options/ok_message | nothing" class="ok-message">
239     <span tal:repeat="m options/ok_message" tal:content="structure string:$m <br/ > " />
240     <a class="form-small" tal:attributes="href request/current_url" i18n:translate="">clear this message</a>
241    </p>
242    <tal:block metal:define-slot="content">Page content goes here</tal:block>
243   </div> <!-- content -->
244   <div class="footer">
245 <!-- Created: Wed Jan 14 11:55:38 EST 2009 -->
246 <!-- hhmts start -->
247 Last modified: Wed Jun  3 00:02:37 EDT 2009
248 <!-- hhmts end -->
249   </div> <!-- footer -->
250   <pre tal:condition="request/form/deissue | nothing" tal:content="request"></pre>
251  </body>
252 </html>
253 </tal:block>
255 <!--
256 The following macros are intended to be used in search pages.
258 The invoking context must define a "name" variable which names the
259 property being searched.
261 See issue.search.html in the classic template for examples.
262 -->
264 <!-- creates a th and a label: -->
265 <th metal:define-macro="th_label"
266     tal:define="required required | python:[]"
267     tal:attributes="class python:(name in required) and 'required' or nothing">
268   <label tal:attributes="for name" tal:content="label" i18n:translate="">text</label>
269         <metal:x define-slot="behind_the_label" />
270 </th>
272 <td metal:define-macro="search_input">
273   <input tal:attributes="value python:request.form.getvalue(name) or nothing;
274                          name name;
275                          id name"/>
276 </td>
278 <td metal:define-macro="search_date">
279   <input tal:attributes="value python:request.form.getvalue(name) or nothing;
280                          name name;
281                          id name"/>
282   <a class="classhelp"
283          tal:attributes="href python:'''javascript:help_window('task?@template=calendar&property=%s&form=itemSynopsis', 300, 200)'''%name">(cal)</a>
284 </td>
286 <td metal:define-macro="search_popup">
287   <!--
288     context needs to specify the popup "columns" as a comma-separated
289     string (eg. "id,title" or "id,name,description") as well as name
290   -->
291   <input tal:attributes="value python:request.form.getvalue(name) or nothing;
292                          name name;
293                          id name"/>
294   <span tal:replace="structure python:db.task.classhelp(columns,
295                                       property=name)" />
296 </td>
298 <td metal:define-macro="search_select">
299   <select tal:attributes="name name; id name"
300           tal:define="value python:request.form.getvalue(name)">
301     <option value="" i18n:translate="">don't care</option>
302     <metal:slot define-slot="extra_options" />
303     <option value="" i18n:translate="" disabled="disabled">------------</option>
304     <option tal:repeat="s python:db[db_klass].list()"
305             tal:attributes="value s/id; selected python:value == s.id"
306             tal:content="python:s[db_content]"></option>
307   </select>
308 </td>
310 <td metal:define-macro="search_select_keywords">
311   <select tal:attributes="name name; id name"
312           tal:define="value python:request.form.getvalue(name)">
313     <option value="" i18n:translate="">don't care</option>
314     <metal:slot define-slot="extra_options" />
315     <option value="" i18n:translate="" disabled="disabled">------------</option>
316     <option tal:repeat="s python:db[db_klass].list()"
317             tal:attributes="value s/id; selected python:value == s.id"
318             tal:content="python:s[db_content]"></option>
319   </select>
320   <a class="classhelp"
321          tal:attributes="href python:'''javascript:help_window('task?@template=&property=%s&form=itemSynopsis', 300, 200)'''%name">(edit)</a>
322 </td>
324 <!-- like search_select, but translates the further values.
325 Could extend it (METAL 1.1 attribute "extend-macro")
326 -->
327 <td metal:define-macro="search_select_translated">
328   <select tal:attributes="name name; id name"
329           tal:define="value python:request.form.getvalue(name)">
330     <option value="" i18n:translate="">don't care</option>
331     <metal:slot define-slot="extra_options" />
332     <option value="" i18n:translate="" disabled="disabled">------------</option>
333     <option tal:repeat="s python:db[db_klass].list()"
334             tal:attributes="value s/id; selected python:value == s.id"
335                                                 tal:content="python:s[db_content]"
336                                                 i18n:translate=""></option>
337   </select>
338 </td>
340 <!-- currently, there is no convenient API to get a list of all roles -->
341 <td metal:define-macro="search_select_roles"
342           tal:define="onchange onchange | nothing">
343   <select name="roles" id="roles" tal:attributes="onchange onchange">
344     <option value="" i18n:translate="">don't care</option>
345     <option value="" i18n:translate="" disabled="disabled">------------</option>
346     <option value="User">User</option>
347     <option value="Developer">Developer</option>
348     <option value="Coordinator">Coordinator</option>
349   </select>
350 </td>
352 <td metal:define-macro="search_multiselect">
353   <input tal:attributes="value python:request.form.getvalue(name) or nothing;
354                          name name;
355                          id name"/>
356   <span tal:replace="structure python:db[db_klass].classhelp(db_content,
357                                         property=name, width='600')" />
358 </td>
360 <td metal:define-macro="search_checkboxes">
361  <ul class="search-checkboxes"
362      tal:define="value python:request.form.getvalue(name);
363                  values python:value and value.split(',') or []">
364  <li tal:repeat="s python:db[db_klass].list()">
365   <input type="checkbox" tal:attributes="name name; id string:$name-${s/id};
366     value s/id; checked python:s.id in values" />
367   <label tal:attributes="for string:$name-${s/id}"
368          tal:content="python:s[db_content]" />
369  </li>
370  <li metal:define-slot="no_value_item">
371   <input type="checkbox" value="-1" tal:attributes="name name;
372      id string:$name--1; checked python:value == '-1'" />
373   <label tal:attributes="for string:$name--1" i18n:translate="">no value</label>
374  </li>
375  </ul>
376 </td>
378 <td metal:define-macro="column_input">
379   <input type="checkbox" name="@columns"
380          tal:attributes="value name;
381                          checked python:name in cols"/>
382 </td>
384 <td metal:define-macro="sort_input">
385   <input type="radio" name="@sort"
386          tal:attributes="value name;
387                          checked python:name == sort_on"/>
388 </td>
390 <td metal:define-macro="group_input">
391   <input type="radio" name="@group"
392          tal:attributes="value name;
393                          checked python:name == group_on"/>
394 </td>
396 <!--
397 The following macros are intended for user editing.
399 The invoking context must define a "name" variable which names the
400 property being searched; the "edit_ok" variable tells whether the
401 current user is allowed to edit.
403 See user.item.html in the classic template for examples.
404 -->
405 <script metal:define-macro="user_utils" type="text/javascript" src="@@file/user_utils.js"></script>
407 <!-- src: value will be re-used for other input fields -->
408 <input metal:define-macro="user_src_input"
409     type="text" tal:attributes="onblur python:edit_ok and 'split_name(this)';
410     id name; name name; value value; readonly not:edit_ok"
411     value="heinz.kunz"/>
412 <!-- normal: no re-using -->
413 <input metal:define-macro="user_normal_input" type="text"
414     tal:attributes="id name; name name; value value; readonly not:edit_ok"
415     value="heinz"/>
416 <!-- password: type; no initial value -->
417     <input metal:define-macro="user_pw_input" type="password"
418     tal:attributes="id name; name name; readonly not:edit_ok" value=""/>
419     <input metal:define-macro="user_confirm_input" type="password"
420     tal:attributes="id name; name string:@confirm@$name; readonly not:edit_ok" value=""/>