From 9991a32b688eb65cc2085533d1248058b35b26ac Mon Sep 17 00:00:00 2001 From: Rafael Monnerat <rafael@nexedi.com> Date: Wed, 3 Oct 2007 05:23:36 +0000 Subject: [PATCH] Added Default Color configuration for Planning Box at Task Report Module git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16791 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../Movement_getSimulationStateColorText.xml | 175 ++++++++++++++++++ .../TaskReportModule_viewPlanningReport.xml | 4 +- .../planning_box.xml | 4 +- .../TaskReportModule_viewTaskReportList.xml | 7 +- bt5/erp5_project/bt/revision | 2 +- 5 files changed, 185 insertions(+), 7 deletions(-) create mode 100644 bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Movement_getSimulationStateColorText.xml diff --git a/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Movement_getSimulationStateColorText.xml b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Movement_getSimulationStateColorText.xml new file mode 100644 index 0000000000..ec37418cdb --- /dev/null +++ b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Movement_getSimulationStateColorText.xml @@ -0,0 +1,175 @@ +<?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># Define the color using the simulation state\n +if task.getPortalType() in task.getPortalCalendarPeriodTypeList():\n + return \'#d3d3d3\'\n +\n +simulation_method = getattr(task, \'getSimulationState\', None)\n +if simulation_method is None:\n + return \'#D1E8FF\'\n +\n +simulation_state = simulation_method()\n +\n +color_dict = {\n + \'draft\': \'#a7d7ae\',\n + \'planned\': \'#ffff00\',\n + \'ordered\': \'#ff8e56\',\n + \'confirmed\': \'#ff0000\',\n + \'started\': \'#ff00ff\',\n + \'stopped\': \'#00b8ff\',\n + \'delivered\': \'#3deb3d\',\n +}\n +return color_dict.get(simulation_state, \'#D1E8FF\')\n +</string> </value> + </item> + <item> + <key> <string>_code</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_filepath</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_owner</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>task=None</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>task</string> + <string>_getattr_</string> + <string>getattr</string> + <string>None</string> + <string>simulation_method</string> + <string>simulation_state</string> + <string>color_dict</string> + </tuple> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>func_defaults</string> </key> + <value> + <tuple> + <none/> + </tuple> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>Movement_getSimulationStateColorText</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/TaskReportModule_viewPlanningReport.xml b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/TaskReportModule_viewPlanningReport.xml index 48dca31663..102e44f234 100644 --- a/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/TaskReportModule_viewPlanningReport.xml +++ b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/TaskReportModule_viewPlanningReport.xml @@ -47,7 +47,7 @@ </item> <item> <key> <string>action</string> </key> - <value> <string></string> </value> + <value> <string>Base_edit</string> </value> </item> <item> <key> <string>description</string> </key> @@ -98,7 +98,7 @@ </item> <item> <key> <string>pt</string> </key> - <value> <string>form_dialog</string> </value> + <value> <string>form_view</string> </value> </item> <item> <key> <string>row_length</string> </key> diff --git a/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/TaskReportModule_viewPlanningReport/planning_box.xml b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/TaskReportModule_viewPlanningReport/planning_box.xml index 9626f03aa9..4d9e0067ac 100644 --- a/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/TaskReportModule_viewPlanningReport/planning_box.xml +++ b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/TaskReportModule_viewPlanningReport/planning_box.xml @@ -379,7 +379,7 @@ </item> <item> <key> <string>color_script</string> </key> - <value> <string></string> </value> + <value> <string>Movement_getSimulationStateColorText</string> </value> </item> <item> <key> <string>constraint_method</string> </key> @@ -633,7 +633,7 @@ </item> <item> <key> <string>y_size_block</string> </key> - <value> <string>quantity</string> </value> + <value> <string></string> </value> </item> <item> <key> <string>y_unity</string> </key> diff --git a/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/TaskReportModule_viewTaskReportList.xml b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/TaskReportModule_viewTaskReportList.xml index df04705c6c..fca6ed28ba 100644 --- a/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/TaskReportModule_viewTaskReportList.xml +++ b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/TaskReportModule_viewTaskReportList.xml @@ -3,8 +3,11 @@ <record id="1" aka="AAAAAAAAAAE="> <pickle> <tuple> - <global name="ERP5Form" module="Products.ERP5Form.Form"/> - <tuple/> + <tuple> + <string>Products.ERP5Form.Form</string> + <string>ERP5Form</string> + </tuple> + <none/> </tuple> </pickle> <pickle> diff --git a/bt5/erp5_project/bt/revision b/bt5/erp5_project/bt/revision index 0e92c3c0fc..5160788e93 100644 --- a/bt5/erp5_project/bt/revision +++ b/bt5/erp5_project/bt/revision @@ -1 +1 @@ -306 \ No newline at end of file +307 \ No newline at end of file -- 2.30.9