1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html |
---|
2 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
---|
3 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
---|
4 | i18n:domain="atreferencebrowserwidget"> |
---|
5 | <head> |
---|
6 | </head> |
---|
7 | <body |
---|
8 | class="popup atrefbrowser" |
---|
9 | id="atrefbrowserpopup" |
---|
10 | style="font-size: 150% !important" |
---|
11 | tal:define="fieldName view/fieldName; |
---|
12 | fieldTitleName view/fieldTitleName; |
---|
13 | fieldLinkName view/fieldLinkName; |
---|
14 | order_idx view/order_idx; |
---|
15 | multiValued view/multiValued; |
---|
16 | fieldRealName view/fieldRealName; |
---|
17 | at_obj nocall:view/at_obj; |
---|
18 | widget nocall:view/widget; |
---|
19 | title python:widget.Label(at_obj); |
---|
20 | search_index view/search_index; |
---|
21 | search_text view/search_text; |
---|
22 | available_indexes widget/available_indexes; |
---|
23 | allow_browse widget/allow_browse; |
---|
24 | image_portal_types widget/image_portal_types; |
---|
25 | image_method widget/image_method|string:; |
---|
26 | "> |
---|
27 | |
---|
28 | <dl id="message" class="portalMessage info" |
---|
29 | style="display:none; margin-top:0;"> |
---|
30 | <dt i18n:translate="referencebrowser_text_added_reference" |
---|
31 | >Added</dt> |
---|
32 | <dd id="messageTitle"></dd> |
---|
33 | </dl> |
---|
34 | |
---|
35 | <!-- Search form --> |
---|
36 | <form action="search" method="post" name="search" id="search" |
---|
37 | style="text-align: right" |
---|
38 | tal:condition="widget/allow_search" |
---|
39 | tal:attributes="action request/getURL"> |
---|
40 | |
---|
41 | <div class="field" > |
---|
42 | <tal:indexes condition="widget/show_indexes"> |
---|
43 | <label i18n:translate="referencebrowser_search_index_label"> |
---|
44 | Search index |
---|
45 | </label> |
---|
46 | <select name="search_index" id="indexSelector"> |
---|
47 | <tal:indexes tal:repeat="index view/filtered_indexes"> |
---|
48 | <option value="" selected="" |
---|
49 | tal:attributes=" |
---|
50 | value index; |
---|
51 | selected python:index==search_index and 'selected' or ''" |
---|
52 | tal:content="python:available_indexes[index]" |
---|
53 | tal:condition="python:available_indexes.has_key(index)" |
---|
54 | /> |
---|
55 | |
---|
56 | <option value="" selected="" |
---|
57 | tal:attributes=" |
---|
58 | value index; |
---|
59 | selected python:index==search_index and 'selected' or ''" |
---|
60 | tal:content="index" |
---|
61 | tal:condition="python:not available_indexes.has_key(index)" |
---|
62 | /> |
---|
63 | </tal:indexes> |
---|
64 | </select> |
---|
65 | </tal:indexes> |
---|
66 | |
---|
67 | <input type="text" |
---|
68 | id="searchGadget" |
---|
69 | name="searchValue" |
---|
70 | size="25" |
---|
71 | title="Search Site" |
---|
72 | class="inputLabel" |
---|
73 | value="" |
---|
74 | tal:attributes="value search_text;" |
---|
75 | /> |
---|
76 | <input class="searchButton" |
---|
77 | type="submit" |
---|
78 | name="submit" |
---|
79 | value="Search" |
---|
80 | i18n:domain="plone" |
---|
81 | i18n:attributes="value label_search;" |
---|
82 | /> |
---|
83 | </div> |
---|
84 | <!-- add these to make sure that after a search result, we still have |
---|
85 | these paremeters --> |
---|
86 | <input type="hidden" name="fieldName" value="" |
---|
87 | tal:attributes="value fieldName" /> |
---|
88 | <input type="hidden" name="fieldTitleName" |
---|
89 | tal:attributes="value fieldTitleName" /> |
---|
90 | <input type="hidden" name="fieldLinkName" |
---|
91 | tal:attributes="value fieldLinkName" /> |
---|
92 | <input type="hidden" name="order_idx" |
---|
93 | tal:attributes="value order_idx" /> |
---|
94 | <input type="hidden" name="fieldRealName" value="" |
---|
95 | tal:attributes="value fieldRealName" /> |
---|
96 | <input type="hidden" name="at_url" value="" |
---|
97 | tal:attributes="value view/at_url" /> |
---|
98 | <input type="hidden" name="multiValued" value="" |
---|
99 | tal:attributes="value multiValued" /> |
---|
100 | <input type="hidden" name="close_window" value="" |
---|
101 | tal:attributes="value view/close_window" /> |
---|
102 | </form> |
---|
103 | <!-- actual list of objects, either searchresults or folder contents --> |
---|
104 | <tal:block tal:define="batch view/getResult;"> |
---|
105 | |
---|
106 | <!-- history --> |
---|
107 | <div tal:condition="python:widget.history_length > 0" style="float: right; clear: right;"> |
---|
108 | <form action="referencebrowser_popup" name="history" id="history"> |
---|
109 | <label for="path" |
---|
110 | i18n:translate="referencebrowser_history">History</label> |
---|
111 | <select name="path"> |
---|
112 | </select> |
---|
113 | <noscript> |
---|
114 | <input class="context" type="button" value="Go" name="go" |
---|
115 | i18n:attributes="value label_go" /> |
---|
116 | </noscript> |
---|
117 | </form> |
---|
118 | </div> |
---|
119 | |
---|
120 | <!-- breadcrumbs --> |
---|
121 | <div tal:condition= "python:search_text=='' and allow_browse" |
---|
122 | tal:define="isRTL here/@@plone_portal_state/is_rtl;" |
---|
123 | style="margin-bottom: 1em"> |
---|
124 | |
---|
125 | You are here: |
---|
126 | <tal:crumbs tal:repeat=" |
---|
127 | crumb python:view.breadcrumbs(widget.startup_directory)"> |
---|
128 | |
---|
129 | <a class="browsesite" |
---|
130 | tal:attributes="href crumb/absolute_url; |
---|
131 | rel crumb/Title"> |
---|
132 | <span tal:content="string:${crumb/Title}"> |
---|
133 | Breadcrumb Title |
---|
134 | </span> |
---|
135 | </a> |
---|
136 | |
---|
137 | <span tal:condition="not: repeat/crumb/end" |
---|
138 | class="breadcrumbSeparator"> |
---|
139 | <tal:ltr condition="not: isRTL">→</tal:ltr> |
---|
140 | <tal:rtl condition="isRTL">←</tal:rtl> |
---|
141 | </span> |
---|
142 | |
---|
143 | </tal:crumbs> |
---|
144 | |
---|
145 | </div> |
---|
146 | |
---|
147 | <!-- object list --> |
---|
148 | <p tal:condition="not:view/has_queryresults" |
---|
149 | i18n:translate="referencebrowser_no_items_found">No items found.</p> |
---|
150 | |
---|
151 | <table class="group" width="100%" cellspacing="0" cellpadding="2" |
---|
152 | tal:condition="batch"> |
---|
153 | <tbody> |
---|
154 | <tal:results tal:repeat="item batch"> |
---|
155 | <tal:row |
---|
156 | tal:define=" |
---|
157 | uid python:view.getUid(item); |
---|
158 | isNotSelf python:view.isNotSelf(item); |
---|
159 | referenceable python:view.isReferencable(item); |
---|
160 | title_or_id item/sortable_title|item/Title|item/getId; |
---|
161 | color view/discreetColor;"> |
---|
162 | |
---|
163 | <tr tal:define="oddrow repeat/item/odd" |
---|
164 | tal:attributes="class python:oddrow and 'even' or 'odd'"> |
---|
165 | |
---|
166 | <td> |
---|
167 | <tal:referenceable tal:condition="referenceable"> |
---|
168 | <input type="checkbox" class="insertreference" tal:attributes="rel uid" /> |
---|
169 | </tal:referenceable> |
---|
170 | </td> |
---|
171 | |
---|
172 | <td tal:condition="image_portal_types"> |
---|
173 | <img tal:condition="python: item.Type in image_portal_types" |
---|
174 | tal:attributes="src string:${item/getURL}/$image_method" |
---|
175 | /> |
---|
176 | </td> |
---|
177 | <td> |
---|
178 | <img src="#" |
---|
179 | tal:attributes="src string:${here/portal_url}/${item/getIcon};alt title_or_id" /> |
---|
180 | <a class="browsesite" tal:condition="python: item.is_folderish and allow_browse" |
---|
181 | tal:attributes=" |
---|
182 | href python:view.genRefBrowserUrl(item.getURL()); |
---|
183 | rel item/Title"> |
---|
184 | <strong tal:condition="referenceable" |
---|
185 | tal:content="title_or_id">Title</strong> |
---|
186 | <span tal:condition="not:referenceable" tal:content="title_or_id" /> |
---|
187 | </a> |
---|
188 | <tal:foldercheck tal:condition=" |
---|
189 | python:not((item.is_folderish and allow_browse) and isNotSelf)" > |
---|
190 | <strong tal:condition="referenceable" |
---|
191 | tal:content="title_or_id">Title |
---|
192 | </strong> |
---|
193 | <span tal:condition="not:referenceable" tal:content="title_or_id" /> |
---|
194 | </tal:foldercheck> |
---|
195 | |
---|
196 | <div tal:condition="widget/show_review_state"> |
---|
197 | <span tal:define="state item/review_state" |
---|
198 | tal:attributes="class string:state-$state" |
---|
199 | i18n:translate="" i18n:domain="plone" |
---|
200 | tal:content="state" |
---|
201 | /> |
---|
202 | </div> |
---|
203 | |
---|
204 | <div class="additionalInfo" |
---|
205 | tal:content=" |
---|
206 | structure item/additionalReferenceInfo | nothing" |
---|
207 | /> |
---|
208 | </td> |
---|
209 | </tr> |
---|
210 | </tal:row> |
---|
211 | </tal:results> |
---|
212 | </tbody> |
---|
213 | </table> |
---|
214 | |
---|
215 | <tal:var tal:define="template_id view/__name__"> |
---|
216 | <div metal:use-macro="here/batch_macros/macros/navigation" /> |
---|
217 | </tal:var> |
---|
218 | |
---|
219 | </tal:block> |
---|
220 | </body> |
---|
221 | </html> |
---|