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 | <h1 class="QSDFirstHeading"> |
---|
12 | <img tal:replace="structure here/product_icon.gif" /> |
---|
13 | <span tal:replace="here/title_or_id">Title or id</span> |
---|
14 | </h1> |
---|
15 | |
---|
16 | <div metal:use-macro="here/document_actions/macros/document_actions"> |
---|
17 | Document actions (print, sendto etc) |
---|
18 | </div> |
---|
19 | |
---|
20 | <a href="" |
---|
21 | class="link-parent" |
---|
22 | i18n:translate="label_up_to_product_page" |
---|
23 | tal:define="parent_url python:here.navigationParent(here, template.getId())" |
---|
24 | tal:condition="parent_url" |
---|
25 | tal:attributes="href parent_url"> |
---|
26 | Up to Product page |
---|
27 | </a> |
---|
28 | |
---|
29 | <h2 i18n:translate="heading_portalactions_lists"> |
---|
30 | qPloneSkinDump input FORM |
---|
31 | </h2> |
---|
32 | <form name="edit_form" |
---|
33 | action="href" |
---|
34 | method="post" |
---|
35 | enctype="multipart/form-data" |
---|
36 | tal:attributes="action string:$here_url/$template_id"> |
---|
37 | <fieldset tal:define="error_zmiSN python:errors.get('ZMISkinName'); |
---|
38 | error_zmiBSN python:errors.get('ZMIBaseSkinName')"> |
---|
39 | <legend> |
---|
40 | <label style="font-size: 110%" i18n:translate="legend_ZMI"> ZMI:</label> |
---|
41 | </legend> |
---|
42 | <div class="ZMISkinName" |
---|
43 | tal:attributes="class python: test(error_zmiSN, 'ZMISkinName error', 'ZMISkinName');"> |
---|
44 | <!-- folder in ZMI .../portal_skins, from which will be copyed content --> |
---|
45 | <label class="ZMISkinName_title" |
---|
46 | i18n:translate="label_ZMISkinName">Source ZMI skin folder</label> |
---|
47 | <span class="fieldRequired" |
---|
48 | title="Required" |
---|
49 | i18n:translate="label_required" |
---|
50 | i18n:attributes="title title_required;"> |
---|
51 | (Required) |
---|
52 | </span> |
---|
53 | <div i18n:translate="help_ZMISkinName" |
---|
54 | class="formHelp"> |
---|
55 | Select folder from portal_skins, which content should by copyed to FS product. |
---|
56 | </div> |
---|
57 | <div tal:condition="error_zmiSN" |
---|
58 | tal:content="error_zmiSN" i18n:translate="">Validation Error</div> |
---|
59 | |
---|
60 | <select class="ZMISkinName_input" id="ZMISkinName" |
---|
61 | size="1" name="ZMISkinName" |
---|
62 | tal:define="value request/ZMISkinName|string:custom; |
---|
63 | p_skins_ids python:portal.portal_skins.objectIds(spec='Folder')" |
---|
64 | tal:attributes="value value; |
---|
65 | tabindex tabindex/next;"> |
---|
66 | <option selected="" |
---|
67 | value="#" |
---|
68 | tal:repeat="ps_folder p_skins_ids" |
---|
69 | tal:attributes="value nocall:ps_folder; |
---|
70 | selected python:test(ps_folder==value, 'selected', None);" |
---|
71 | tal:content="ps_folder"/> |
---|
72 | |
---|
73 | </select> |
---|
74 | </div> |
---|
75 | <p/> |
---|
76 | <div class="ZMIBaseSkinName" |
---|
77 | tal:attributes="class python: test(error_zmiBSN, 'ZMIBaseSkinName error', 'ZMIBaseSkinName');"> |
---|
78 | <!-- base for building layers list --> |
---|
79 | <label class="ZMIBaseSkinName_title" |
---|
80 | i18n:translate="label_ZMIBaseSkinName">ZMI base skin name</label> |
---|
81 | <span class="fieldRequired" |
---|
82 | title="Required" |
---|
83 | i18n:translate="label_required" |
---|
84 | i18n:attributes="title title_required;"> |
---|
85 | (Required) |
---|
86 | </span> |
---|
87 | <div i18n:translate="help_ZMIBaseSkinName" |
---|
88 | class="formHelp"> |
---|
89 | Select Skin name, which layers list will be used for creating new skin. |
---|
90 | </div> |
---|
91 | <div tal:condition="error_zmiBSN" |
---|
92 | tal:content="error_zmiBSN" i18n:translate="">Validation Error</div> |
---|
93 | |
---|
94 | <select tal:define="value request/ZMIBaseSkinName|string:Plone Tableless; |
---|
95 | skin_names portal/portal_skins/getSkinSelections" |
---|
96 | tal:attributes="value value; |
---|
97 | name string:ZMIBaseSkinName; |
---|
98 | id string:ZMIBaseSkinName; |
---|
99 | size string:1; |
---|
100 | tabindex tabindex/next;"> |
---|
101 | <option selected="" |
---|
102 | value="#" |
---|
103 | tal:repeat="skin_name skin_names" |
---|
104 | tal:attributes="value nocall:skin_name; |
---|
105 | selected python:test(skin_name==value, 'selected', None);" |
---|
106 | tal:content="skin_name"/> |
---|
107 | |
---|
108 | </select> |
---|
109 | </div> |
---|
110 | <p/> |
---|
111 | <div class="EraseFromSkin"> |
---|
112 | <!-- erase content of folder in ZMI .../portal_skins after copying --> |
---|
113 | <div i18n:translate="help_Erase" |
---|
114 | class="formHelp"> |
---|
115 | Select for erase content of skin's source folder. |
---|
116 | </div> |
---|
117 | |
---|
118 | <input class="EraseFromSkin_input" |
---|
119 | type="checkbox" |
---|
120 | name="EraseFromSkin" |
---|
121 | value="0" |
---|
122 | tal:attributes="checked python:test(request.has_key('EraseFromSkin'), 'checked', nothing)" |
---|
123 | /> |
---|
124 | <label class="EraseFromSkin_title" |
---|
125 | i18n:translate="label_Erace">Erase </label> |
---|
126 | </div> |
---|
127 | <p/> |
---|
128 | <!--Next is checkbox to select generating main_template.pt |
---|
129 | <div class="GenerateTemplate" |
---|
130 | tal:define="isAvailable python:modules['Products.qPloneSkinDump.generatingTemplate'].available(here)"> |
---|
131 | <div i18n:translate="help_Generate" |
---|
132 | class="formHelp"> |
---|
133 | Select next for generating "main_template.pt" from qMultipleSlots plone site properties. |
---|
134 | <p tal:condition="not:isAvailable"> |
---|
135 | <b>Not available! qMultipleSlots product isn't installed.</b> |
---|
136 | </p> |
---|
137 | </div> |
---|
138 | |
---|
139 | <input class="GenerateTemplate_input" |
---|
140 | type="checkbox" |
---|
141 | name="GenerateTemplate" |
---|
142 | value="0" |
---|
143 | tal:attributes="checked python:request.get('GenerateTemplate', isAvailable and 'checked'); |
---|
144 | disabled python:test(isAvailable, nothing, 'disabled')"/> |
---|
145 | |
---|
146 | <label class="GenerateTemplate_title" |
---|
147 | i18n:translate="label_Generate">Generate</label> |
---|
148 | </div> |
---|
149 | --> |
---|
150 | |
---|
151 | <a href="" |
---|
152 | tal:attributes="href string:${portal_url}/qploneskindump_generate" |
---|
153 | tal:condition="python:modules['Products.qPloneSkinDump.generatingTemplate'].available(here)"> |
---|
154 | Want to generate main template? |
---|
155 | </a> |
---|
156 | </fieldset> |
---|
157 | |
---|
158 | <fieldset tal:define="error_fsSkinDir python:errors.get('FSSkinDirectory'); |
---|
159 | error_fsProdName python:errors.get('FSProductName')"> |
---|
160 | <legend> |
---|
161 | <label style="font-size: 110%" i18n:translate="label_FS"> File system:</label> |
---|
162 | </legend> |
---|
163 | <div class="FSSkinDirectory" |
---|
164 | tal:attributes="class python: test(error_fsSkinDir, 'FSSkinDirectory error', 'FSSkinDirectory');"> |
---|
165 | <label class="FSSkinDirectory_title" |
---|
166 | i18n:translate="label_FSSkinDirectory">Skin's name for new product</label> |
---|
167 | <span class="fieldRequired" |
---|
168 | title="Required" |
---|
169 | i18n:translate="label_required" |
---|
170 | i18n:attributes="title title_required;"> |
---|
171 | (Required) |
---|
172 | </span> |
---|
173 | <div i18n:translate="help_FSSkinDirectory" |
---|
174 | class="formHelp"> |
---|
175 | Input skin's name for new prodct. <br/> |
---|
176 | This name in lower case will be used as skin's folder name and as layer name too.<br/> |
---|
177 | The name must begin with alphabetical character, following with an alphanumeric combination, also underscore accepts, but not on boundaries.<br/> |
---|
178 | </div> |
---|
179 | <div tal:condition="error_fsSkinDir" |
---|
180 | tal:content="error_fsSkinDir" i18n:translate="">Validation Error</div> |
---|
181 | |
---|
182 | <input class="FSSkinDirectory_input" |
---|
183 | type="text" |
---|
184 | name="FSSkinDirectory" |
---|
185 | value="" |
---|
186 | size="50" |
---|
187 | tal:attributes="value request/FSSkinDirectory|nothing" /> |
---|
188 | </div> |
---|
189 | <p/> |
---|
190 | <div class="FSProductName" |
---|
191 | tal:attributes="class python: test(error_fsProdName, 'FSProductName error', 'FSProductName');"> |
---|
192 | <label class="FSProductName_title" |
---|
193 | i18n:translate="label_FSProductName">Product name</label> |
---|
194 | <span class="fieldRequired" |
---|
195 | title="Required" |
---|
196 | i18n:translate="label_required" |
---|
197 | i18n:attributes="title title_required;"> |
---|
198 | (Required) |
---|
199 | </span> |
---|
200 | <div i18n:translate="help_FSProductName" |
---|
201 | class="formHelp"> |
---|
202 | Input name of new product. <br/> |
---|
203 | This name can't be identical with other, presenting in your Products directory of Plone's instance. <br/> |
---|
204 | The name must begin with alphabetical character, following with an alphanumeric combination, also underscore accepts, but not on boundaries. |
---|
205 | </div> |
---|
206 | <div tal:condition="error_fsProdName" |
---|
207 | tal:content="error_fsProdName" i18n:translate="">Validation Error</div> |
---|
208 | |
---|
209 | <input class="FSProductName_input" |
---|
210 | type="text" |
---|
211 | name="FSProductName" |
---|
212 | value="qPloneSkinTemplate" |
---|
213 | size="50" |
---|
214 | tal:attributes="value request/FSProductName|nothing" /> |
---|
215 | </div> |
---|
216 | </fieldset> |
---|
217 | |
---|
218 | <fieldset> |
---|
219 | <legend class="DoesCustomizeSlots"> |
---|
220 | <input class="noborder" |
---|
221 | type="checkbox" |
---|
222 | name="DoesCustomizeSlots" |
---|
223 | id="DoesCustomizeSlots" |
---|
224 | value="DOCustomizeSlots" |
---|
225 | tal:attributes="checked python:test(request.has_key('DoesCustomizeSlots'),'checked', nothing)"/> |
---|
226 | <label for="DoesCustomizeSlots" |
---|
227 | style="font-size: 110%" |
---|
228 | i18n:translate="label_Slots">Customize portal slots in new product</label> |
---|
229 | </legend> |
---|
230 | <div class="formHelp" |
---|
231 | i18n:translate="help_DoesCustomizeSlots"> |
---|
232 | Customization portal slots in New Skin Product. |
---|
233 | </div> |
---|
234 | |
---|
235 | <p/> |
---|
236 | <div class="SlotsCustomizing"> |
---|
237 | <label class="SlotsCustomizing_title" |
---|
238 | i18n:translate="label_SlotsCustomizing">Portal slots</label> |
---|
239 | |
---|
240 | <div i18n:translate="help_SlotsCustomizing" |
---|
241 | class="formHelp"> |
---|
242 | BE VERY ACCURACY! |
---|
243 | Leave in the left and right slot lists only those portlets, which relate <br/> |
---|
244 | to your skin product and either bring with new product or is standard for Plone. |
---|
245 | </div> |
---|
246 | <div class="LeftSlotsCustomizing_title"> |
---|
247 | <label class="LeftSlotsCustomizing_title" |
---|
248 | i18n:translate="label_LeftsSlotCustomizing">Left portal slots customizing</label> |
---|
249 | <textarea class="LeftSlotsCustomizing_lines" |
---|
250 | rows="6" |
---|
251 | cols="35" |
---|
252 | name="left_slots:lines" |
---|
253 | value="" |
---|
254 | tal:define="value python:'\n'.join(request.get('left_slots', portal.left_slots))" |
---|
255 | tal:attributes="value value" |
---|
256 | tal:content="value" ></textarea> |
---|
257 | </div> |
---|
258 | <p/> |
---|
259 | <div class="RightSlotsCustomizing_title"> |
---|
260 | <label class="RightSlotsCustomizing_title" |
---|
261 | i18n:translate="label_RightSlotsCustomizing">Right portal slots customizing</label> |
---|
262 | <textarea class="RightSlotsCustomizing_lines" |
---|
263 | rows="6" |
---|
264 | cols="35" |
---|
265 | name="right_slots:lines" |
---|
266 | value="" |
---|
267 | tal:define="value python:'\n'.join(request.get('right_slots', portal.right_slots))" |
---|
268 | tal:attributes="value value" |
---|
269 | tal:content="value"></textarea> |
---|
270 | </div> |
---|
271 | |
---|
272 | </div> |
---|
273 | <p/> |
---|
274 | <div class="ColumnSlotsForming" |
---|
275 | tal:define="formers python:modules['Products.qPloneSkinDump.qPloneSkinDump'].getSlotsFormingList(); |
---|
276 | value request/slot_forming|formers/default"> |
---|
277 | <label i18n:translate="label_ColumnSlotsForming">Slot's list forming</label> |
---|
278 | <div i18n:translate="help_ColumnSlotsForming" |
---|
279 | class="formHelp"> |
---|
280 | Choose procedure of forming slots lists.<br/> |
---|
281 | Blend with skin - to SKIN PRODUCT's slots list added unknown slots from SITE.<br/> |
---|
282 | Blend with site - to SITE's slots list added unknown slots from SKIN PRODUCT.<br/> |
---|
283 | Replace - in left and right site's columns placed ONLY SKIN PRODUCT's slots. |
---|
284 | </div> |
---|
285 | <tal:loop tal:omit-tag="" |
---|
286 | tal:repeat="former formers/data"> |
---|
287 | <div> |
---|
288 | <input type="radio" |
---|
289 | name="slot_forming" |
---|
290 | value="#" |
---|
291 | tal:attributes="value python:former[0]; |
---|
292 | checked python:test(former[0]==value,'checked', nothing)" /> |
---|
293 | <label class="ColumnSlotsForming_title" |
---|
294 | i18n:translate="" |
---|
295 | tal:content="python:former[1]"></label> |
---|
296 | </div> |
---|
297 | </tal:loop> |
---|
298 | </div> |
---|
299 | <p/> |
---|
300 | <div class="FavourColumn" |
---|
301 | tal:define="favour_columns python:modules['Products.qPloneSkinDump.qPloneSkinDump'].getMainColumnList(); |
---|
302 | value request/main_column|favour_columns/default"> |
---|
303 | <label i18n:translate="label_FavourColumn">Main column</label> |
---|
304 | <div i18n:translate="help_FavourColumn" |
---|
305 | class="formHelp"> |
---|
306 | Choose favour column for slots forming procedure. IMPORTANT only for 'Blend with...' formers.<br/> |
---|
307 | Left/Right - if find same slots in left and right columns - than slots move accordingly to left/right column.<br/> |
---|
308 | Both - if find same slots in left and right columns - than slots positionings as in Master's slots lists |
---|
309 | (from SKIN PRODUCT's slots for 'Blend with skin' procedure and SITE's slots for 'Blend with site'). |
---|
310 | </div> |
---|
311 | <tal:loop tal:omit-tag="" |
---|
312 | tal:repeat="favour favour_columns/data"> |
---|
313 | <div> |
---|
314 | <input type="radio" |
---|
315 | name="main_column" |
---|
316 | value="#" |
---|
317 | tal:attributes="value python:favour[0]; |
---|
318 | checked python:test(favour[0]==value,'checked', nothing)" /> |
---|
319 | <label class="FavourColumn_title" |
---|
320 | i18n:translate="" |
---|
321 | tal:content="python:favour[1]"></label> |
---|
322 | </div> |
---|
323 | </tal:loop> |
---|
324 | </div> |
---|
325 | |
---|
326 | </fieldset> |
---|
327 | |
---|
328 | <fieldset tal:define="exp_data python:modules['Products.qPloneSkinDump.qPloneSkinDump'].getExportingData(here);"> |
---|
329 | <legend class="DoesExportObjects"> |
---|
330 | <input class="noborder" |
---|
331 | type="checkbox" |
---|
332 | name="DoesExportObjects" |
---|
333 | id="DoesExportObjects" |
---|
334 | value="DoesExportObjects" |
---|
335 | tal:attributes="checked python:test(request.has_key('DoesExportObjects'), 'checked', nothing)" /> |
---|
336 | <label for="DoesExportObjects" |
---|
337 | style="font-size: 110%" |
---|
338 | i18n:translate="label_DoesExportObjects">Exporting objects from portal root</label> |
---|
339 | </legend> |
---|
340 | <div class="formHelp" |
---|
341 | i18n:translate="help_DoesExportObjects"> |
---|
342 | Selected below objects will be exported to New Skin Product. Then on installation generated Skin Product |
---|
343 | they will be imported to portal root, based on choosed policy. |
---|
344 | </div> |
---|
345 | |
---|
346 | <p/> |
---|
347 | <div class="ImportPolicy" |
---|
348 | tal:define="value python:request.get('import_policy', exp_data['default_import_policy'])"> |
---|
349 | <label i18n:translate="label_ImportPolicy">Import Policy</label> |
---|
350 | <div i18n:translate="help_ImportPolicy" |
---|
351 | class="formHelp"> |
---|
352 | Choose *Import policy* for generated Skin Product. *Import policy* define behavior in case |
---|
353 | of meeting same id object in portal root with imported one. "only_new" - imported |
---|
354 | objects with ids, identical to portal root objects ids Not imported. |
---|
355 | "backup" - for portal root objects with same ids creates back_[date] directory and |
---|
356 | they moved there. All imported objects - importing to portal root. |
---|
357 | "overwrite" - all objects in portal root with same id overwrited with imported one. |
---|
358 | </div> |
---|
359 | <tal:loop tal:omit-tag="" |
---|
360 | tal:repeat="i_policy_value exp_data/import_policy_list/keys"> |
---|
361 | <div tal:define="i_policy_name python:exp_data['import_policy_list'][i_policy_value];"> |
---|
362 | <input type="radio" |
---|
363 | name="import_policy" |
---|
364 | value="#" |
---|
365 | tal:attributes="value i_policy_value; |
---|
366 | checked python:test(i_policy_value==value, 'checked', nothing)" /> |
---|
367 | <label class="default_import_policy" |
---|
368 | i18n:translate="" |
---|
369 | tal:content="i_policy_name"></label> |
---|
370 | </div> |
---|
371 | </tal:loop> |
---|
372 | </div> |
---|
373 | <p/> |
---|
374 | <div class="ExportingOjects"> |
---|
375 | <label class="ExportingOjects_title" |
---|
376 | i18n:translate="label_ExportingOjects">Exporting objects</label> |
---|
377 | <div i18n:translate="help_ExportingOjects" |
---|
378 | class="formHelp"> |
---|
379 | Exporting object ids list. All selected objects will be exported to "<Skin Product>/import" |
---|
380 | directory and WILL BE IMPORTED to portal root on SkinProduct installation. |
---|
381 | </div> |
---|
382 | <select multiple="multiple" |
---|
383 | tal:define="value request/exporting_objects|python:[]" |
---|
384 | tal:condition="exp_data/export_object_id_list" |
---|
385 | tal:attributes="name string:exporting_objects:list; |
---|
386 | id string:ExportingOjects_list; |
---|
387 | size string:6; |
---|
388 | tabindex tabindex/next;"> |
---|
389 | <option selected="" |
---|
390 | value="#" |
---|
391 | tal:repeat="item exp_data/export_object_id_list" |
---|
392 | tal:attributes="value nocall:item; |
---|
393 | selected python:test(item in value, 'selected', None);" |
---|
394 | tal:content="item"/> |
---|
395 | |
---|
396 | </select> |
---|
397 | </div> |
---|
398 | </fieldset> |
---|
399 | |
---|
400 | <fieldset tal:define="isFirst python:not request.get('dump_registries', None); |
---|
401 | checked_css python:test(isFirst, 'checked', test(request.has_key('DumpCSSRegistry'), 'checked', nothing)); |
---|
402 | checked_js python:test(isFirst, 'checked', test(request.has_key('DumpJSRegistry'), 'checked', nothing));"> |
---|
403 | <legend class="DoesExportResources"> |
---|
404 | <label for="DoesExportResources" |
---|
405 | style="font-size: 110%" |
---|
406 | i18n:translate="label_DoesExportResources">Exporting portal resources</label> |
---|
407 | </legend> |
---|
408 | <div class="formHelp" |
---|
409 | i18n:translate="help_DoesExportResources"> |
---|
410 | Checked Portal Resources with current property sets will be exported from corresponding portal registries to New Skin Product. |
---|
411 | Then on generated Skin Product installation, appropriate portal registry will be made identical to yours. This guarantee look and |
---|
412 | behavior of generated Skin Product in desired way. You can make corrections of exported resources in config.py module of New |
---|
413 | Skin Product. This feature work only when generated Skin Product install on Plone v2.1+. |
---|
414 | </div> |
---|
415 | <input type="hidden" name="dump_registries" value="1" /> |
---|
416 | <p/> |
---|
417 | <div class="DumpCSSRegistry"> |
---|
418 | <!-- Dump portal_CSS registry resources --> |
---|
419 | <input class="DumpCSSRegistry_input" |
---|
420 | type="checkbox" |
---|
421 | name="DumpCSSRegistry" |
---|
422 | value="0" |
---|
423 | tal:attributes="checked checked_css" |
---|
424 | /> |
---|
425 | <label class="DumpCSSRegistry_title" |
---|
426 | i18n:translate="label_DumpCSSRegistry">Dump portal_css registry.</label> |
---|
427 | </div> |
---|
428 | <p/> |
---|
429 | <div class="DumpJSRegistry"> |
---|
430 | <!-- Dump portal_javascripts registry resources --> |
---|
431 | <input class="DumpJSRegistry_input" |
---|
432 | type="checkbox" |
---|
433 | name="DumpJSRegistry" |
---|
434 | value="0" |
---|
435 | tal:attributes="checked checked_js" |
---|
436 | /> |
---|
437 | <label class="DumpJSRegistry_title" |
---|
438 | i18n:translate="label_DumpJSRegistry">Dump portal_javascripts registry.</label> |
---|
439 | </div> |
---|
440 | <p/> |
---|
441 | </fieldset> |
---|
442 | |
---|
443 | <!-- fields for Controller Page Template --> |
---|
444 | <input type="hidden" name="form.submitted" value="1" /> |
---|
445 | <div class="submitButton"> |
---|
446 | <div class="field"> |
---|
447 | <input class="context" |
---|
448 | type="submit" |
---|
449 | name="form.button.form_submit" |
---|
450 | value="Generate" |
---|
451 | i18n:attributes="value"/> |
---|
452 | </div> |
---|
453 | </div> |
---|
454 | </form> |
---|
455 | |
---|
456 | </div> |
---|
457 | |
---|
458 | </div> |
---|
459 | </body> |
---|
460 | </html> |
---|