OLD | NEW |
(Empty) | |
| 1 <!-- vim:sw=2 sts=2 |
| 2 --><tal:block metal:define-macro="icing" |
| 3 ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/s
trict.dtd"> |
| 4 <html> |
| 5 <head> |
| 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"> |
| 11 </script> |
| 12 <metal:x define-slot="more-javascript" /> |
| 13 |
| 14 </head> |
| 15 <body class="body"> |
| 16 |
| 17 <table class="body" |
| 18 tal:define=" |
| 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; |
| 25 " |
| 26 > |
| 27 |
| 28 <tr> |
| 29 <td class="page-header-left"> </td> |
| 30 <td class="page-header-top"> |
| 31 <div id="searchbox"> |
| 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" /> |
| 42 </form> |
| 43 </div> |
| 44 <div id="body-title"> |
| 45 <h2><span metal:define-slot="body_title">body title</span></h2> |
| 46 </div> |
| 47 </td> |
| 48 </tr> |
| 49 |
| 50 <tr> |
| 51 <td rowspan="2" valign="top" class="sidebar"> |
| 52 <p class="classblock" |
| 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> |
| 59 </tal:block> |
| 60 </p> |
| 61 |
| 62 <form method="POST" tal:attributes="action request/base"> |
| 63 <p class="classblock" |
| 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> |
| 68 </span> |
| 69 <a href="#" |
| 70 tal:attributes="href python:request.indexargs_url('issue', { |
| 71 '@sort': '-activity', |
| 72 '@group': 'priority', |
| 73 '@filter': 'status,assignedto', |
| 74 '@columns': columns, |
| 75 '@search_text': '', |
| 76 'status': status_notresolved, |
| 77 'assignedto': '-1', |
| 78 '@dispname': i18n.gettext('Show Unassigned'), |
| 79 })" |
| 80 i18n:translate="">Show Unassigned</a><br> |
| 81 <a href="#" |
| 82 tal:attributes="href python:request.indexargs_url('issue', { |
| 83 '@sort': '-activity', |
| 84 '@group': 'priority', |
| 85 '@filter': 'status', |
| 86 '@columns': columns_showall, |
| 87 '@search_text': '', |
| 88 'status': status_notresolved, |
| 89 '@dispname': i18n.gettext('Show All'), |
| 90 })" |
| 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"> |
| 98 </p> |
| 99 </form> |
| 100 |
| 101 <tal:if condition="python:request.user.hasPermission('View', 'confidential')"> |
| 102 <form method="POST" tal:attributes="action request/base"> |
| 103 <p class="classblock" |
| 104 tal:condition="python:request.user.hasPermission('View', 'confidential')"
> |
| 105 <b i18n:translate="">CONFIDENTIAL Issues</b><br> |
| 106 <span tal:condition="python:request.user.hasPermission('Create', 'confidenti
al')"> |
| 107 <a href="confidential?@template=item" i18n:translate="">Create new</a><br> |
| 108 </span> |
| 109 <a href="#" |
| 110 tal:attributes="href python:request.indexargs_url('confidential', { |
| 111 '@sort': '-activity', |
| 112 '@group': 'priority', |
| 113 '@filter': 'status,assignedto', |
| 114 '@columns': columns, |
| 115 '@search_text': '', |
| 116 'status': status_notresolved, |
| 117 'assignedto': '-1', |
| 118 '@dispname': i18n.gettext('Show Unassigned'), |
| 119 })" |
| 120 i18n:translate="">Show Unassigned</a><br> |
| 121 <a href="#" |
| 122 tal:attributes="href python:request.indexargs_url('confidential', { |
| 123 '@sort': '-activity', |
| 124 '@group': 'priority', |
| 125 '@filter': 'status', |
| 126 '@columns': columns_showall, |
| 127 '@search_text': '', |
| 128 'status': status_notresolved, |
| 129 '@dispname': i18n.gettext('Show All'), |
| 130 })" |
| 131 i18n:translate="">Show All</a><br> |
| 132 <a href="confidential?@template=search" >Search</a><br> |
| 133 <input type="submit" class="form-small" value="Show issue:" |
| 134 i18n:attributes="value"><input class="form-small" size="4" |
| 135 type="text" name="@number"> |
| 136 <input type="hidden" name="@type" value="confidential"> |
| 137 <input type="hidden" name="@action" value="show"> |
| 138 </p> |
| 139 </form> |
| 140 </tal:if> |
| 141 |
| 142 <p class="classblock" |
| 143 tal:condition="python:kw_edit or kw_create"> |
| 144 <b i18n:translate="">Keywords</b><br> |
| 145 <span tal:condition="python:request.user.hasPermission('Create', 'keyword')"> |
| 146 <a href="keyword?@template=item" i18n:translate="">Create New</a><br> |
| 147 </span> |
| 148 <span tal:condition="kw_edit_link"> |
| 149 <a href="keyword?@template=item" i18n:translate="">Edit Existing</a><br> |
| 150 </span> |
| 151 </p> |
| 152 |
| 153 <tal:if condition="python:request.user.hasPermission('Create', 'user')"> |
| 154 <p class="classblock" |
| 155 tal:condition="python:request.user.hasPermission('View', 'user')"> |
| 156 <b i18n:translate="">Administration</b><br> |
| 157 <span tal:condition="python:request.user.hasPermission('Edit', None)"> |
| 158 <a href="home?@template=classlist" i18n:translate="">Class List</a><br> |
| 159 </span> |
| 160 <span tal:condition="python:request.user.hasPermission('View', 'user') |
| 161 or request.user.hasPermission('Edit', 'user')"> |
| 162 <a href="user" i18n:translate="">User List</a><br> |
| 163 </span> |
| 164 <a tal:condition="python:request.user.hasPermission('Create', 'user')" |
| 165 href="user?@template=item" i18n:translate="">Add User</a> |
| 166 </p> |
| 167 </tal:if> |
| 168 |
| 169 <form method="POST" tal:condition="python:request.user.username=='anonymous'" |
| 170 tal:attributes="action request/base"> |
| 171 <p class="userblock"> |
| 172 <b i18n:translate="">Login</b><br> |
| 173 <input size="10" name="__login_name"><br> |
| 174 <input size="10" type="password" name="__login_password"><br> |
| 175 <input type="hidden" name="@action" value="Login"> |
| 176 <input type="checkbox" name="remember" id="remember"> |
| 177 <label for="remember" i18n:translate="">Remember me?</label><br> |
| 178 <input type="submit" value="Login" i18n:attributes="value"><br> |
| 179 <input type="hidden" name="__came_from" tal:attributes="value string:${reque
st/base}${request/env/PATH_INFO}"> |
| 180 <span tal:replace="structure request/indexargs_form" /> |
| 181 <a href="user?@template=register" |
| 182 tal:condition="python:request.user.hasPermission('Register', 'user')" |
| 183 i18n:translate="">Register</a><br> |
| 184 <a href="user?@template=forgotten" i18n:translate="">Lost your log
in?</a><br> |
| 185 </p> |
| 186 </form> |
| 187 |
| 188 <p class="userblock" tal:condition="python:request.user.username != 'anonymous
'"> |
| 189 <b i18n:translate="">Hello, <span i18n:name="user" |
| 190 tal:replace="python:request.user.username.plain(escape=1)">username</span></
b><br> |
| 191 <a href="#" |
| 192 tal:attributes="href python:request.indexargs_url('issue', { |
| 193 '@sort': '-activity', |
| 194 '@group': 'priority', |
| 195 '@filter': 'status,assignedto', |
| 196 '@columns': 'id,activity,title,creator,status', |
| 197 '@search_text': '', |
| 198 'status': status_notresolved, |
| 199 'assignedto': request.user.id, |
| 200 '@dispname': i18n.gettext('Your Issues'), |
| 201 })" |
| 202 i18n:translate="">Your Issues</a><br> |
| 203 <a href="#" tal:attributes="href string:user${request/user/id}" |
| 204 i18n:translate="">Your Details</a><br> |
| 205 <a href="#" tal:attributes="href python:request.indexargs_url('', |
| 206 {'@action':'logout'})" i18n:translate="">Logout</a> |
| 207 </p> |
| 208 <p class="userblock"> |
| 209 <b i18n:translate="">Help</b><br> |
| 210 <a href="http://www.roundup-tracker.org" |
| 211 i18n:translate="">Roundup docs</a> |
| 212 </p> |
| 213 </td> |
| 214 <td> |
| 215 <p tal:condition="options/error_message | nothing" class="error-message" |
| 216 tal:repeat="m options/error_message" tal:content="structure m" /> |
| 217 <p tal:condition="options/ok_message | nothing" class="ok-message"> |
| 218 <span tal:repeat="m options/ok_message" |
| 219 tal:content="structure string:$m <br/ > " /> |
| 220 <a class="form-small" tal:attributes="href request/current_url" |
| 221 i18n:translate="">clear this message</a> |
| 222 </p> |
| 223 </td> |
| 224 </tr> |
| 225 <tr> |
| 226 <td class="content" metal:define-slot="content">Page content goes here</td> |
| 227 </tr> |
| 228 |
| 229 </table> |
| 230 |
| 231 <pre tal:condition="request/form/debug | nothing" tal:content="request"> |
| 232 </pre> |
| 233 |
| 234 </body> |
| 235 </html> |
| 236 </tal:block> |
| 237 |
| 238 <!-- |
| 239 The following macros are intended to be used in search pages. |
| 240 |
| 241 The invoking context must define a "name" variable which names the |
| 242 property being searched. |
| 243 |
| 244 See issue.search.html in the classic template for examples. |
| 245 --> |
| 246 |
| 247 <!-- creates a th and a label: --> |
| 248 <th metal:define-macro="th_label" |
| 249 tal:define="required required | python:[]" |
| 250 tal:attributes="class python:(name in required) and 'required' or nothing"> |
| 251 <label tal:attributes="for name" tal:content="label" i18n:translate="">text</l
abel> |
| 252 <metal:x define-slot="behind_the_label" /> |
| 253 </th> |
| 254 |
| 255 <td metal:define-macro="search_input"> |
| 256 <input tal:attributes="value python:request.form.getvalue(name) or nothing; |
| 257 name name; |
| 258 id name"> |
| 259 </td> |
| 260 |
| 261 <td metal:define-macro="search_date"> |
| 262 <input tal:attributes="value python:request.form.getvalue(name) or nothing; |
| 263 name name; |
| 264 id name"> |
| 265 <a class="classhelp" |
| 266 tal:attributes="href python:'''javascript:help_window('issue?@template=
calendar&property=%s&form=itemSynopsis', 300, 200)'''%name">(cal)</a> |
| 267 </td> |
| 268 |
| 269 <td metal:define-macro="search_popup"> |
| 270 <!-- |
| 271 context needs to specify the popup "columns" as a comma-separated |
| 272 string (eg. "id,title" or "id,name,description") as well as name |
| 273 --> |
| 274 <input tal:attributes="value python:request.form.getvalue(name) or nothing; |
| 275 name name; |
| 276 id name"> |
| 277 <span tal:replace="structure python:db[db_klass].classhelp(columns, |
| 278 property=name)" /> |
| 279 </td> |
| 280 |
| 281 <td metal:define-macro="search_select"> |
| 282 <select tal:attributes="name name; id name" |
| 283 tal:define="value python:request.form.getvalue(name)"> |
| 284 <option value="" i18n:translate="">don't care</option> |
| 285 <metal:slot define-slot="extra_options" /> |
| 286 <option value="" i18n:translate="" disabled="disabled">------------</option> |
| 287 <option tal:repeat="s python:db[db_klass].list()" |
| 288 tal:attributes="value s/id; selected python:value == s.id" |
| 289 tal:content="python:s[db_content]"></option> |
| 290 </select> |
| 291 </td> |
| 292 |
| 293 <td metal:define-macro="search_select_keywords"> |
| 294 <div tal:attributes="id python:'''keywords_%s'''%name"> |
| 295 <select tal:attributes="name name; id name" |
| 296 tal:define="value python:request.form.getvalue(name)"> |
| 297 <option value="" i18n:translate="">don't care</option> |
| 298 <metal:slot define-slot="extra_options" /> |
| 299 <option value="" i18n:translate="" disabled="disabled">------------</optio
n> |
| 300 <option tal:repeat="s python:db[db_klass].list()" |
| 301 tal:attributes="value s/id; selected python:value == s.id" |
| 302 tal:content="python:s[db_content]"></option> |
| 303 </select> |
| 304 <a class="classhelp" |
| 305 tal:attributes="href python:'''javascript:help_window('issue?@templat
e=keywords_expr&property=%s&form=itemSynopsis', 350, 200)'''%name">(expr)</a> |
| 306 </div> |
| 307 </td> |
| 308 |
| 309 <!-- like search_select, but translates the further values. |
| 310 Could extend it (METAL 1.1 attribute "extend-macro") |
| 311 --> |
| 312 <td metal:define-macro="search_select_translated"> |
| 313 <select tal:attributes="name name; id name" |
| 314 tal:define="value python:request.form.getvalue(name)"> |
| 315 <option value="" i18n:translate="">don't care</option> |
| 316 <metal:slot define-slot="extra_options" /> |
| 317 <option value="" i18n:translate="" disabled="disabled">------------</option> |
| 318 <option tal:repeat="s python:db[db_klass].list()" |
| 319 tal:attributes="value s/id; selected python:value == s.id" |
| 320 tal:content="python:s[db_content
]" |
| 321 i18n:translate=""></option> |
| 322 </select> |
| 323 </td> |
| 324 |
| 325 <!-- currently, there is no convenient API to get a list of all roles --> |
| 326 <td metal:define-macro="search_select_roles" |
| 327 tal:define="onchange onchange | nothing"> |
| 328 <select name=roles id=roles tal:attributes="onchange onchange"> |
| 329 <option value="" i18n:translate="">don't care</option> |
| 330 <option value="" i18n:translate="" disabled="disabled">------------</option> |
| 331 <option value="User">User</option> |
| 332 <option value="Admin">Admin</option> |
| 333 <option value="Anonymous">Anonymous</option> |
| 334 </select> |
| 335 </td> |
| 336 |
| 337 <td metal:define-macro="search_multiselect"> |
| 338 <input tal:attributes="value python:request.form.getvalue(name) or nothing; |
| 339 name name; |
| 340 id name"> |
| 341 <span tal:replace="structure python:db[db_klass].classhelp(db_content, |
| 342 property=name, width='600')" /> |
| 343 </td> |
| 344 |
| 345 <td metal:define-macro="search_checkboxes"> |
| 346 <ul class="search-checkboxes" |
| 347 tal:define="value python:request.form.getvalue(name); |
| 348 values python:value and value.split(',') or []"> |
| 349 <li tal:repeat="s python:db[db_klass].list()"> |
| 350 <input type="checkbox" tal:attributes="name name; id string:$name-${s/id}; |
| 351 value s/id; checked python:s.id in values" /> |
| 352 <label tal:attributes="for string:$name-${s/id}" |
| 353 tal:content="python:s[db_content]" /> |
| 354 </li> |
| 355 <li metal:define-slot="no_value_item"> |
| 356 <input type="checkbox" value="-1" tal:attributes="name name; |
| 357 id string:$name--1; checked python:value == '-1'" /> |
| 358 <label tal:attributes="for string:$name--1" i18n:translate="">no value</label> |
| 359 </li> |
| 360 </ul> |
| 361 </td> |
| 362 |
| 363 <td metal:define-macro="column_input"> |
| 364 <input type="checkbox" name="@columns" |
| 365 tal:attributes="value name; |
| 366 checked python:name in cols"> |
| 367 </td> |
| 368 |
| 369 <td metal:define-macro="sort_input"> |
| 370 <input type="radio" name="@sort" |
| 371 tal:attributes="value name; |
| 372 checked python:name == sort_on"> |
| 373 </td> |
| 374 |
| 375 <td metal:define-macro="group_input"> |
| 376 <input type="radio" name="@group" |
| 377 tal:attributes="value name; |
| 378 checked python:name == group_on"> |
| 379 </td> |
| 380 |
| 381 <!-- |
| 382 The following macros are intended for user editing. |
| 383 |
| 384 The invoking context must define a "name" variable which names the |
| 385 property being searched; the "edit_ok" variable tells whether the |
| 386 current user is allowed to edit. |
| 387 |
| 388 See user.item.html in the classic template for examples. |
| 389 --> |
| 390 <script metal:define-macro="user_utils" type="text/javascript" src="@@file/user_
utils.js"></script> |
| 391 |
| 392 <!-- src: value will be re-used for other input fields --> |
| 393 <input metal:define-macro="user_src_input" |
| 394 type="text" tal:attributes="onblur python:edit_ok and 'split_name(this)'; |
| 395 id name; name name; value value; readonly not:edit_ok" |
| 396 value="heinz.kunz"> |
| 397 <!-- normal: no re-using --> |
| 398 <input metal:define-macro="user_normal_input" type="text" |
| 399 tal:attributes="id name; name name; value value; readonly not:edit_ok" |
| 400 value="heinz"> |
| 401 <!-- password: type; no initial value --> |
| 402 <input metal:define-macro="user_pw_input" type="password" |
| 403 tal:attributes="id name; name name; readonly not:edit_ok" value=""> |
| 404 <input metal:define-macro="user_confirm_input" type="password" |
| 405 tal:attributes="id name; name string:@confirm@$name; readonly not:edit_ok" v
alue=""> |
| 406 |
| 407 <!-- SHA: c0bf30c10db0878cfbd5ac8ba99ee69218df6dff --> |
OLD | NEW |