Code

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