Commit a33d8626 authored by Sebastien Robin's avatar Sebastien Robin

CMFActivity: fixed search of some columns on ActivityTool_viewActivityList

In the same time, remove sortable columns since ActivityTool does not offer
possibility of sorting.
parent c18d9b9e
......@@ -84,6 +84,7 @@ def sqltest_dict():
_('processing_node')
_('serialization_tag')
_('tag')
_('retry')
_('to_date', column="date", op="<=")
_('uid')
return sqltest_dict
......
......@@ -57,8 +57,13 @@
if kw.get(\'processing_node\', None) == \'\':\n
del kw[\'processing_node\']\n
\n
#key_list_to_search = [x for (x,y) in [(k,kw[k]) for k in [\'uid_activity\',\'str_object_path\',\'method_id\',\'retry\',\'processing\']] if y != \'\']\n
message_kw = dict([(k,kw[k]) for k in [\'uid_activity\',\'str_object_path\',\'method_id\',\'args\',\'retry\',\'processing\'] if not(kw.get(k) in (\'\',None))])\n
message_kw = dict([(k,kw[k]) for k in [\'uid_activity\',\'str_object_path\',\'method_id\',\n
\'args\',\'retry\',\'processing_node\',\n
\'processing\'] if not(kw.get(k) in (\'\',None))])\n
if message_kw.has_key("str_object_path"):\n
message_kw["path"] = message_kw.pop("str_object_path")\n
if message_kw.has_key("uid_activity"):\n
message_kw["uid"] = message_kw.pop("uid_activity")\n
\n
message_list = context.getMessageTempObjectList(**message_kw)\n
message_list_to_show = []\n
......@@ -67,19 +72,10 @@ while len(message_list) > 0:\n
message.edit(str_object_path = \'/\'.join(str(i) for i in message.object_path))\n
message.edit(uid_activity = str(message.uid) + \' (\'+ message.activity[3:] +\')\')\n
message.edit(arguments = str(message.args))\n
# # search filter\n
# try:\n
# for k in key_list_to_search:\n
# str(getattr(message,k,None)).index(kw[k])\n
# except ValueError:\n
# continue\n
message.edit(delete = \'[Delete]\')\n
message.edit(restart = \'[Restart]\')\n
message_list_to_show.append(message)\n
\n
## sort\n
## XXX\n
\n
return message_list_to_show\n
......
......@@ -240,32 +240,7 @@
<item>
<key> <string>sort_columns</string> </key>
<value>
<list>
<tuple>
<string>uid_activity</string>
<string>UID</string>
</tuple>
<tuple>
<string>str_object_path</string>
<string>Object</string>
</tuple>
<tuple>
<string>method_id</string>
<string>Method ID</string>
</tuple>
<tuple>
<string>processing_node</string>
<string>Processing Node</string>
</tuple>
<tuple>
<string>retry</string>
<string>Retry</string>
</tuple>
<tuple>
<string>processing</string>
<string>Processing</string>
</tuple>
</list>
<list/>
</value>
</item>
<item>
......
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