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