1 | <html xmlns="http://www.w3.org/1999/xhtml" |
---|
2 | xml:lang="en" |
---|
3 | lang="en" |
---|
4 | i18n:domain="qploneskindump" |
---|
5 | metal:use-macro="here/prefs_main_template/macros/master"> |
---|
6 | <body> |
---|
7 | <div metal:fill-slot="prefs_configlet_main"> |
---|
8 | |
---|
9 | <div metal:define-macro="main" |
---|
10 | tal:define="errors options/state/getErrors | nothing;"> |
---|
11 | |
---|
12 | <div metal:use-macro="here/global_statusmessage/macros/portal_message"> |
---|
13 | Portal status message |
---|
14 | </div> |
---|
15 | |
---|
16 | <h1 class="documentFirstHeading" |
---|
17 | i18n:translate="heading_addremove_products">Skin Dump</h1> |
---|
18 | |
---|
19 | <a href="" |
---|
20 | class="link-parent" |
---|
21 | tal:attributes="href string: $portal_url/plone_control_panel" |
---|
22 | i18n:translate="label_up_to_plone_setup"> |
---|
23 | Up to Site Setup |
---|
24 | </a> |
---|
25 | |
---|
26 | <p class="documentDescription" |
---|
27 | i18n:translate="description_addremove_products"> |
---|
28 | This is a form for dumping your zmi skin to filesystem based product. |
---|
29 | </p> |
---|
30 | |
---|
31 | <p class="discreet" i18n:translate="description_product_location"> |
---|
32 | Navigate through all form tabs to set needed configuration for dump. |
---|
33 | </p> |
---|
34 | |
---|
35 | <form name="edit_form" |
---|
36 | action="href" |
---|
37 | method="post" |
---|
38 | class="enableFormTabbing" |
---|
39 | enctype="multipart/form-data" |
---|
40 | tal:attributes="action string:$here_url/$template_id"> |
---|
41 | |
---|
42 | <fieldset id="fieldset-product" |
---|
43 | tal:define="error_fsSkinDir python:errors.get('FSSkinDirectory'); |
---|
44 | error_fsProdName python:errors.get('FSProductName'); |
---|
45 | error_fsDestinationDir python:errors.get('FSDestinationDirectory');"> |
---|
46 | <legend id="fieldsetlegend-product"> |
---|
47 | <label style="font-size: 110%" i18n:translate="label_product">Product</label> |
---|
48 | </legend> |
---|
49 | <p /> |
---|
50 | <div class="FSProductName" |
---|
51 | tal:attributes="class python: test(error_fsProdName, 'FSProductName error', 'FSProductName');"> |
---|
52 | <label class="FSProductName_title" |
---|
53 | i18n:translate="label_FSProductName">Product name</label> |
---|
54 | <span class="fieldRequired" |
---|
55 | title="Required" |
---|
56 | i18n:translate="label_required" |
---|
57 | i18n:attributes="title title_required;">(Required)</span> |
---|
58 | <div i18n:translate="help_FSProductName" |
---|
59 | class="formHelp"> |
---|
60 | Name for dumped product. This name should be unique in Destination directory. The name must begin with alphabetical character, following with an alphanumeric combination, also underscore accepts, but not on boundaries. |
---|
61 | </div> |
---|
62 | <div tal:condition="error_fsProdName" |
---|
63 | tal:content="error_fsProdName" i18n:translate="">Validation Error</div> |
---|
64 | |
---|
65 | <input class="FSProductName_input" |
---|
66 | type="text" |
---|
67 | name="FSProductName" |
---|
68 | value="qPloneSkinTemplate" |
---|
69 | size="50" |
---|
70 | tal:attributes="value request/FSProductName|nothing" /> |
---|
71 | </div> |
---|
72 | <p /> |
---|
73 | <div class="FSSkinDirectory" |
---|
74 | tal:attributes="class python: test(error_fsSkinDir, 'FSSkinDirectory error', 'FSSkinDirectory');"> |
---|
75 | <label class="FSSkinDirectory_title" |
---|
76 | i18n:translate="label_FSSkinDirectory">Skin name</label> |
---|
77 | <span class="fieldRequired" |
---|
78 | title="Required" |
---|
79 | i18n:translate="label_required" |
---|
80 | i18n:attributes="title title_required;">(Required)</span> |
---|
81 | <div i18n:translate="help_FSSkinDirectory" |
---|
82 | class="formHelp"> |
---|
83 | Skin name in dumped product. The name must begin with alphabetical character, following with an alphanumeric combination, also underscore accepts, but not on boundaries. |
---|
84 | </div> |
---|
85 | <div tal:condition="error_fsSkinDir" |
---|
86 | tal:content="error_fsSkinDir" i18n:translate="">Validation Error</div> |
---|
87 | |
---|
88 | <input class="FSSkinDirectory_input" |
---|
89 | type="text" |
---|
90 | name="FSSkinDirectory" |
---|
91 | value="" |
---|
92 | size="50" |
---|
93 | tal:attributes="value request/FSSkinDirectory|nothing" /> |
---|
94 | </div> |
---|
95 | <p /> |
---|
96 | <div class="FSDestinationDirectory" |
---|
97 | tal:define="destinationDir python:modules['Products.qPloneSkinDump.qPloneSkinDump'].getProductsPath();" |
---|
98 | tal:attributes="class python: test(error_fsDestinationDir, 'FSDestinationDirectory error', 'FSDestinationDirectory');"> |
---|
99 | <label class="FSDestinationDirectory_title" |
---|
100 | i18n:translate="label_FSDestinationDirectory">Destination directory</label> |
---|
101 | <span class="fieldRequired" |
---|
102 | title="Required" |
---|
103 | i18n:translate="label_required" |
---|
104 | i18n:attributes="title title_required;">(Required)</span> |
---|
105 | <div i18n:translate="help_FSDestinationDirectory" |
---|
106 | class="formHelp"> |
---|
107 | Absolute path to directory, where SkinProduct will be created. |
---|
108 | </div> |
---|
109 | <div tal:condition="error_fsDestinationDir" |
---|
110 | tal:content="error_fsDestinationDir" i18n:translate="">Validation Error</div> |
---|
111 | |
---|
112 | <input class="FSDestinationDirectory_input" |
---|
113 | type="text" |
---|
114 | name="FSDestinationDirectory" |
---|
115 | value="" |
---|
116 | size="50" |
---|
117 | tal:attributes="value request/FSDestinationDirectory|destinationDir" /> |
---|
118 | </div> |
---|
119 | </fieldset> |
---|
120 | |
---|
121 | <fieldset id="fieldset-zmi" |
---|
122 | tal:define="error_zmiSN python:errors.get('ZMISkinName'); |
---|
123 | error_zmiBSN python:errors.get('ZMIBaseSkinName')"> |
---|
124 | <legend id="fieldsetlegend-zmi"> |
---|
125 | <label style="font-size: 110%" i18n:translate="legend_ZMI">Skin</label> |
---|
126 | </legend> |
---|
127 | <p /> |
---|
128 | <div class="ZMIBaseSkinName" |
---|
129 | tal:attributes="class python: test(error_zmiBSN, 'ZMIBaseSkinName error', 'ZMIBaseSkinName');"> |
---|
130 | <!-- base for building layers list --> |
---|
131 | <label class="ZMIBaseSkinName_title" |
---|
132 | i18n:translate="label_ZMIBaseSkinName">Skin selection</label> |
---|
133 | <span class="fieldRequired" |
---|
134 | title="Required" |
---|
135 | i18n:translate="label_required" |
---|
136 | i18n:attributes="title title_required;">(Required)</span> |
---|
137 | <div i18n:translate="help_ZMIBaseSkinName" |
---|
138 | class="formHelp"> |
---|
139 | Select skin selection from portal_skins, which layers list will be used for creating new skin. |
---|
140 | </div> |
---|
141 | <div tal:condition="error_zmiBSN" |
---|
142 | tal:content="error_zmiBSN" i18n:translate="">Validation Error</div> |
---|
143 | |
---|
144 | <select tal:define="value request/ZMIBaseSkinName|string:Plone Tableless; |
---|
145 | skin_names portal/portal_skins/getSkinSelections" |
---|
146 | tal:attributes="name string:ZMIBaseSkinName; |
---|
147 | id string:ZMIBaseSkinName; |
---|
148 | size string:1; |
---|
149 | tabindex tabindex/next;"> |
---|
150 | <option selected="" |
---|
151 | value="#" |
---|
152 | tal:repeat="skin_name skin_names" |
---|
153 | tal:attributes="value nocall:skin_name; |
---|
154 | selected python:test(skin_name==value, 'selected', None);" |
---|
155 | tal:content="skin_name"/> |
---|
156 | </select> |
---|
157 | </div> |
---|
158 | <p /> |
---|
159 | <div class="ZMISkinName" |
---|
160 | tal:attributes="class python: test(error_zmiSN, 'ZMISkinName error', 'ZMISkinName');"> |
---|
161 | <!-- folder in ZMI .../portal_skins, from which will be copyed content --> |
---|
162 | <label class="ZMISkinName_title" |
---|
163 | i18n:translate="label_ZMISkinName">Skin folders</label> |
---|
164 | <span class="fieldRequired" |
---|
165 | title="Required" |
---|
166 | i18n:translate="label_required" |
---|
167 | i18n:attributes="title title_required;">(Required)</span> |
---|
168 | <div i18n:translate="help_ZMISkinName" |
---|
169 | class="formHelp"> |
---|
170 | Select folders from portal_skins, which should be dumped to FS product's skins folder. |
---|
171 | </div> |
---|
172 | <div tal:condition="error_zmiSN" |
---|
173 | tal:content="error_zmiSN" i18n:translate="">Validation Error</div> |
---|
174 | |
---|
175 | <select class="ZMISkinName_input" id="ZMISkinName" |
---|
176 | size="5" name="ZMISkinName" multiple="1" |
---|
177 | tal:define="value request/ZMISkinName|string:custom; |
---|
178 | p_skins_ids python:portal.portal_skins.objectIds(spec='Folder')" |
---|
179 | tal:attributes="tabindex tabindex/next;"> |
---|
180 | <option selected="" |
---|
181 | value="#" |
---|
182 | tal:repeat="ps_folder p_skins_ids" |
---|
183 | tal:attributes="value nocall:ps_folder; |
---|
184 | selected python:test(ps_folder==value, 'selected', None);" |
---|
185 | tal:content="ps_folder"/> |
---|
186 | </select> |
---|
187 | </div> |
---|
188 | <p /> |
---|
189 | <div class="EraseFromSkin"> |
---|
190 | <!-- erase content of folder in ZMI .../portal_skins after copying --> |
---|
191 | <input class="EraseFromSkin_input" |
---|
192 | type="checkbox" |
---|
193 | name="EraseFromSkin" |
---|
194 | id="EraseFromSkin" |
---|
195 | value="0" |
---|
196 | tal:attributes="checked python:test(request.has_key('EraseFromSkin'), 'checked', nothing)" |
---|
197 | /> |
---|
198 | <label class="EraseFromSkin_title" for="EraseFromSkin" |
---|
199 | i18n:translate="label_Erase">Erase folders from portal_skins after dump</label> |
---|
200 | </div> |
---|
201 | </fieldset> |
---|
202 | |
---|
203 | <fieldset id="fieldset-portlets"> |
---|
204 | <legend id="fieldsetlegend-portlets" class="DoesCustomizeSlots"> |
---|
205 | <label style="font-size: 110%" i18n:translate="label_portlets">Portlets</label> |
---|
206 | </legend> |
---|
207 | <p /> |
---|
208 | <div class="customize-portlets"> |
---|
209 | <input class="noborder" |
---|
210 | type="checkbox" |
---|
211 | name="dump_portlets" |
---|
212 | id="DoesCustomizeSlots" |
---|
213 | value="0" |
---|
214 | tal:attributes="checked request/dump_portlets|nothing" /> |
---|
215 | <label for="DoesCustomizeSlots" |
---|
216 | i18n:translate="label_dump_portlets">Dump Portlets</label> |
---|
217 | </div> |
---|
218 | <p/> |
---|
219 | <div class="SlotsCustomizing"> |
---|
220 | <label class="SlotsCustomizing_title" |
---|
221 | i18n:translate="label_dump_policy">Dump Policy</label> |
---|
222 | |
---|
223 | <div i18n:translate="help_SlotsCustomizing" |
---|
224 | class="formHelp"> |
---|
225 | |
---|
226 | </div> |
---|
227 | |
---|
228 | <input class="noborder" |
---|
229 | type="radio" |
---|
230 | name="dump_policy" |
---|
231 | value="root" |
---|
232 | id="root_dump_policy" |
---|
233 | onclick="javascript:document.getElementById('selection_widget').style.display='none';" |
---|
234 | tal:attributes="checked python:request.get('dump_policy', 'root') == 'root';" /> |
---|
235 | <label for="root_dump_policy" |
---|
236 | i18n:translate="label_root_dump_policy"> |
---|
237 | Dump portlets only for portal root |
---|
238 | </label> |
---|
239 | <br /> |
---|
240 | |
---|
241 | <input class="noborder" |
---|
242 | type="radio" |
---|
243 | name="dump_policy" |
---|
244 | value="all" |
---|
245 | id="all_dump_policy" |
---|
246 | onclick="javascript:document.getElementById('selection_widget').style.display='none';" |
---|
247 | tal:attributes="checked python:request.get('dump_policy', 'root') == 'all';" /> |
---|
248 | <label for="all_dump_policy" |
---|
249 | i18n:translate="label_all_dump_policy"> |
---|
250 | Dump portlets for the whole site content |
---|
251 | </label> |
---|
252 | <br /> |
---|
253 | |
---|
254 | <input class="noborder" |
---|
255 | type="radio" |
---|
256 | name="dump_policy" |
---|
257 | value="selection" |
---|
258 | id="selection_dump_policy" |
---|
259 | onclick="javascript:document.getElementById('selection_widget').style.display='';" |
---|
260 | tal:attributes="checked python:request.get('dump_policy', 'root') == 'selection';" /> |
---|
261 | <label for="selection_dump_policy" |
---|
262 | i18n:translate="label_selection_dump_policy"> |
---|
263 | Dump portlets only for selected content objects |
---|
264 | </label> |
---|
265 | <div id="selection_widget" style="display:none;" |
---|
266 | tal:define="friendly_types here/@@plone_portal_state/friendly_types; |
---|
267 | options python:here.portal_catalog(portal_types=friendly_types)"> |
---|
268 | <select name="dump_objects" multiple="1" size="7"> |
---|
269 | <option value="root_path" |
---|
270 | tal:content="string:[portal root]" |
---|
271 | tal:attributes="value string:" /> |
---|
272 | <tal:options repeat="option options"> |
---|
273 | <option value="object_path" |
---|
274 | tal:define="ppath python:'/'.join(option.getPath().split('/')[2:])" |
---|
275 | tal:content="ppath" |
---|
276 | tal:attributes="value ppath" /> |
---|
277 | </tal:options> |
---|
278 | </select> |
---|
279 | </div> |
---|
280 | </div> |
---|
281 | </fieldset> |
---|
282 | |
---|
283 | <fieldset id="fieldset-zexp" |
---|
284 | tal:define="exp_data python:modules['Products.qPloneSkinDump.qPloneSkinDump'].getExportingData(here);"> |
---|
285 | <legend id="fieldsetlegend-zexp" class="DoesExportObjects"> |
---|
286 | <label style="font-size: 110%" i18n:translate="label_portlets">Objects Export</label> |
---|
287 | </legend> |
---|
288 | <p /> |
---|
289 | <div class="objects-export"> |
---|
290 | <input class="noborder" |
---|
291 | type="checkbox" |
---|
292 | name="DoesExportObjects" |
---|
293 | id="DoesExportObjects" |
---|
294 | value="DoesExportObjects" |
---|
295 | tal:attributes="checked python:test(request.has_key('DoesExportObjects'), 'checked', nothing)" /> |
---|
296 | <label for="DoesExportObjects" |
---|
297 | style="font-size: 110%" |
---|
298 | i18n:translate="label_DoesExportObjects">Dump Objects</label> |
---|
299 | <div class="formHelp" |
---|
300 | i18n:translate="help_DoesExportObjects"> |
---|
301 | Selected below objects will be exported to New Skin Product. Then on installation generated Skin Product |
---|
302 | they will be imported to portal root, based on choosed policy. |
---|
303 | </div> |
---|
304 | </div> |
---|
305 | <p/> |
---|
306 | <div class="ImportPolicy" |
---|
307 | tal:define="value python:request.get('import_policy', exp_data['default_import_policy'])"> |
---|
308 | <label i18n:translate="label_ImportPolicy">Import Policy</label> |
---|
309 | <div i18n:translate="help_ImportPolicy" |
---|
310 | class="formHelp"> |
---|
311 | Choose *Import policy* for generated Skin Product. *Import policy* define behavior in case |
---|
312 | of meeting same id object in portal root with imported one. "only_new" - imported |
---|
313 | objects with ids, identical to portal root objects ids Not imported. |
---|
314 | "backup" - for portal root objects with same ids creates back_[date] directory and |
---|
315 | they moved there. All imported objects - importing to portal root. |
---|
316 | "overwrite" - all objects in portal root with same id overwrited with imported one. |
---|
317 | </div> |
---|
318 | <tal:loop tal:omit-tag="" |
---|
319 | tal:repeat="i_policy_value exp_data/import_policy_list/keys"> |
---|
320 | <div tal:define="i_policy_name python:exp_data['import_policy_list'][i_policy_value];"> |
---|
321 | <input type="radio" |
---|
322 | name="import_policy" |
---|
323 | value="#" |
---|
324 | tal:attributes="value i_policy_value; |
---|
325 | checked python:test(i_policy_value==value, 'checked', nothing)" /> |
---|
326 | <label class="default_import_policy" |
---|
327 | i18n:translate="" |
---|
328 | tal:content="i_policy_name"></label> |
---|
329 | </div> |
---|
330 | </tal:loop> |
---|
331 | </div> |
---|
332 | <p/> |
---|
333 | <div class="ExportingOjects"> |
---|
334 | <label class="ExportingOjects_title" |
---|
335 | i18n:translate="label_ExportingOjects">Exporting objects</label> |
---|
336 | <div i18n:translate="help_ExportingOjects" |
---|
337 | class="formHelp"> |
---|
338 | Exporting object ids list. All selected objects will be exported to "<Skin Product>/import" |
---|
339 | directory and WILL BE IMPORTED to portal root on SkinProduct installation. |
---|
340 | </div> |
---|
341 | <select multiple="multiple" |
---|
342 | tal:define="value request/exporting_objects|python:[]" |
---|
343 | tal:condition="exp_data/export_object_id_list" |
---|
344 | tal:attributes="name string:exporting_objects:list; |
---|
345 | id string:ExportingOjects_list; |
---|
346 | size string:6; |
---|
347 | tabindex tabindex/next;"> |
---|
348 | <option selected="" |
---|
349 | value="#" |
---|
350 | tal:repeat="item exp_data/export_object_id_list" |
---|
351 | tal:attributes="value nocall:item; |
---|
352 | selected python:test(item in value, 'selected', None);" |
---|
353 | tal:content="item"/> |
---|
354 | |
---|
355 | </select> |
---|
356 | </div> |
---|
357 | </fieldset> |
---|
358 | |
---|
359 | <fieldset id="fieldset-resources" |
---|
360 | tal:define="isFirst python:not request.get('dump_registries', None); |
---|
361 | checked_css python:test(isFirst, 'checked', test(request.has_key('DumpCSSRegistry'), 'checked', None)); |
---|
362 | checked_js python:test(isFirst, 'checked', test(request.has_key('DumpJSRegistry'), 'checked', None));"> |
---|
363 | <legend id="fieldsetlegend-resources" class="DoesExportResources"> |
---|
364 | <label for="DoesExportResources" |
---|
365 | style="font-size: 110%" |
---|
366 | i18n:translate="label_DoesExportResources">Resources</label> |
---|
367 | </legend> |
---|
368 | <p /> |
---|
369 | <div class="formHelp" |
---|
370 | i18n:translate="help_DoesExportResources"> |
---|
371 | Checked Portal Resources with current property sets will be exported from corresponding portal registries to New Skin Product. |
---|
372 | Then on generated Skin Product installation, appropriate portal registry will be made identical to yours. This guarantee look and |
---|
373 | behavior of generated Skin Product in desired way. You can make corrections of exported resources in config.py module of New |
---|
374 | Skin Product. This feature work only when generated Skin Product install on Plone v2.1+. |
---|
375 | </div> |
---|
376 | <input type="hidden" name="dump_registries" value="1" /> |
---|
377 | <p/> |
---|
378 | <div class="DumpCSSRegistry"> |
---|
379 | <!-- Dump portal_CSS registry resources --> |
---|
380 | <input class="DumpCSSRegistry_input" |
---|
381 | type="checkbox" |
---|
382 | name="DumpCSSRegistry" |
---|
383 | id="DumpCSSRegistry" |
---|
384 | value="0" |
---|
385 | tal:attributes="checked checked_css" |
---|
386 | /> |
---|
387 | <label class="DumpCSSRegistry_title" for="DumpCSSRegistry" |
---|
388 | i18n:translate="label_DumpCSSRegistry">Dump portal_css registry.</label> |
---|
389 | </div> |
---|
390 | <p/> |
---|
391 | <div class="DumpJSRegistry"> |
---|
392 | <!-- Dump portal_javascripts registry resources --> |
---|
393 | <input class="DumpJSRegistry_input" |
---|
394 | type="checkbox" |
---|
395 | name="DumpJSRegistry" |
---|
396 | id="DumpJSRegistry" |
---|
397 | value="0" |
---|
398 | tal:attributes="checked checked_js" |
---|
399 | /> |
---|
400 | <label class="DumpJSRegistry_title" for="DumpJSRegistry" |
---|
401 | i18n:translate="label_DumpJSRegistry">Dump portal_javascripts registry.</label> |
---|
402 | </div> |
---|
403 | <p/> |
---|
404 | </fieldset> |
---|
405 | |
---|
406 | <!-- dump views --> |
---|
407 | <fieldset id="fieldset-views" |
---|
408 | tal:define="error_zmiSN python:errors.get('ZMISkinName'); |
---|
409 | error_zmiBSN python:errors.get('ZMIBaseSkinName')"> |
---|
410 | <legend id="fieldsetlegend-views"> |
---|
411 | <label style="font-size: 110%" i18n:translate="legend_viewlets">Views</label> |
---|
412 | </legend> |
---|
413 | <p /> |
---|
414 | <div class="dump-viewlets-field"> |
---|
415 | <div i18n:translate="help_dumpviewlets" |
---|
416 | class="formHelp"> |
---|
417 | Check this field for dumping all customized objects in portal_view_customization tool. |
---|
418 | </div> |
---|
419 | |
---|
420 | <input class="dumpviewlets-input" |
---|
421 | type="checkbox" |
---|
422 | name="dump_viewlets" |
---|
423 | id="dump_viewlets" |
---|
424 | value="1" |
---|
425 | tal:attributes="checked python:test(request.has_key('dump_viewlets'), 'checked', nothing)" |
---|
426 | /> |
---|
427 | <label class="dumpviewlets-title" for="dump_viewlets" |
---|
428 | i18n:translate="label_dumpviewlets">Dump views, viewlets and portlets</label> |
---|
429 | </div> |
---|
430 | </fieldset> |
---|
431 | |
---|
432 | <!-- fields for Controller Page Template --> |
---|
433 | <input type="hidden" name="form.submitted" value="1" /> |
---|
434 | <div class="submitButton"> |
---|
435 | <div class="field"> |
---|
436 | <input class="context" |
---|
437 | type="submit" |
---|
438 | name="form.button.form_submit" |
---|
439 | value="Generate" |
---|
440 | i18n:attributes="value"/> |
---|
441 | </div> |
---|
442 | </div> |
---|
443 | </form> |
---|
444 | |
---|
445 | </div> |
---|
446 | |
---|
447 | </div> |
---|
448 | </body> |
---|
449 | </html> |
---|