Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: modules/roundup/templates/query.edit.html.erb

Issue 6033763767156736: Concept for Roundup as issue tracker. (Closed)
Patch Set: Created Feb. 25, 2014, 8:34 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « modules/roundup/templates/page.html.erb ('k') | modules/roundup/templates/schema.py.erb » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!-- dollarId: user.item,v 1.7 2002/08/16 04:29:04 richard Exp dollar-->
2 <tal:block metal:use-macro="templates/page/macros/icing">
3 <title metal:fill-slot="head_title" i18n:translate=""
4 >"Your Queries" Editing - <span tal:replace="config/TRACKER_NAME"
5 i18n:name="tracker" /></title>
6 <span metal:fill-slot="body_title" tal:omit-tag="python:1"
7 i18n:translate="">"Your Queries" Editing</span>
8
9 <td class="content" metal:fill-slot="content">
10
11 <span tal:condition="not:context/is_edit_ok"
12 i18n:translate="">You are not allowed to edit queries.</span>
13
14 <script language="javascript">
15 // This exists solely because I can't figure how to get the & into an
16 // attributes TALES expression, and so it keeps getting quoted.
17 function retire(qid) {
18 window.location = 'query'+qid+'?@action=retire&@template=edit';
19 }
20 </script>
21
22 <form method="POST" onSubmit="return submit_once()" action="query"
23 enctype="multipart/form-data" tal:condition="context/is_edit_ok">
24
25 <table class="list" width="100%"
26 tal:define="uid request/user/id; mine request/user/queries">
27
28 <tr><th i18n:translate="">Query</th>
29 <th i18n:translate="">Include in "Your Queries"</th>
30 <th i18n:translate="">Edit</th>
31 <th i18n:translate="">Private to you?</th>
32 <th>&nbsp;</th>
33 </tr>
34
35 <tr tal:repeat="query mine">
36 <tal:block condition="query/is_retired">
37
38 <td><a tal:attributes="href string:${query/klass}?${query/url}"
39 tal:content="query/name">query</a></td>
40
41 <td metal:define-macro="include">
42 <select tal:condition="python:query.id not in mine"
43 tal:attributes="name string:user${uid}@add@queries">
44 <option value="" i18n:translate="">leave out</option>
45 <option tal:attributes="value query/id" i18n:translate="">include</option>
46 </select>
47 <select tal:condition="python:query.id in mine"
48 tal:attributes="name string:user${uid}@remove@queries">
49 <option value="" i18n:translate="">leave in</option>
50 <option tal:attributes="value query/id" i18n:translate="">remove</option>
51 </select>
52 </td>
53
54 <td colspan="3" i18n:translate="">[query is retired]</td>
55
56 <!-- <td> maybe offer "restore" some day </td> -->
57 </tal:block>
58 </tr>
59
60 <tr tal:repeat="query mine">
61 <tal:block condition="not:query/is_retired">
62 <td><a tal:attributes="href string:${query/klass}?${query/url}"
63 tal:content="query/name">query</a></td>
64
65 <td metal:use-macro="template/macros/include" />
66
67 <td><a tal:attributes="href string:query${query/id}" i18n:translate="">edit</a> </td>
68
69 <td>
70 <select tal:attributes="name string:query${query/id}@private_for">
71 <option tal:attributes="selected python:query.private_for == uid;
72 value uid" i18n:translate="">yes</option>
73 <option tal:attributes="selected python:query.private_for == None"
74 value="-1" i18n:translate="">no</option>
75 </select>
76 </td>
77
78 <td>
79 <input type="button" value="Delete" i18n:attributes="value"
80 tal:attributes="onClick python:'''retire('%s')'''%query.id">
81 </td>
82 </tal:block>
83 </tr>
84
85 <tr tal:define="queries python:db.query.filter(filterspec={'private_for':None})"
86 tal:repeat="query queries">
87 <tal:block condition="python: query.creator != uid">
88 <td><a tal:attributes="href string:${query/klass}?${query/url}"
89 tal:content="query/name">query</a></td>
90
91 <td metal:use-macro="template/macros/include" />
92
93 <td colspan="3" tal:condition="query/is_edit_ok">
94 <a tal:attributes="href string:query${query/id}" i18n:translate="">edit</a>
95 </td>
96 <td tal:condition="not:query/is_edit_ok" colspan="3"
97 i18n:translate="">[not yours to edit]</td>
98 </tal:block>
99 </tr>
100
101 <tr><td colspan="5">
102 <input type="hidden" name="@action" value="edit">
103 <input type="hidden" name="@template" value="edit">
104 <input type="submit" value="Save Selection" i18n:attributes="value">
105 </td></tr>
106
107 </table>
108
109 </form>
110 </td>
111 </tal:block>
112 <!-- SHA: 381522a1ff6675e1da99ccc7c2b012e5e1e5f7b8 -->
OLDNEW
« no previous file with comments | « modules/roundup/templates/page.html.erb ('k') | modules/roundup/templates/schema.py.erb » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld