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