Ajout dans l’historique des chargements de formulaires. TODO : tester la méthode...
[Plinn.git] / skins / generic / epoz_toolbox.pt
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
4 <html xmlns:tal="http://xml.zope.org/namespaces/tal"
5 xmlns:metal="http://xml.zope.org/namespaces/metal"
6 i18n:domain="plone">
7
8 <head tal:define="ztu modules/ZTUtils;">
9 <title tal:content="here/title_or_id">Title or Id</title>
10 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
11 <style type="text/css" media="all"
12 tal:define="current_skin python:ztu.make_query(skin=request.get(here.portal_skins.getRequestVarname(), ''))"
13 tal:content="string: @import url(${here/portal_url}/plone.css?${current_skin});">
14 </style>
15 </head>
16
17 <body onload="focus();" style="margin: 4px;">
18
19 <form class="group"
20 action="search"
21 method="post"
22 name="search"
23 tal:define="DateTime python:modules['DateTime'].DateTime"
24 tal:attributes="action string: ${here/absolute_url}/${template/getId}">
25
26 <span i18n:translate="legend_search_terms">Search Terms</span>
27 <div class="field">
28 <input type="text"
29 name="SearchableText"
30 size="25"
31 tabindex=""
32 />
33 <input tabindex=""
34 type="submit"
35 name="submit"
36 value="Search"
37 i18n:attributes="value"
38 />
39 </div>
40 </form>
41
42 <tal:block
43 tal:define="query_results python:[ brain.getObject() for brain in here.doFormSearch( REQUEST=request ) ];">
44 <div tal:condition="query_results">
45 <span i18n:translate="heading_search_results">Search results</span>
46 </div>
47 <div tal:condition="not: query_results"
48 tal:define="parents request/PARENTS;
49 nil python: parents.reverse();
50 portal here/portal_url/getPortalObject;">
51 <tal:block tal:repeat="parent parents">
52 <a tal:condition="python: len(parent.absolute_url()) >=
53 len(portal.absolute_url())"
54 tal:content="string: ${parent/title_or_id} /"
55 tal:attributes="href string: ${parent/absolute_url}/${template/getId};">Parent</a>
56 </tal:block>
57 </div>
58
59
60 <tal:block tal:define="checkPermission python: here.portal_membership.checkPermission;
61 results python: test(query_results, query_results,
62 [item for item in here.contentValues()
63 if checkPermission('View',item)]);">
64
65 <table tal:condition="results"
66 class="group" width="100%" cellspacing="0" cellpadding="2">
67
68 <tbody>
69 <tal:block tal:repeat="item results">
70 <tr tal:define="oddrow repeat/item/odd"
71 tal:attributes="class python:test(oddrow, 'even', 'odd')" >
72
73 <td width="50%">
74 <a tal:condition="python: item.isPrincipiaFolderish and item<>here"
75 tal:attributes="href string: ${item/absolute_url}/${template/getId}"
76 tal:content="item/title_or_id">Title</a>
77
78 <b tal:condition="python: not item.isPrincipiaFolderish or item==here"
79 tal:content="item/title_or_id">Title</b>
80
81 <a tal:condition="python: item.getTypeInfo().getId()=='Image'"
82 tal:attributes="href string:#;
83 onclick string: window.open('${item/absolute_url}','${item/getId}','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=${item/width},height=${item/height}');; ;">
84 <img tal:define="max python: 32;"
85 tal:attributes="src item/absolute_url;
86 height python: test(item.height < max, item.height, max);" />
87 </a>
88 </td>
89
90 <td width="25%"
91 i18n:translate=""
92 tal:content="python:item.getTypeInfo().Title()">Metatype</td>
93
94 <td width="25%" tal:define="url item/absolute_url;">
95 <a tal:attributes="href string: #;
96 onclick string: window.opener.CreateLink('${url}');; window.close();; ;"
97 i18n:translate="epoz_insert_link">Insert Link</a>
98 <div tal:condition="python: item.getTypeInfo().getId()=='Image'">
99 <a tal:attributes="href string: #;
100 onclick string: window.opener.CreateImage('${url}');; window.close();; ;"
101 i18n:translate="epoz_insert_image">Insert Image</a>
102 </div>
103 </td>
104 </tr>
105 </tal:block>
106 </tbody>
107 </table>
108 </tal:block>
109 </tal:block>
110 </body>
111 </html>