Commit 8112d991 authored by Aurel's avatar Aurel

make instalation of multiple business template more user friendly


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5623 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0c4c2d64
......@@ -84,7 +84,7 @@ bt_objects = {}\n
\n
for bt_id in bt_id_list:\n
bt = context.portal_templates[bt_id]\n
bt_objects[bt.getId()] = getModifiedObjectList(bt)\n
bt_objects[bt.getId()] = [bt.getTitle(), getModifiedObjectList(bt)]\n
\n
object_list = []\n
no_backup_list = [\'Action\', \'SiteProperty\', \'Module\', \'Document\', \'PropertySheet\', \'Extension\', \'Test\', \'Product\', \n
......@@ -92,7 +92,8 @@ no_backup_list = [\'Action\', \'SiteProperty\', \'Module\', \'Document\', \'Prop
\'PortalTypeAllowedContentType\', \'PortalTypeHiddenContentType\', \'PortalTypePropertySheet\', \'PortalTypeBaseCategory\']\n
\n
for bt in bt_objects.keys():\n
modified_object_list = bt_objects[bt] \n
modified_object_list = bt_objects[bt][1] \n
bt_title = bt_objects[bt][0]\n
keys = modified_object_list.keys()\n
keys.sort()\n
i = 0\n
......@@ -101,17 +102,17 @@ for bt in bt_objects.keys():\n
object_id = bt+\'|\'+object_id\n
line = newTempBase(context, \'tmp_install_%s\' %(str(i)))\n
if object_state == \'New\':\n
line.edit(object_id=object_id, object_state=object_state, object_class=object_class, choice_item_list=[[\'Install\', \'install\'], [\'Do Nothing\', \'nothing\']])\n
line.edit(object_id=object_id, bt_title = bt_title, object_state=object_state, object_class=object_class, choice_item_list=[[\'Install\', \'install\'], [\'Do Nothing\', \'nothing\']])\n
elif object_state == \'Modified\':\n
if object_class in no_backup_list:\n
line.edit(object_id=object_id, object_state=object_state, object_class=object_class, choice_item_list=[[\'Upgrade\', \'install\'], [\'Keep Original\', \'nothing\']])\n
line.edit(object_id=object_id, bt_title = bt_title, object_state=object_state, object_class=object_class, choice_item_list=[[\'Upgrade\', \'install\'], [\'Keep Original\', \'nothing\']])\n
else:\n
line.edit(object_id=object_id, object_state=object_state, object_class=object_class, choice_item_list=[[\'Backup And Upgrade\', \'backup\'], [\'Upgrade\', \'install\'], [\'Keep Original\', \'nothing\']])\n
line.edit(object_id=object_id, bt_title = bt_title, object_state=object_state, object_class=object_class, choice_item_list=[[\'Backup And Upgrade\', \'backup\'], [\'Upgrade\', \'install\'], [\'Keep Original\', \'nothing\']])\n
elif object_state == \'Removed\':\n
if object_class in no_backup_list:\n
line.edit(object_id=object_id, object_state=object_state, object_class=object_class, choice_item_list=[[\'Remove\', \'remove\'], [\'Keep Original\', \'nothing\']])\n
line.edit(object_id=object_id, bt_title = bt_title, object_state=object_state, object_class=object_class, choice_item_list=[[\'Remove\', \'remove\'], [\'Keep Original\', \'nothing\']])\n
else:\n
line.edit(object_id=object_id, object_state=object_state, object_class=object_class, choice_item_list=[[\'Backup And Remove\', \'save_and_remove\'], [\'Remove\', \'remove\'], [\'Keep Original\', \'nothing\']])\n
line.edit(object_id=object_id, bt_title = bt_title, object_state=object_state, object_class=object_class, choice_item_list=[[\'Backup And Remove\', \'save_and_remove\'], [\'Remove\', \'remove\'], [\'Keep Original\', \'nothing\']])\n
line.setUid(\'new_%s\' % object_id)\n
object_list.append(line)\n
i += 1 \n
......@@ -191,6 +192,7 @@ return object_list\n
<string>object_list</string>
<string>no_backup_list</string>
<string>modified_object_list</string>
<string>bt_title</string>
<string>keys</string>
<string>i</string>
<string>object_id</string>
......
......@@ -98,6 +98,7 @@
<value>
<list>
<string>listbox_choice</string>
<string>listbox_object_id</string>
</list>
</value>
</item>
......@@ -105,7 +106,7 @@
<key> <string>left</string> </key>
<value>
<list>
<string>listbox_object_id</string>
<string>your_form_title</string>
</list>
</value>
</item>
......
......@@ -345,6 +345,10 @@
<string>object_class</string>
<string>Class</string>
</tuple>
<tuple>
<string>bt_title</string>
<string>BT Title</string>
</tuple>
<tuple>
<string>object_state</string>
<string>State</string>
......@@ -515,6 +519,10 @@
</tuple>
<tuple>
<string>object_class</string>
<string></string>
</tuple>
<tuple>
<string>bt_title</string>
<string></string>
</tuple>
<tuple>
......
2006-02-08 aurel
* modify TemplateTool_viewMultiInstallationDialog and TemplateTool_getModifiedObjectList
2006-02-03 aurel
* modify Base_getWorkflowHistoryItemList
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment