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