Commit e3f7588b authored by Aurel's avatar Aurel

modify Base_getWorkflowHistoryItemList in order to diplay state title

and workflow transition title in history view


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5550 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d6f0e655
...@@ -80,6 +80,10 @@ for history_name in [\'history\', \'building_history\', \'installation_history\' ...@@ -80,6 +80,10 @@ for history_name in [\'history\', \'building_history\', \'installation_history\'
name=\'history\', wf_id=workflow_id)\n name=\'history\', wf_id=workflow_id)\n
if workflow_item_list != []:\n if workflow_item_list != []:\n
break\n break\n
\n
wf_states = context.portal_workflow[workflow_id].states\n
wf_transitions = context.portal_workflow[workflow_id].transitions\n
\n
for workflow_item in workflow_item_list:\n for workflow_item in workflow_item_list:\n
# XXX removing str method generate a strange bug\n # XXX removing str method generate a strange bug\n
o = newTempBase(portal_object, str(i))\n o = newTempBase(portal_object, str(i))\n
...@@ -90,9 +94,16 @@ for workflow_item in workflow_item_list:\n ...@@ -90,9 +94,16 @@ for workflow_item in workflow_item_list:\n
if key.startswith(compatibility_name):\n if key.startswith(compatibility_name):\n
# Display the workflow state in the state columns\n # Display the workflow state in the state columns\n
key = key[len(compatibility_name):]\n key = key[len(compatibility_name):]\n
if key.endswith(\'state\'): # FIXME use translated_state_title here, not state id\n if key.endswith(\'state\'): \n
key = \'state\'\n key = \'state\'\n
# o.edit(key=value)\n value = wf_states[value].title\n
if key == \'action\':\n
if value != \'\' and value is not None:\n
if value == "\'edit\'":\n
value = "edit"\n
value = wf_transitions[value].title or wf_transitions[value].actbox_name or value\n
if same_type(value, \'\'):\n
value = context.Localizer.erp5_ui.gettext(value)\n
o.setProperty(key, value)\n o.setProperty(key, value)\n
result.append(o)\n result.append(o)\n
\n \n
...@@ -157,14 +168,18 @@ return result\n ...@@ -157,14 +168,18 @@ return result\n
<string>_getiter_</string> <string>_getiter_</string>
<string>history_name</string> <string>history_name</string>
<string>workflow_item_list</string> <string>workflow_item_list</string>
<string>_getitem_</string>
<string>wf_states</string>
<string>wf_transitions</string>
<string>workflow_item</string> <string>workflow_item</string>
<string>str</string> <string>str</string>
<string>o</string> <string>o</string>
<string>key</string> <string>key</string>
<string>value</string> <string>value</string>
<string>compatibility_name</string> <string>compatibility_name</string>
<string>_getitem_</string>
<string>len</string> <string>len</string>
<string>None</string>
<string>same_type</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
2006-02-03 aurel
* modify Base_getWorkflowHistoryItemList
2006-02-02 aurel 2006-02-02 aurel
* modify Base_getWorkflowHistorySectionList and Base_viewWorkflowHistory * modify Base_getWorkflowHistorySectionList and Base_viewWorkflowHistory
......
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