source: products/quintagroup.referencedatagridfield/branches/plone4/quintagroup/referencedatagridfield/browser/datagridref_popup.pt @ 2318

Last change on this file since 2318 was 2318, checked in by mylan, 14 years ago

Remove order_idx from the additional parmeters - it will be calulated with jQuery

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