1 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" |
---|
2 | lang="en" |
---|
3 | metal:use-macro="here/prefs_main_template/macros/master" |
---|
4 | i18n:domain="plone"> |
---|
5 | |
---|
6 | <metal:block fill-slot="top_slot" |
---|
7 | tal:define="dummy python:request.set('disable_border',1)" /> |
---|
8 | |
---|
9 | <body> |
---|
10 | |
---|
11 | <div metal:fill-slot="prefs_configlet_main" |
---|
12 | tal:define="errors python:request.get('errors', {}); |
---|
13 | props python:here.portal_properties;"> |
---|
14 | |
---|
15 | <div class="configlet"> |
---|
16 | |
---|
17 | <div class="documentEditable"> |
---|
18 | |
---|
19 | <!-- simulating views on the topics pages until we have real objects. --> |
---|
20 | <ul class="contentViews" |
---|
21 | i18n:domain="atcontenttypes"> |
---|
22 | <li class="selected"> |
---|
23 | <a href="" |
---|
24 | tal:attributes="href string:${here/absolute_url}/${template/id}" |
---|
25 | i18n:translate="label_topic_indexes">Smart Folder Indexes</a> |
---|
26 | </li> |
---|
27 | <li class=""> |
---|
28 | <a href="" |
---|
29 | tal:attributes="href string:${here/absolute_url}/atct_manageTopicMetadata" |
---|
30 | i18n:translate="label_topic_metadata">Smart Folder Metadata</a> |
---|
31 | </li> |
---|
32 | </ul> |
---|
33 | |
---|
34 | <div class="contentActions"> |
---|
35 | |
---|
36 | </div> |
---|
37 | |
---|
38 | <!-- End of tabs --> |
---|
39 | |
---|
40 | <div class="documentContent"> |
---|
41 | |
---|
42 | <h1 i18n:domain="atcontenttypes" |
---|
43 | i18n:translate="heading_smart_folder_settings"> |
---|
44 | Smart Folder Settings |
---|
45 | </h1> |
---|
46 | |
---|
47 | <a href="" |
---|
48 | class="link-parent" |
---|
49 | tal:attributes="href string:$portal_url/plone_control_panel" |
---|
50 | i18n:translate="label_up_to_plone_setup"> |
---|
51 | Up to Site Setup |
---|
52 | </a> |
---|
53 | |
---|
54 | <p i18n:domain="atcontenttypes" |
---|
55 | i18n:translate="description_configure_indices"> |
---|
56 | Configure which indices will be displayed while creating criteria |
---|
57 | for Smart Folders, and how they will be displayed. |
---|
58 | </p> |
---|
59 | |
---|
60 | <form method="post" |
---|
61 | name="manageTopicIndex" |
---|
62 | i18n:domain="atcontenttypes" |
---|
63 | tal:define="errors options/state/getErrors; |
---|
64 | atct_tool here/portal_atct; |
---|
65 | all_types atct_tool/getAllPortalTypes; |
---|
66 | allowed_types python:atct_tool.getAllowedPortalTypes(populate_for_end_usage=0); |
---|
67 | allowed_ids python:[a[0] for a in allowed_types]; |
---|
68 | catalog python:request.get('catalog','portal_catalog')" |
---|
69 | tal:attributes="action python:here.absolute_url()+'/'+template.id"> |
---|
70 | |
---|
71 | <input type="hidden" name="sub" value="1" /> |
---|
72 | |
---|
73 | <tal:indices tal:define="enabledOnly python:request.get('showEnabledOnly',True); |
---|
74 | indexes python:atct_tool.getIndexes(enabledOnly=enabledOnly, catalog_name=catalog); |
---|
75 | metadata python:atct_tool.getAllMetadata(enabledOnly=enabledOnly, catalog_name=catalog)"> |
---|
76 | |
---|
77 | <h3 i18n:translate="heading_indices_fields_for_searching"> |
---|
78 | Indices (fields for searching) |
---|
79 | </h3> |
---|
80 | |
---|
81 | <select name="catalog"> |
---|
82 | <option tal:repeat="c here/archetype_tool/getCatalogsInSite" |
---|
83 | tal:attributes="value c; |
---|
84 | selected python:c == catalog" |
---|
85 | tal:content="c"/> |
---|
86 | |
---|
87 | </select> |
---|
88 | |
---|
89 | <input class="context" |
---|
90 | tabindex="" |
---|
91 | type="submit" |
---|
92 | name="form.button.Go" |
---|
93 | value="Go" |
---|
94 | i18n:domain="plone" |
---|
95 | i18n:attributes="value label_go" |
---|
96 | tal:attributes="tabindex tabindex/next;"/> |
---|
97 | |
---|
98 | <div style="text-align:right"> |
---|
99 | <a href="" |
---|
100 | i18n:translate="atct_show_enabled_fields" |
---|
101 | tal:condition="not:enabledOnly" |
---|
102 | tal:attributes="href python:here.absolute_url() +'/'+ template.id + '?showEnabledOnly:int=1&catalog='+catalog"> |
---|
103 | Enabled fields only |
---|
104 | </a> |
---|
105 | <a href="" |
---|
106 | i18n:translate="atct_show_all_fields" |
---|
107 | tal:condition="enabledOnly" |
---|
108 | tal:attributes="href python:here.absolute_url() +'/'+ template.id + '?showEnabledOnly:int=0&catalog='+catalog"> |
---|
109 | All fields |
---|
110 | </a> |
---|
111 | </div> |
---|
112 | |
---|
113 | <table class="listing" border="0" cellpadding="0" cellspacing="0" style="" |
---|
114 | tal:define="bgcolor string:background-color:${here/base_properties/evenRowBackgroundColor}; |
---|
115 | border_color here/base_properties/globalBorderColor" |
---|
116 | tal:attributes="style string:border:1px solid ${border_color}" |
---|
117 | summary="Indices configuration" i18n:attributes="summary summary_indices_configuration;"> |
---|
118 | <thead> |
---|
119 | <tr> |
---|
120 | <th i18n:translate="listingheader_catalog_index">Catalog index</th> |
---|
121 | <th i18n:translate="listingheader_enable">Enable</th> |
---|
122 | <th i18n:translate="listingheader_friendly_name">Friendly name</th> |
---|
123 | <th i18n:translate="listingheader_explanation">Explanation</th> |
---|
124 | </tr> |
---|
125 | </thead> |
---|
126 | <tbody> |
---|
127 | <tal:metadata tal:repeat="index indexes"> |
---|
128 | <tal:object tal:define="indexObj python:atct_tool.getIndex(index,catalog); |
---|
129 | oddrow repeat/index/odd;"> |
---|
130 | |
---|
131 | <tr class="" tal:attributes="class python:test(oddrow, 'even', 'odd')"> |
---|
132 | <td> |
---|
133 | <span tal:content="indexObj/index" i18n:translate="" i18n:domain="plone"/> |
---|
134 | <input type="hidden" |
---|
135 | value="" |
---|
136 | name="" |
---|
137 | id="" |
---|
138 | tal:attributes="id indexObj/index; |
---|
139 | name string:index.index:records; |
---|
140 | value indexObj/index"/> |
---|
141 | </td> |
---|
142 | <td> |
---|
143 | <input type="checkbox" |
---|
144 | value="" |
---|
145 | name="" |
---|
146 | id="" |
---|
147 | tal:attributes="name string:index.enabled:records; |
---|
148 | value python:test(indexObj.enabled, '1', '0'); |
---|
149 | id string:${indexObj/index}_enabled; |
---|
150 | tabindex tabindex/next; |
---|
151 | checked python:test(indexObj.enabled, 'checked', None)"/> |
---|
152 | </td> |
---|
153 | <td> |
---|
154 | <input type="text" |
---|
155 | value="" |
---|
156 | name="" |
---|
157 | id="" |
---|
158 | size="10" |
---|
159 | tal:attributes="name string:index.friendlyName:records; |
---|
160 | id string:${indexObj/index}_friendlyName; |
---|
161 | value indexObj/friendlyName; |
---|
162 | tabindex tabindex/next;" |
---|
163 | i18n:attributes="value" |
---|
164 | i18n:domain="plone"/> |
---|
165 | </td> |
---|
166 | <td> |
---|
167 | <span i18n:translate="label_allowed_criteria"> |
---|
168 | Allowed Criteria: |
---|
169 | </span> |
---|
170 | <br /> |
---|
171 | <select multiple="multiple" |
---|
172 | value="" |
---|
173 | name="index.criteria:records:list" |
---|
174 | id="" |
---|
175 | size="3" |
---|
176 | width="100%" |
---|
177 | tal:attributes="id string:${indexObj/index}_criteria; |
---|
178 | tabindex tabindex/next;"> |
---|
179 | <option tal:repeat="criterion python:atct_tool.getCriteriaForIndex(indexObj.index, as_dict= True, catalog_name=catalog)" |
---|
180 | tal:attributes="value criterion/name; |
---|
181 | selected python:test(criterion['name'] in indexObj.criteria, 'selected', None);" |
---|
182 | tal:content="criterion/description" |
---|
183 | i18n:translate="" |
---|
184 | i18n:domain="plone"/> |
---|
185 | </select> |
---|
186 | <br/> |
---|
187 | <span i18n:translate="label_help_text"> |
---|
188 | Help Text: |
---|
189 | </span> |
---|
190 | <textarea cols="50" rows="2" type="text" |
---|
191 | value="" |
---|
192 | name="index.description:records" |
---|
193 | id="" |
---|
194 | tal:attributes="id string:${indexObj/index}_description; |
---|
195 | tabindex tabindex/next;" |
---|
196 | tal:content="indexObj/description" |
---|
197 | i18n:translate="" |
---|
198 | i18n:domain="plone"></textarea> |
---|
199 | </td> |
---|
200 | |
---|
201 | </tr> |
---|
202 | |
---|
203 | </tal:object> |
---|
204 | </tal:metadata> |
---|
205 | </tbody> |
---|
206 | </table> |
---|
207 | <input class="context" |
---|
208 | tabindex="" |
---|
209 | type="submit" |
---|
210 | name="form.button.index_save" |
---|
211 | value="Save" |
---|
212 | i18n:domain="plone" |
---|
213 | i18n:attributes="value label_save;" |
---|
214 | tal:attributes="tabindex tabindex/next;" |
---|
215 | /> |
---|
216 | <input type="hidden" name="form.submitted" value="1" /> |
---|
217 | </tal:indices> |
---|
218 | |
---|
219 | </form> |
---|
220 | </div> |
---|
221 | </div> |
---|
222 | </div> |
---|
223 | </div> |
---|
224 | </body> |
---|
225 | </html> |
---|