[Erp5-report] r15509 - in /erp5/trunk/bt5/erp5_consulting/SkinTemplateItem/portal_skins/erp...
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Aug 6 23:32:27 CEST 2007
Author: jp
Date: Mon Aug 6 23:32:27 2007
New Revision: 15509
URL: http://svn.erp5.org?rev=15509&view=rev
Log:
Removed Feature forms
Removed:
erp5/trunk/bt5/erp5_consulting/SkinTemplateItem/portal_skins/erp5_consulting/FeatureDocument_view/
erp5/trunk/bt5/erp5_consulting/SkinTemplateItem/portal_skins/erp5_consulting/FeatureModule_viewFeatureList/
erp5/trunk/bt5/erp5_consulting/SkinTemplateItem/portal_skins/erp5_consulting/Feature_addDocumentFastInput/
erp5/trunk/bt5/erp5_consulting/SkinTemplateItem/portal_skins/erp5_consulting/Feature_addFeaturesFastInput/
erp5/trunk/bt5/erp5_consulting/SkinTemplateItem/portal_skins/erp5_consulting/Feature_generateFeatures.xml
erp5/trunk/bt5/erp5_consulting/SkinTemplateItem/portal_skins/erp5_consulting/Feature_view/
Removed: erp5/trunk/bt5/erp5_consulting/SkinTemplateItem/portal_skins/erp5_consulting/Feature_generateFeatures.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_consulting/SkinTemplateItem/portal_skins/erp5_consulting/Feature_generateFeatures.xml?rev=15508&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_consulting/SkinTemplateItem/portal_skins/erp5_consulting/Feature_generateFeatures.xml (original)
+++ erp5/trunk/bt5/erp5_consulting/SkinTemplateItem/portal_skins/erp5_consulting/Feature_generateFeatures.xml (removed)
@@ -1,261 +1,0 @@
-<?xml version="1.0"?>
-<ZopeData>
- <record id="1" aka="AAAAAAAAAAE=">
- <pickle>
- <tuple>
- <tuple>
- <string>Products.PythonScripts.PythonScript</string>
- <string>PythonScript</string>
- </tuple>
- <none/>
- </tuple>
- </pickle>
- <pickle>
- <dictionary>
- <item>
- <key> <string>Python_magic</string> </key>
- <value>
- <none/>
- </value>
- </item>
- <item>
- <key> <string>Script_magic</string> </key>
- <value> <int>3</int> </value>
- </item>
- <item>
- <key> <string>__ac_local_roles__</string> </key>
- <value>
- <none/>
- </value>
- </item>
- <item>
- <key> <string>_bind_names</string> </key>
- <value>
- <object>
- <klass>
- <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
- </klass>
- <tuple/>
- <state>
- <dictionary>
- <item>
- <key> <string>_asgns</string> </key>
- <value>
- <dictionary>
- <item>
- <key> <string>name_container</string> </key>
- <value> <string>container</string> </value>
- </item>
- <item>
- <key> <string>name_context</string> </key>
- <value> <string>context</string> </value>
- </item>
- <item>
- <key> <string>name_m_self</string> </key>
- <value> <string>script</string> </value>
- </item>
- <item>
- <key> <string>name_subpath</string> </key>
- <value> <string>traverse_subpath</string> </value>
- </item>
- </dictionary>
- </value>
- </item>
- </dictionary>
- </state>
- </object>
- </value>
- </item>
- <item>
- <key> <string>_body</string> </key>
- <value> <string>context_obj = context.getObject()\n
-\n
-feature_module_type = \'Feature Module\'\n
-feature_document_type = \'Feature Document\'\n
-feature_type = \'Feature\'\n
-\n
-if context_obj.getPortalType() == feature_module_type:\n
- # we are in a module, so create a feature document\n
- feature_doc = context_obj.newContent( portal_type = feature_document_type\n
- , title = kw[\'feature_document_title\']\n
- , description = kw[\'feature_document_description\']\n
- )\n
- destination_obj = feature_doc\n
-elif context_obj.getPortalType() in (feature_document_type, feature_type):\n
- destination_obj = context_obj\n
-else:\n
- return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'?portal_status_message=Error:+bad+context.\')\n
-\n
-# this list contain all features items\n
-features_items = []\n
-\n
-# get the user information\n
-for feature_line in listbox:\n
- if feature_line.has_key(\'listbox_key\'):\n
- feature_line_id = int(feature_line[\'listbox_key\'])\n
- feature = {}\n
- feature[\'id\'] = feature_line_id\n
- feature[\'title\'] = feature_line[\'feature_title\']\n
- feature[\'sub_title\'] = feature_line[\'sub_feature_title\']\n
- feature[\'sub_description\'] = feature_line[\'sub_feature_description\']\n
- features_items.append(feature)\n
-\n
-# sort the features list by id to have the same order of the user\n
-features_items.sort(lambda x, y: cmp(x[\'id\'], y[\'id\']))\n
-\n
-clean_features = {}\n
-has_1st_level_feature = False\n
-has_2nd_level_feature = False\n
-new_1st_level_feature = None\n
-\n
-# scan every fast input line to create a structured and comprehensive list of features and sub-features\n
-for feature_item in features_items:\n
- # the item has a first level feature\n
- if feature_item[\'title\'] not in (\'\', None):\n
- has_1st_level_feature = True\n
- new_1st_level_feature = []\n
- new_1st_level_feature_title = feature_item[\'title\']\n
- else:\n
- has_1st_level_feature = False\n
-\n
- # the item has a second level feature, built it\n
- if feature_item[\'sub_title\'] not in (\'\', None):\n
- has_2nd_level_feature = True\n
- new_2nd_level_feat = {}\n
- new_2nd_level_feat[\'title\'] = feature_item[\'sub_title\']\n
- if feature_item[\'sub_title\'] not in (\'\', None):\n
- new_2nd_level_feat[\'description\'] = feature_item[\'sub_description\']\n
- else:\n
- new_2nd_level_feat[\'description\'] = None\n
- else:\n
- has_2nd_level_feature = False\n
-\n
- if has_2nd_level_feature == True and new_1st_level_feature != None:\n
- new_1st_level_feature.append(new_2nd_level_feat)\n
-\n
- if has_1st_level_feature == True:\n
- if clean_features.has_key(new_1st_level_feature_title):\n
- new_1st_level_feature = clean_features[new_1st_level_feature_title] + new_1st_level_feature\n
- clean_features[new_1st_level_feature_title] = new_1st_level_feature\n
-\n
-# create feature objects and sub-features\n
-for key in clean_features.keys():\n
- new_1st_feature = destination_obj.newContent( portal_type = feature_type\n
- , title = key\n
- )\n
- for second_level in clean_features[key]:\n
- new_2nd_feature = new_1st_feature.newContent( portal_type = feature_type\n
- , title = second_level[\'title\']\n
- , description = second_level[\'description\']\n
- )\n
-\n
-# return to the feature module\n
-return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'?portal_status_message=Feature+document+added.\')\n
-</string> </value>
- </item>
- <item>
- <key> <string>_code</string> </key>
- <value>
- <none/>
- </value>
- </item>
- <item>
- <key> <string>_filepath</string> </key>
- <value> <string>Script (Python):/nexedi/portal_skins/erp5_consulting/Feature_generateFeatures</string> </value>
- </item>
- <item>
- <key> <string>_owner</string> </key>
- <value>
- <none/>
- </value>
- </item>
- <item>
- <key> <string>_params</string> </key>
- <value> <string>listbox=[], **kw</string> </value>
- </item>
- <item>
- <key> <string>errors</string> </key>
- <value>
- <tuple/>
- </value>
- </item>
- <item>
- <key> <string>func_code</string> </key>
- <value>
- <object>
- <klass>
- <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
- </klass>
- <tuple/>
- <state>
- <dictionary>
- <item>
- <key> <string>co_argcount</string> </key>
- <value> <int>1</int> </value>
- </item>
- <item>
- <key> <string>co_varnames</string> </key>
- <value>
- <tuple>
- <string>listbox</string>
- <string>kw</string>
- <string>_getattr_</string>
- <string>context</string>
- <string>context_obj</string>
- <string>feature_module_type</string>
- <string>feature_document_type</string>
- <string>feature_type</string>
- <string>_getitem_</string>
- <string>feature_doc</string>
- <string>destination_obj</string>
- <string>features_items</string>
- <string>_getiter_</string>
- <string>feature_line</string>
- <string>int</string>
- <string>feature_line_id</string>
- <string>feature</string>
- <string>_write_</string>
- <string>clean_features</string>
- <string>False</string>
- <string>has_1st_level_feature</string>
- <string>has_2nd_level_feature</string>
- <string>None</string>
- <string>new_1st_level_feature</string>
- <string>feature_item</string>
- <string>True</string>
- <string>new_1st_level_feature_title</string>
- <string>new_2nd_level_feat</string>
- <string>key</string>
- <string>new_1st_feature</string>
- <string>second_level</string>
- <string>new_2nd_feature</string>
- </tuple>
- </value>
- </item>
- </dictionary>
- </state>
- </object>
- </value>
- </item>
- <item>
- <key> <string>func_defaults</string> </key>
- <value>
- <tuple>
- <list/>
- </tuple>
- </value>
- </item>
- <item>
- <key> <string>id</string> </key>
- <value> <string>Feature_generateFeatures</string> </value>
- </item>
- <item>
- <key> <string>warnings</string> </key>
- <value>
- <tuple/>
- </value>
- </item>
- </dictionary>
- </pickle>
- </record>
-</ZopeData>
More information about the Erp5-report
mailing list