1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/themes/mercurialroundup/html/page.html Sun Jun 06 16:19:05 2010 +0200
1.3 @@ -0,0 +1,347 @@
1.4 +<!-- vim:sw=2 sts=2
1.5 +--><tal:block metal:define-macro="icing"
1.6 +><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
1.7 +<html>
1.8 +<head>
1.9 +<title metal:define-slot="head_title">title goes here</title>
1.10 +<link rel="stylesheet" type="text/css" href="@@file/style.css">
1.11 +<meta http-equiv="Content-Type"
1.12 + tal:attributes="content string:text/html;; charset=${request/client/charset}" />
1.13 +<script tal:replace="structure request/base_javascript">
1.14 +</script>
1.15 +<metal:x define-slot="more-javascript" />
1.16 +
1.17 +</head>
1.18 +<body class="body">
1.19 +
1.20 +<table class="body"
1.21 + tal:define="
1.22 +kw_edit python:request.user.hasPermission('Edit', 'keyword');
1.23 +kw_create python:request.user.hasPermission('Create', 'keyword');
1.24 +kw_edit_link python:kw_edit and db.keyword.list();
1.25 +columns string:id,activity,title,creator,status;
1.26 +columns_showall string:id,activity,title,creator,assignedto,status;
1.27 +status_notresolved string:-1,1,2,3,4,5,6,7;
1.28 +"
1.29 +>
1.30 +
1.31 +<tr>
1.32 + <td class="page-header-left"> </td>
1.33 + <td class="page-header-top">
1.34 + <div id="searchbox">
1.35 + <form method="GET" action="issue">
1.36 + <input type="hidden" name="@columns"
1.37 + tal:attributes="value columns_showall"
1.38 + value="id,activity,title,creator,assignedto,status"/>
1.39 + <input type="hidden" name="@sort" value="activity"/>
1.40 + <input type="hidden" name="@group" value="priority"/>
1.41 + <input id="search-text" name="@search_text" size="10"
1.42 + tal:attributes="value request/search_text | default" />
1.43 + <input type="submit" id="submit" name="submit" value="Search"
1.44 + i18n:attributes="value" />
1.45 + </form>
1.46 + </div>
1.47 + <div id="body-title">
1.48 + <h2><span metal:define-slot="body_title">body title</span></h2>
1.49 + </div>
1.50 + </td>
1.51 +</tr>
1.52 +
1.53 +<tr>
1.54 + <td rowspan="2" valign="top" class="sidebar">
1.55 + <p class="classblock"
1.56 + tal:condition="python:request.user.hasPermission('View', 'query')">
1.57 + <span i18n:translate=""
1.58 + ><b>Your Queries</b> (<a href="query?@template=edit">edit</a>)</span><br>
1.59 + <tal:block tal:repeat="qs request/user/queries">
1.60 + <a href="#" tal:attributes="href string:${qs/klass}?${qs/url}&@dispname=${qs/name}"
1.61 + tal:content="qs/name">link</a><br>
1.62 + </tal:block>
1.63 + </p>
1.64 +
1.65 + <form method="POST" tal:attributes="action request/base">
1.66 + <p class="classblock"
1.67 + tal:condition="python:request.user.hasPermission('View', 'issue')">
1.68 + <b i18n:translate="">Issues</b><br>
1.69 + <span tal:condition="python:request.user.hasPermission('Create', 'issue')">
1.70 + <a href="issue?@template=item" i18n:translate="">Create New</a><br>
1.71 + </span>
1.72 + <a href="#"
1.73 + tal:attributes="href python:request.indexargs_url('issue', {
1.74 + '@sort': '-activity',
1.75 + '@group': 'priority',
1.76 + '@filter': 'status,assignedto',
1.77 + '@columns': columns,
1.78 + '@search_text': '',
1.79 + 'status': status_notresolved,
1.80 + 'assignedto': '-1',
1.81 + '@dispname': i18n.gettext('Show Unassigned'),
1.82 + })"
1.83 + i18n:translate="">Show Unassigned</a><br>
1.84 + <a href="#"
1.85 + tal:attributes="href python:request.indexargs_url('issue', {
1.86 + '@sort': '-activity',
1.87 + '@group': 'priority',
1.88 + '@filter': 'status',
1.89 + '@columns': columns_showall,
1.90 + '@search_text': '',
1.91 + 'status': status_notresolved,
1.92 + '@dispname': i18n.gettext('Show All'),
1.93 + })"
1.94 + i18n:translate="">Show All</a><br>
1.95 + <a href="issue?@template=search" i18n:translate="">Search</a><br>
1.96 + <input type="submit" class="form-small" value="Show issue:"
1.97 + i18n:attributes="value"><input class="form-small" size="4"
1.98 + type="text" name="@number">
1.99 + <input type="hidden" name="@type" value="issue">
1.100 + <input type="hidden" name="@action" value="show">
1.101 + </p>
1.102 + </form>
1.103 +
1.104 + <p class="classblock"
1.105 + tal:condition="python:kw_edit or kw_create">
1.106 + <b i18n:translate="">Keywords</b><br>
1.107 + <span tal:condition="python:request.user.hasPermission('Create', 'keyword')">
1.108 + <a href="keyword?@template=item" i18n:translate="">Create New</a><br>
1.109 + </span>
1.110 + <span tal:condition="kw_edit_link">
1.111 + <a href="keyword?@template=item" i18n:translate="">Edit Existing</a><br>
1.112 + </span>
1.113 + </p>
1.114 +
1.115 + <p class="classblock"
1.116 + tal:condition="python:request.user.hasPermission('View', 'user')">
1.117 + <b i18n:translate="">Administration</b><br>
1.118 + <span tal:condition="python:request.user.hasPermission('Edit', None)">
1.119 + <a href="home?@template=classlist" i18n:translate="">Class List</a><br>
1.120 + </span>
1.121 + <span tal:condition="python:request.user.hasPermission('View', 'user')
1.122 + or request.user.hasPermission('Edit', 'user')">
1.123 + <a href="user" i18n:translate="">User List</a><br>
1.124 + </span>
1.125 + <a tal:condition="python:request.user.hasPermission('Create', 'user')"
1.126 + href="user?@template=item" i18n:translate="">Add User</a>
1.127 + </p>
1.128 +
1.129 + <form method="POST" tal:condition="python:request.user.username=='anonymous'"
1.130 + tal:attributes="action request/base">
1.131 + <p class="userblock">
1.132 + <b i18n:translate="">Login</b><br>
1.133 + <input size="10" name="__login_name"><br>
1.134 + <input size="10" type="password" name="__login_password"><br>
1.135 + <input type="hidden" name="@action" value="Login">
1.136 + <input type="checkbox" name="remember" id="remember">
1.137 + <label for="remember" i18n:translate="">Remember me?</label><br>
1.138 + <input type="submit" value="Login" i18n:attributes="value"><br>
1.139 + <input type="hidden" name="__came_from" tal:attributes="value string:${request/base}${request/env/PATH_INFO}">
1.140 + <span tal:replace="structure request/indexargs_form" />
1.141 + <a href="user?@template=register"
1.142 + tal:condition="python:request.user.hasPermission('Register', 'user')"
1.143 + i18n:translate="">Register</a><br>
1.144 + <a href="user?@template=forgotten" i18n:translate="">Lost your login?</a><br>
1.145 + </p>
1.146 + </form>
1.147 +
1.148 + <p class="userblock" tal:condition="python:request.user.username != 'anonymous'">
1.149 + <b i18n:translate="">Hello, <span i18n:name="user"
1.150 + tal:replace="python:request.user.username.plain(escape=1)">username</span></b><br>
1.151 + <a href="#"
1.152 + tal:attributes="href python:request.indexargs_url('issue', {
1.153 + '@sort': '-activity',
1.154 + '@group': 'priority',
1.155 + '@filter': 'status,assignedto',
1.156 + '@columns': 'id,activity,title,creator,status',
1.157 + '@search_text': '',
1.158 + 'status': status_notresolved,
1.159 + 'assignedto': request.user.id,
1.160 + '@dispname': i18n.gettext('Your Issues'),
1.161 + })"
1.162 + i18n:translate="">Your Issues</a><br>
1.163 + <a href="#" tal:attributes="href string:user${request/user/id}"
1.164 + i18n:translate="">Your Details</a><br>
1.165 + <a href="#" tal:attributes="href python:request.indexargs_url('',
1.166 + {'@action':'logout'})" i18n:translate="">Logout</a>
1.167 + </p>
1.168 + <p class="userblock">
1.169 + <b i18n:translate="">Help</b><br>
1.170 + <a href="http://www.roundup-tracker.org"
1.171 + i18n:translate="">Roundup docs</a>
1.172 + </p>
1.173 + </td>
1.174 + <td>
1.175 + <p tal:condition="options/error_message | nothing" class="error-message"
1.176 + tal:repeat="m options/error_message" tal:content="structure m" />
1.177 + <p tal:condition="options/ok_message | nothing" class="ok-message">
1.178 + <span tal:repeat="m options/ok_message"
1.179 + tal:content="structure string:$m <br/ > " />
1.180 + <a class="form-small" tal:attributes="href request/current_url"
1.181 + i18n:translate="">clear this message</a>
1.182 + </p>
1.183 + </td>
1.184 +</tr>
1.185 +<tr>
1.186 + <td class="content" metal:define-slot="content">Page content goes here</td>
1.187 +</tr>
1.188 +
1.189 +</table>
1.190 +
1.191 +<pre tal:condition="request/form/debug | nothing" tal:content="request">
1.192 +</pre>
1.193 +
1.194 +</body>
1.195 +</html>
1.196 +</tal:block>
1.197 +
1.198 +<!--
1.199 +The following macros are intended to be used in search pages.
1.200 +
1.201 +The invoking context must define a "name" variable which names the
1.202 +property being searched.
1.203 +
1.204 +See issue.search.html in the classic template for examples.
1.205 +-->
1.206 +
1.207 +<!-- creates a th and a label: -->
1.208 +<th metal:define-macro="th_label"
1.209 + tal:define="required required | python:[]"
1.210 + tal:attributes="class python:(name in required) and 'required' or nothing">
1.211 + <label tal:attributes="for name" tal:content="label" i18n:translate="">text</label>
1.212 + <metal:x define-slot="behind_the_label" />
1.213 +</th>
1.214 +
1.215 +<td metal:define-macro="search_input">
1.216 + <input tal:attributes="value python:request.form.getvalue(name) or nothing;
1.217 + name name;
1.218 + id name">
1.219 +</td>
1.220 +
1.221 +<td metal:define-macro="search_date">
1.222 + <input tal:attributes="value python:request.form.getvalue(name) or nothing;
1.223 + name name;
1.224 + id name">
1.225 + <a class="classhelp"
1.226 + tal:attributes="href python:'''javascript:help_window('issue?@template=calendar&property=%s&form=itemSynopsis', 300, 200)'''%name">(cal)</a>
1.227 +</td>
1.228 +
1.229 +<td metal:define-macro="search_popup">
1.230 + <!--
1.231 + context needs to specify the popup "columns" as a comma-separated
1.232 + string (eg. "id,title" or "id,name,description") as well as name
1.233 + -->
1.234 + <input tal:attributes="value python:request.form.getvalue(name) or nothing;
1.235 + name name;
1.236 + id name">
1.237 + <span tal:replace="structure python:db.issue.classhelp(columns,
1.238 + property=name)" />
1.239 +</td>
1.240 +
1.241 +<td metal:define-macro="search_select">
1.242 + <select tal:attributes="name name; id name"
1.243 + tal:define="value python:request.form.getvalue(name)">
1.244 + <option value="" i18n:translate="">don't care</option>
1.245 + <metal:slot define-slot="extra_options" />
1.246 + <option value="" i18n:translate="" disabled="disabled">------------</option>
1.247 + <option tal:repeat="s python:db[db_klass].list()"
1.248 + tal:attributes="value s/id; selected python:value == s.id"
1.249 + tal:content="python:s[db_content]"></option>
1.250 + </select>
1.251 +</td>
1.252 +
1.253 +<!-- like search_select, but translates the further values.
1.254 +Could extend it (METAL 1.1 attribute "extend-macro")
1.255 +-->
1.256 +<td metal:define-macro="search_select_translated">
1.257 + <select tal:attributes="name name; id name"
1.258 + tal:define="value python:request.form.getvalue(name)">
1.259 + <option value="" i18n:translate="">don't care</option>
1.260 + <metal:slot define-slot="extra_options" />
1.261 + <option value="" i18n:translate="" disabled="disabled">------------</option>
1.262 + <option tal:repeat="s python:db[db_klass].list()"
1.263 + tal:attributes="value s/id; selected python:value == s.id"
1.264 + tal:content="python:s[db_content]"
1.265 + i18n:translate=""></option>
1.266 + </select>
1.267 +</td>
1.268 +
1.269 +<!-- currently, there is no convenient API to get a list of all roles -->
1.270 +<td metal:define-macro="search_select_roles"
1.271 + tal:define="onchange onchange | nothing">
1.272 + <select name=roles id=roles tal:attributes="onchange onchange">
1.273 + <option value="" i18n:translate="">don't care</option>
1.274 + <option value="" i18n:translate="" disabled="disabled">------------</option>
1.275 + <option value="User">User</option>
1.276 + <option value="Admin">Admin</option>
1.277 + <option value="Anonymous">Anonymous</option>
1.278 + </select>
1.279 +</td>
1.280 +
1.281 +<td metal:define-macro="search_multiselect">
1.282 + <input tal:attributes="value python:request.form.getvalue(name) or nothing;
1.283 + name name;
1.284 + id name">
1.285 + <span tal:replace="structure python:db[db_klass].classhelp(db_content,
1.286 + property=name, width='600')" />
1.287 +</td>
1.288 +
1.289 +<td metal:define-macro="search_checkboxes">
1.290 + <ul class="search-checkboxes"
1.291 + tal:define="value python:request.form.getvalue(name);
1.292 + values python:value and value.split(',') or []">
1.293 + <li tal:repeat="s python:db[db_klass].list()">
1.294 + <input type="checkbox" tal:attributes="name name; id string:$name-${s/id};
1.295 + value s/id; checked python:s.id in values" />
1.296 + <label tal:attributes="for string:$name-${s/id}"
1.297 + tal:content="python:s[db_content]" />
1.298 + </li>
1.299 + <li metal:define-slot="no_value_item">
1.300 + <input type="checkbox" value="-1" tal:attributes="name name;
1.301 + id string:$name--1; checked python:value == '-1'" />
1.302 + <label tal:attributes="for string:$name--1" i18n:translate="">no value</label>
1.303 + </li>
1.304 + </ul>
1.305 +</td>
1.306 +
1.307 +<td metal:define-macro="column_input">
1.308 + <input type="checkbox" name="@columns"
1.309 + tal:attributes="value name;
1.310 + checked python:name in cols">
1.311 +</td>
1.312 +
1.313 +<td metal:define-macro="sort_input">
1.314 + <input type="radio" name="@sort"
1.315 + tal:attributes="value name;
1.316 + checked python:name == sort_on">
1.317 +</td>
1.318 +
1.319 +<td metal:define-macro="group_input">
1.320 + <input type="radio" name="@group"
1.321 + tal:attributes="value name;
1.322 + checked python:name == group_on">
1.323 +</td>
1.324 +
1.325 +<!--
1.326 +The following macros are intended for user editing.
1.327 +
1.328 +The invoking context must define a "name" variable which names the
1.329 +property being searched; the "edit_ok" variable tells whether the
1.330 +current user is allowed to edit.
1.331 +
1.332 +See user.item.html in the classic template for examples.
1.333 +-->
1.334 +<script metal:define-macro="user_utils" type="text/javascript" src="@@file/user_utils.js"></script>
1.335 +
1.336 +<!-- src: value will be re-used for other input fields -->
1.337 +<input metal:define-macro="user_src_input"
1.338 + type="text" tal:attributes="onblur python:edit_ok and 'split_name(this)';
1.339 + id name; name name; value value; readonly not:edit_ok"
1.340 + value="heinz.kunz">
1.341 +<!-- normal: no re-using -->
1.342 +<input metal:define-macro="user_normal_input" type="text"
1.343 + tal:attributes="id name; name name; value value; readonly not:edit_ok"
1.344 + value="heinz">
1.345 +<!-- password: type; no initial value -->
1.346 + <input metal:define-macro="user_pw_input" type="password"
1.347 + tal:attributes="id name; name name; readonly not:edit_ok" value="">
1.348 + <input metal:define-macro="user_confirm_input" type="password"
1.349 + tal:attributes="id name; name string:@confirm@$name; readonly not:edit_ok" value="">
1.350 +