Mercurial > p > roundup > code
comparison website/issues/html/query.edit.html @ 4024:c2d0d3e9099d website
svn repository setup
| author | Stefan Seefeld <stefan@users.sourceforge.net> |
|---|---|
| date | Fri, 06 Feb 2009 13:16:31 +0000 |
| parents | |
| children | 58c52057418d |
comparison
equal
deleted
inserted
replaced
| 4023:86c38b5aed66 | 4024:c2d0d3e9099d |
|---|---|
| 1 <tal:block metal:use-macro="templates/page/macros/icing"> | |
| 2 <title metal:fill-slot="head_title" i18n:translate="" | |
| 3 >"Your Queries" Editing - <span tal:replace="config/TRACKER_NAME" | |
| 4 i18n:name="tracker" /></title> | |
| 5 <span metal:fill-slot="body_title" tal:omit-tag="python:1" | |
| 6 i18n:translate="">"Your Queries" Editing</span> | |
| 7 | |
| 8 <td class="content" metal:fill-slot="content"> | |
| 9 | |
| 10 <span tal:condition="not:context/is_edit_ok" | |
| 11 i18n:translate="">You are not allowed to edit queries.</span> | |
| 12 | |
| 13 <script language="javascript"> | |
| 14 // This exists solely because I can't figure how to get the & into an | |
| 15 // attributes TALES expression, and so it keeps getting quoted. | |
| 16 function retire(qid) { | |
| 17 window.location = 'query'+qid+'?@action=retire&@template=edit'; | |
| 18 } | |
| 19 </script> | |
| 20 | |
| 21 <form method="POST" onSubmit="return submit_once()" action="query" | |
| 22 enctype="multipart/form-data" tal:condition="context/is_edit_ok"> | |
| 23 | |
| 24 <table class="list" width="100%" | |
| 25 tal:define="uid request/user/id; mine request/user/queries"> | |
| 26 | |
| 27 <tr><th i18n:translate="">Query</th> | |
| 28 <th i18n:translate="">Include in "Your Queries"</th> | |
| 29 <th i18n:translate="">Edit</th> | |
| 30 <th i18n:translate="">Private to you?</th> | |
| 31 <th> </th> | |
| 32 </tr> | |
| 33 | |
| 34 <tr tal:repeat="query mine"> | |
| 35 <tal:block condition="query/is_retired"> | |
| 36 | |
| 37 <td><a tal:attributes="href string:${query/klass}?${query/url}" | |
| 38 tal:content="query/name">query</a></td> | |
| 39 | |
| 40 <td metal:define-macro="include"> | |
| 41 <select tal:condition="python:query.id not in mine" | |
| 42 tal:attributes="name string:user${uid}@add@queries"> | |
| 43 <option value="" i18n:translate="">leave out</option> | |
| 44 <option tal:attributes="value query/id" i18n:translate="">include</option> | |
| 45 </select> | |
| 46 <select tal:condition="python:query.id in mine" | |
| 47 tal:attributes="name string:user${uid}@remove@queries"> | |
| 48 <option value="" i18n:translate="">leave in</option> | |
| 49 <option tal:attributes="value query/id" i18n:translate="">remove</option> | |
| 50 </select> | |
| 51 </td> | |
| 52 | |
| 53 <td colspan="3" i18n:translate="">[query is retired]</td> | |
| 54 | |
| 55 <!-- <td> maybe offer "restore" some day </td> --> | |
| 56 </tal:block> | |
| 57 </tr> | |
| 58 | |
| 59 <tr tal:define="queries python:db.query.filter(filterspec={'private_for':uid})" | |
| 60 tal:repeat="query queries"> | |
| 61 <td><a tal:attributes="href string:${query/klass}?${query/url}" | |
| 62 tal:content="query/name">query</a></td> | |
| 63 | |
| 64 <td metal:use-macro="template/macros/include" /> | |
| 65 | |
| 66 <td><a tal:attributes="href string:query${query/id}" i18n:translate="">edit</a></td> | |
| 67 | |
| 68 <td> | |
| 69 <select tal:attributes="name string:query${query/id}@private_for"> | |
| 70 <option tal:attributes="selected python:query.private_for == uid; | |
| 71 value uid" i18n:translate="">yes</option> | |
| 72 <option tal:attributes="selected python:query.private_for == None" | |
| 73 value="-1" i18n:translate="">no</option> | |
| 74 </select> | |
| 75 </td> | |
| 76 | |
| 77 <td> | |
| 78 <input type="button" value="Delete" i18n:attributes="value" | |
| 79 tal:attributes="onClick python:'''retire('%s')'''%query.id"> | |
| 80 </td> | |
| 81 </tr> | |
| 82 | |
| 83 <tr tal:define="queries python:db.query.filter(filterspec={'private_for':None})" | |
| 84 tal:repeat="query queries"> | |
| 85 <td><a tal:attributes="href string:${query/klass}?${query/url}" | |
| 86 tal:content="query/name">query</a></td> | |
| 87 | |
| 88 <td metal:use-macro="template/macros/include" /> | |
| 89 | |
| 90 <td colspan="3" tal:condition="query/is_edit_ok"> | |
| 91 <a tal:attributes="href string:query${query/id}" i18n:translate="">edit</a> | |
| 92 </td> | |
| 93 <td tal:condition="not:query/is_edit_ok" colspan="3" | |
| 94 i18n:translate="">[not yours to edit]</td> | |
| 95 | |
| 96 </tr> | |
| 97 | |
| 98 <tr><td colspan="5"> | |
| 99 <input type="hidden" name="@action" value="edit"> | |
| 100 <input type="hidden" name="@template" value="edit"> | |
| 101 <input type="submit" value="Save Selection" i18n:attributes="value"> | |
| 102 </td></tr> | |
| 103 | |
| 104 </table> | |
| 105 | |
| 106 </form> | |
| 107 </td> | |
| 108 </tal:block> |
