249c75c9c4ef6274163bc360c98255dd31c18971
2 --><tal:block metal:
define-macro=
"icing"
3 ><!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
6 <title metal:
define-slot=
"head_title">title goes here
</title>
7 <link rel=
"stylesheet" type=
"text/css" href=
"@@file/style.css">
8 <meta http-equiv=
"Content-Type"
9 tal:
attributes=
"content string:text/html;; charset=${request/client/charset}" />
10 <script tal:
replace=
"structure request/base_javascript">
12 <metal:x define-slot=
"more-javascript" />
19 kw_edit python:request.user.hasPermission('Edit', 'keyword');
20 kw_create python:request.user.hasPermission('Create', 'keyword');
21 kw_edit_link python:kw_edit and db.keyword.list();
22 columns string:id,activity,title,creator,status;
23 columns_showall string:id,activity,title,creator,assignedto,status;
24 status_notresolved string:-1,1,2,3,4,5,6,7;
29 <td class=
"page-header-left"> </td>
30 <td class=
"page-header-top">
32 <form method=
"GET" action=
"issue">
33 <input type=
"hidden" name=
"@columns"
34 tal:
attributes=
"value columns_showall"
35 value=
"id,activity,title,creator,assignedto,status"/>
36 <input type=
"hidden" name=
"@sort" value=
"activity"/>
37 <input type=
"hidden" name=
"@group" value=
"priority"/>
38 <input id=
"search-text" name=
"@search_text" size=
"10"
39 tal:
attributes=
"value request/search_text | default" />
40 <input type=
"submit" id=
"submit" name=
"submit" value=
"Search"
41 i18n:
attributes=
"value" />
45 <h2><span metal:
define-slot=
"body_title">body title
</span></h2>
51 <td rowspan=
"2" valign=
"top" class=
"sidebar">
53 tal:
condition=
"python:request.user.hasPermission('View', 'query')">
54 <span i18n:
translate=
""
55 ><b>Your Queries
</b> (
<a href=
"query?@template=edit">edit
</a>)
</span><br>
56 <tal:block tal:
repeat=
"qs request/user/queries">
57 <a href=
"#" tal:
attributes=
"href string:${qs/klass}?${qs/url}&@dispname=${qs/name}"
58 tal:
content=
"qs/name">link
</a><br>
62 <form method=
"POST" tal:
attributes=
"action request/base">
64 tal:
condition=
"python:request.user.hasPermission('View', 'issue')">
65 <b i18n:
translate=
"">Issues
</b><br>
66 <span tal:
condition=
"python:request.user.hasPermission('Create', 'issue')">
67 <a href=
"issue?@template=item" i18n:
translate=
"">Create New
</a><br>
70 tal:
attributes=
"href python:request.indexargs_url('issue', {
73 '@filter': 'status,assignedto',
76 'status': status_notresolved,
78 '@dispname': i18n.gettext('Show Unassigned'),
80 i18n:
translate=
"">Show Unassigned
</a><br>
82 tal:
attributes=
"href python:request.indexargs_url('issue', {
86 '@columns': columns_showall,
88 'status': status_notresolved,
89 '@dispname': i18n.gettext('Show All'),
91 i18n:
translate=
"">Show All
</a><br>
92 <a href=
"issue?@template=search" i18n:
translate=
"">Search
</a><br>
93 <input type=
"submit" class=
"form-small" value=
"Show issue:"
94 i18n:
attributes=
"value"><input class=
"form-small" size=
"4"
95 type=
"text" name=
"@number">
96 <input type=
"hidden" name=
"@type" value=
"issue">
97 <input type=
"hidden" name=
"@action" value=
"show">
101 <p class=
"classblock"
102 tal:
condition=
"python:kw_edit or kw_create">
103 <b i18n:
translate=
"">Keywords
</b><br>
104 <span tal:
condition=
"python:request.user.hasPermission('Create', 'keyword')">
105 <a href=
"keyword?@template=item" i18n:
translate=
"">Create New
</a><br>
107 <span tal:
condition=
"kw_edit_link">
108 <a href=
"keyword?@template=item" i18n:
translate=
"">Edit Existing
</a><br>
112 <p class=
"classblock"
113 tal:
condition=
"python:request.user.hasPermission('View', 'user')">
114 <b i18n:
translate=
"">Administration
</b><br>
115 <span tal:
condition=
"python:request.user.hasPermission('Edit', None)">
116 <a href=
"home?@template=classlist" i18n:
translate=
"">Class List
</a><br>
118 <span tal:
condition=
"python:request.user.hasPermission('View', 'user')
119 or request.user.hasPermission('Edit', 'user')">
120 <a href=
"user" i18n:
translate=
"">User List
</a><br>
122 <a tal:
condition=
"python:request.user.hasPermission('Create', 'user')"
123 href=
"user?@template=item" i18n:
translate=
"">Add User
</a>
126 <form method=
"POST" tal:
condition=
"python:request.user.username=='anonymous'"
127 tal:
attributes=
"action request/base">
128 <p class=
"userblock">
129 <b i18n:
translate=
"">Login
</b><br>
130 <input size=
"10" name=
"__login_name"><br>
131 <input size=
"10" type=
"password" name=
"__login_password"><br>
132 <input type=
"hidden" name=
"@action" value=
"Login">
133 <input type=
"checkbox" name=
"remember" id=
"remember">
134 <label for=
"remember" i18n:
translate=
"">Remember me?
</label><br>
135 <input type=
"submit" value=
"Login" i18n:
attributes=
"value"><br>
136 <input type=
"hidden" name=
"__came_from" tal:
attributes=
"value string:${request/base}${request/env/PATH_INFO}">
137 <span tal:
replace=
"structure request/indexargs_form" />
138 <!--a href="user?@template=register"
139 tal:condition="python:request.user.hasPermission('Register', 'user')"
140 i18n:translate="">Register</a><br>
141 <a href="user?@template=forgotten" i18n:translate="">Lost your login?</a--><br>
145 <p class="userblock" tal:condition="python:request.user.username != 'anonymous'">
146 <b i18n:translate="">Hello, <span i18n:name="user"
147 tal:replace="python:request.user.username.plain(escape=1)">username</span></b><br>
149 tal:attributes="href python:request.indexargs_url('issue', {
150 '@sort': '-activity',
151 '@group': 'priority',
152 '@filter': 'status,assignedto',
153 '@columns': 'id,activity,title,creator,status',
155 'status': status_notresolved,
156 'assignedto': request.user.id,
157 '@dispname': i18n.gettext('Your Issues'),
159 i18n:translate="">Your Issues</a><br>
160 <!--a href="#" tal:attributes="href string:user${request/user/id}"
161 i18n:translate="">Your Details</a><br-->
162 <a href="#" tal:attributes="href python:request.indexargs_url('',
163 {'@action':'logout'})" i18n:translate="">Logout</a>
165 <p class="userblock">
166 <b i18n:translate="">Help</b><br>
167 <a href="http://www.roundup-tracker.org"
168 i18n:translate="">Roundup docs</a>
172 <p tal:condition="options/error_message | nothing" class="error-message"
173 tal:repeat="m options/error_message" tal:content="structure m" />
174 <p tal:condition="options/ok_message | nothing" class="ok-message">
175 <span tal:repeat="m options/ok_message"
176 tal:content="structure string:$m <br/ > " />
177 <a class="form-small" tal:attributes="href request/current_url"
178 i18n:translate="">clear this message</a>
183 <td class="content" metal:define-slot="content">Page content goes here</td>
188 <pre tal:condition="request/form/debug | nothing" tal:content="request">
196 The following macros are intended to be used in search pages.
198 The invoking context must define a "name" variable which names the
199 property being searched.
201 See issue.search.html in the classic template for examples.
204 <!-- creates a th and a label: -->
205 <th metal:
define-macro=
"th_label"
206 tal:
define=
"required required | python:[]"
207 tal:
attributes=
"class python:(name in required) and 'required' or nothing">
208 <label tal:
attributes=
"for name" tal:
content=
"label" i18n:
translate=
"">text
</label>
209 <metal:x define-slot=
"behind_the_label" />
212 <td metal:
define-macro=
"search_input">
213 <input tal:
attributes=
"value python:request.form.getvalue(name) or nothing;
218 <td metal:
define-macro=
"search_date">
219 <input tal:
attributes=
"value python:request.form.getvalue(name) or nothing;
223 tal:
attributes=
"href python:'''javascript:help_window('issue?@template=calendar&property=%s&form=itemSynopsis', 300, 200)'''%name">(cal)
</a>
226 <td metal:
define-macro=
"search_popup">
228 context needs to specify the popup "columns" as a comma-separated
229 string (eg. "id,title" or "id,name,description") as well as name
231 <input tal:
attributes=
"value python:request.form.getvalue(name) or nothing;
234 <span tal:
replace=
"structure python:db.issue.classhelp(columns,
238 <td metal:
define-macro=
"search_select">
239 <select tal:
attributes=
"name name; id name"
240 tal:
define=
"value python:request.form.getvalue(name)">
241 <option value=
"" i18n:
translate=
"">don't care
</option>
242 <metal:slot define-slot=
"extra_options" />
243 <option value=
"" i18n:
translate=
"" disabled=
"disabled">------------
</option>
244 <option tal:
repeat=
"s python:db[db_klass].list()"
245 tal:
attributes=
"value s/id; selected python:value == s.id"
246 tal:
content=
"python:s[db_content]"></option>
250 <!-- like search_select, but translates the further values.
251 Could extend it (METAL 1.1 attribute "extend-macro")
253 <td metal:
define-macro=
"search_select_translated">
254 <select tal:
attributes=
"name name; id name"
255 tal:
define=
"value python:request.form.getvalue(name)">
256 <option value=
"" i18n:
translate=
"">don't care
</option>
257 <metal:slot define-slot=
"extra_options" />
258 <option value=
"" i18n:
translate=
"" disabled=
"disabled">------------
</option>
259 <option tal:
repeat=
"s python:db[db_klass].list()"
260 tal:
attributes=
"value s/id; selected python:value == s.id"
261 tal:
content=
"python:s[db_content]"
262 i18n:
translate=
""></option>
266 <!-- currently, there is no convenient API to get a list of all roles -->
267 <td metal:
define-macro=
"search_select_roles"
268 tal:
define=
"onchange onchange | nothing">
269 <select name=roles id=roles tal:
attributes=
"onchange onchange">
270 <option value=
"" i18n:
translate=
"">don't care
</option>
271 <option value=
"" i18n:
translate=
"" disabled=
"disabled">------------
</option>
272 <option value=
"User">User
</option>
273 <option value=
"Admin">Admin
</option>
274 <option value=
"Anonymous">Anonymous
</option>
278 <td metal:
define-macro=
"search_multiselect">
279 <input tal:
attributes=
"value python:request.form.getvalue(name) or nothing;
282 <span tal:
replace=
"structure python:db[db_klass].classhelp(db_content,
283 property=name, width='600')" />
286 <td metal:
define-macro=
"search_checkboxes">
287 <ul class=
"search-checkboxes"
288 tal:
define=
"value python:request.form.getvalue(name);
289 values python:value and value.split(',') or []">
290 <li tal:
repeat=
"s python:db[db_klass].list()">
291 <input type=
"checkbox" tal:
attributes=
"name name; id string:$name-${s/id};
292 value s/id; checked python:s.id in values" />
293 <label tal:
attributes=
"for string:$name-${s/id}"
294 tal:
content=
"python:s[db_content]" />
296 <li metal:
define-slot=
"no_value_item">
297 <input type=
"checkbox" value=
"-1" tal:
attributes=
"name name;
298 id string:$name--1; checked python:value == '-1'" />
299 <label tal:
attributes=
"for string:$name--1" i18n:
translate=
"">no value
</label>
304 <td metal:
define-macro=
"column_input">
305 <input type=
"checkbox" name=
"@columns"
306 tal:
attributes=
"value name;
307 checked python:name in cols">
310 <td metal:
define-macro=
"sort_input">
311 <input type=
"radio" name=
"@sort"
312 tal:
attributes=
"value name;
313 checked python:name == sort_on">
316 <td metal:
define-macro=
"group_input">
317 <input type=
"radio" name=
"@group"
318 tal:
attributes=
"value name;
319 checked python:name == group_on">
323 The following macros are intended for user editing.
325 The invoking context must define a "name" variable which names the
326 property being searched; the "edit_ok" variable tells whether the
327 current user is allowed to edit.
329 See user.item.html in the classic template for examples.
331 <script metal:
define-macro=
"user_utils" type=
"text/javascript" src=
"@@file/user_utils.js"></script>
333 <!-- src: value will be re-used for other input fields -->
334 <input metal:
define-macro=
"user_src_input"
335 type=
"text" tal:
attributes=
"onblur python:edit_ok and 'split_name(this)';
336 id name; name name; value value; readonly not:edit_ok"
338 <!-- normal: no re-using -->
339 <input metal:
define-macro=
"user_normal_input" type=
"text"
340 tal:
attributes=
"id name; name name; value value; readonly not:edit_ok"
342 <!-- password: type; no initial value -->
343 <input metal:
define-macro=
"user_pw_input" type=
"password"
344 tal:
attributes=
"id name; name name; readonly not:edit_ok" value=
"">
345 <input metal:
define-macro=
"user_confirm_input" type=
"password"
346 tal:
attributes=
"id name; name string:@confirm@$name; readonly not:edit_ok" value=
"">