Commit 33ba1d20 authored by Yusei Tahara's avatar Yusei Tahara

2008-05-28 yusei

* Add comment field in GlossaryTerm_view and original location where correspnding field  or workflow id was found will be stored in the comment field.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21202 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a1ec3098
......@@ -73,7 +73,8 @@ if export_tsv:\n
for i in result:\n
print \'\\t\'.join(map(lambda x:\'"%s"\'%x, (i[\'reference\'], i[\'language\'],\n
i[\'business_field\'],\n
i[\'title\'], i[\'description\'],)))\n
i[\'title\'], i[\'description\'],\n
i[\'field_path\'])))\n
return printed\n
else:\n
portal_catalog = context.portal_catalog\n
......@@ -90,7 +91,8 @@ else:\n
container=context,\n
reference=i[\'reference\'], language=i[\'language\'],\n
business_field=i[\'business_field\'],\n
title=i[\'title\'], description=i[\'description\'])\n
title=i[\'title\'], description=i[\'description\'],\n
comment=i[\'field_path\'])\n
\n
\n
portal_status_message = context.Base_translateString(\'Terms created.\')\n
......
......@@ -90,7 +90,8 @@ else:\n
container=context,\n
reference=i[\'reference\'], language=i[\'language\'],\n
business_field=i[\'business_field\'],\n
title=i[\'title\'], description=i[\'description\'])\n
title=i[\'title\'], description=i[\'description\'],\n
comment=i[\'workflow_id\'])\n
\n
\n
portal_status_message = context.Base_translateString(\'Terms created.\')\n
......
......@@ -106,11 +106,16 @@ for (reference, business_field, title) in dic.keys():\n
language = \'en\'\n
field = dic[(reference, business_field, title)]\n
description = field.get_value(\'description\')\n
field_path = \'%s/%s/%s\' % (field.aq_parent.aq_parent.getId(),\n
field.aq_parent.getId(),\n
field.getId())\n
result.append({\'reference\':reference,\n
\'language\':language,\n
\'business_field\':business_field,\n
\'title\':title,\n
\'description\':description})\n
\'description\':description,\n
\'field_path\':field_path\n
})\n
\n
return result\n
</string> </value>
......@@ -196,6 +201,7 @@ return result\n
<string>language</string>
<string>field</string>
<string>description</string>
<string>field_path</string>
</tuple>
</value>
</item>
......
......@@ -82,20 +82,21 @@ for bt_id in template_list:\n
for wf_id in bt.getTemplateWorkflowIdList():\n
wf = getattr(context.portal_workflow, wf_id)\n
if getattr(wf, "interactions", marker) is marker: # only way to make sure it is not an interaction workflow ?\n
term_dict[(wf_id, bt_id, wf.title, wf.description)] = 1\n
term_dict[(wf_id, bt_id, wf.title, wf.description)] = wf_id\n
for state_id, state in wf.states.items():\n
term_dict[(state_id, bt_id, state.title, state.description)] = 1\n
term_dict[(state_id, bt_id, state.title, state.description)] = wf_id\n
for trans_id, trans in wf.transitions.items():\n
term_dict[(trans_id, bt_id, trans.title, trans.description)] = 1\n
term_dict[(trans_id, bt_id, trans.title, trans.description)] = wf_id\n
if trans.trigger_type == 1 and trans.actbox_name: # 1 == TRIGGER_USER_ACTION\n
term_dict[(\'%s_actbox_name\' % trans_id, bt_id, trans.actbox_name, \'\')] = 1\n
term_dict[(\'%s_actbox_name\' % trans_id, bt_id, trans.actbox_name, \'\')] = wf_id\n
\n
for (reference, business_field, title, description) in term_dict.iterkeys():\n
for (reference, business_field, title, description), workflow_id in term_dict.items():\n
result.append({\'reference\': reference,\n
\'language\': language,\n
\'business_field\': business_field,\n
\'title\': title,\n
\'description\': description})\n
\'description\': description,\n
\'workflow_id\':workflow_id})\n
\n
return result\n
</string> </value>
......@@ -182,6 +183,7 @@ return result\n
<string>business_field</string>
<string>title</string>
<string>description</string>
<string>workflow_id</string>
</tuple>
</value>
</item>
......
......@@ -97,6 +97,7 @@
<string>my_language</string>
<string>my_title</string>
<string>my_description</string>
<string>my_comment</string>
<string>my_translated_validation_state_title</string>
</list>
</value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
<string>whitespace_preserve</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_comment</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_description</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Comment</string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2008-05-28 yusei
* Add comment field in GlossaryTerm_view and original location where correspnding field or workflow id was found will be stored in the comment field.
2008-05-15 yo
* Clean up BusinessTemplate_doSvnUpdate, since it redirected to a strange URL.
......
237
\ No newline at end of file
238
\ No newline at end of file
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