|
14 | 14 | and request.user.hasRole('Anonymous')" |
15 | 15 | i18n:translate="">Please login with your username and password.</span> |
16 | 16 |
|
17 | | -<table width="100%" tal:condition="context/is_view_ok" class="list"> |
| 17 | +<form tal:condition="context/is_view_ok" method="get" name="itemSynopsis" |
| 18 | + tal:attributes="action request/classname"> |
| 19 | + |
| 20 | +<table class="form" tal:define=" |
| 21 | + search_input templates/page/macros/search_input;"> |
| 22 | + |
| 23 | + <tr><th class="header" colspan="5">Search for users</th></tr> |
| 24 | + <tr> |
| 25 | + <th class="header">Username</th> |
| 26 | + <td tal:define="name string:username"> |
| 27 | + <input tal:attributes="value python:request.form.getvalue(name) or nothing; |
| 28 | + name name; |
| 29 | + id name"/> |
| 30 | + </td> |
| 31 | + <th class="header">Realname</th> |
| 32 | + <td tal:define="name string:realname"> |
| 33 | + <input tal:attributes="value python:request.form.getvalue(name) or nothing; |
| 34 | + name name; |
| 35 | + id name"/> |
| 36 | + </td> |
| 37 | + |
| 38 | + <td><input class="form-small" type="submit" value="Search" i18n:attributes="value"/></td> |
| 39 | + </tr> |
| 40 | + |
| 41 | +</table> |
| 42 | + <input type="hidden" name="@action" value="search"/> |
| 43 | +</form> |
| 44 | + |
| 45 | +<table width="100%" tal:condition="context/is_view_ok" class="list" |
| 46 | + tal:define="batch request/batch"> |
18 | 47 | <tr> |
19 | 48 | <th i18n:translate="">Username</th> |
20 | 49 | <th i18n:translate="">Real name</th> |
|
23 | 52 | <th i18n:translate="">Phone number</th> |
24 | 53 | <th tal:condition="context/is_edit_ok" i18n:translate="">Retire</th> |
25 | 54 | </tr> |
26 | | -<tal:block repeat="user context/list"> |
| 55 | +<tal:block repeat="user batch"> |
27 | 56 | <tr tal:attributes="class python:['normal', 'alt'][repeat['user'].index%6//3]"> |
28 | 57 | <td> |
29 | 58 | <a tal:attributes="href string:user${user/id}" |
|
45 | 74 | </td> |
46 | 75 | </tr> |
47 | 76 | </tal:block> |
| 77 | + <tr tal:condition="batch"> |
| 78 | + <th tal:attributes="colspan python:len(request.columns)"> |
| 79 | + <table width="100%"> |
| 80 | + <tr class="navigation"> |
| 81 | + <th> |
| 82 | + <a tal:define="prev batch/previous" tal:condition="prev" |
| 83 | + tal:attributes="href python:request.indexargs_url(request.classname, |
| 84 | + {'@startwith':prev.first, '@pagesize':prev.size})" |
| 85 | + i18n:translate=""><< previous</a> |
| 86 | + |
| 87 | + </th> |
| 88 | + <th i18n:translate=""><span tal:replace="batch/start" i18n:name="start" |
| 89 | + />..<span tal:replace="python: batch.start + batch.length -1" i18n:name="end" |
| 90 | + /> out of <span tal:replace="batch/sequence_length" i18n:name="total" |
| 91 | + /></th> |
| 92 | + <th> |
| 93 | + <a tal:define="next batch/next" tal:condition="next" |
| 94 | + tal:attributes="href python:request.indexargs_url(request.classname, |
| 95 | + {'@startwith':next.first, '@pagesize':next.size})" |
| 96 | + i18n:translate="">next >></a> |
| 97 | + |
| 98 | + </th> |
| 99 | + </tr> |
| 100 | + </table> |
| 101 | + </th> |
| 102 | + </tr> |
| 103 | + |
48 | 104 | </table> |
49 | 105 | </td> |
50 | 106 |
|
|
0 commit comments