Commit 740d21c6 authored by Sebastien Robin's avatar Sebastien Robin

commit modification made to Resource_zGetTrackingList.xml and many small changes made by others


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5947 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 82554a4a
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.StandardFields</string>
<string>StringField</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_domain_generator_method_id</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>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>too_long</string> </key>
<value> <string>Too much input was given.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Domain Generator Method</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -69,7 +69,8 @@
<value> <string encoding="cdata"><![CDATA[
from Products.Formulator.Errors import ValidationError, FormValidationError\n
\n
portal = context.getPortalObject()\n
N_ = portal.Base_translateString\n
request=context.REQUEST\n
\n
#### Workaround for bug #21\n
......@@ -265,17 +266,19 @@ except FormValidationError, validation_errors:\n
return form(request)\n
\n
else:\n
message = N_("Data+Updated.")\n
if not selection_index:\n
redirect_url = \'%s/%s?%s\' % ( context.absolute_url()\n
redirect_url = \'%s/%s?portal_status_message=%s\' % ( context.absolute_url()\n
, form_id\n
, \'portal_status_message=Data+Updated.\'\n
, message\n
)\n
else:\n
redirect_url = \'%s/%s?selection_index=%s&selection_name=%s&%s\' % ( context.absolute_url()\n
redirect_url = \'%s/%s?selection_index=%s&selection_name=%s&portal_status_message=%s\' % ( \n
context.absolute_url()\n
, form_id\n
, selection_index\n
, selection_name\n
, \'portal_status_message=Data+Updated.\'\n
, message\n
)\n
\n
\n
......@@ -339,6 +342,8 @@ request[ \'RESPONSE\' ].redirect( redirect_url )\n
<string>FormValidationError</string>
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
<string>N_</string>
<string>request</string>
<string>redirect_url</string>
<string>_getitem_</string>
......@@ -393,6 +398,7 @@ request[ \'RESPONSE\' ].redirect( redirect_url )\n
<string>field_errors</string>
<string>field_id</string>
<string>callable</string>
<string>message</string>
</tuple>
</value>
</item>
......
......@@ -70,6 +70,8 @@
from Products.Formulator.Errors import ValidationError, FormValidationError\n
from ZTUtils import make_query\n
portal = context.getPortalObject()\n
N_ = portal.Base_translateString\n
\n
request=context.REQUEST\n
\n
......@@ -86,7 +88,8 @@ if o is None:\n
if o is not None:\n
o.immediateReindexObject()\n
else:\n
return ValueError, "Sorrry, Error, the calling object was not catalogued. Do not know how to do ?"\n
message = N_("Sorrry, Error, the calling object was not catalogued. Do not know how to do ?")\n
return ValueError, message\n
\n
def checkSameKeys(a , b):\n
"""\n
......@@ -252,7 +255,7 @@ except FormValidationError, validation_errors:\n
request.set(\'field_errors\', field_errors)\n
return form(request)\n
else:\n
message = \'Relation+Unchanged.\'\n
message = N_(\'Relation+Unchanged.\')\n
\n
if redirect_url is None:\n
if not selection_index:\n
......@@ -323,11 +326,14 @@ request[ \'RESPONSE\' ].redirect( redirect_url )\n
<string>make_query</string>
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
<string>N_</string>
<string>request</string>
<string>None</string>
<string>base_category</string>
<string>o</string>
<string>redirect_url</string>
<string>message</string>
<string>ValueError</string>
<string>checkSameKeys</string>
<string>getOrderedUids</string>
......@@ -363,7 +369,6 @@ request[ \'RESPONSE\' ].redirect( redirect_url )\n
<string>complete_value</string>
<string>validation_errors</string>
<string>field_errors</string>
<string>message</string>
</tuple>
</value>
</item>
......
......@@ -66,7 +66,10 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>selected_uids = context.portal_selections.updateSelectionCheckedUidList(selection_name,listbox_uid,uids)\n
<value> <string>portal = context.getPortalObject()\n
N_ = portal.Base_translateString\n
\n
selected_uids = context.portal_selections.updateSelectionCheckedUidList(selection_name,listbox_uid,uids)\n
uids = context.portal_selections.getSelectionCheckedUidsFor(selection_name)\n
# make sure nothing is checked after\n
context.portal_selections.setSelectionCheckedUidsFor(selection_name, [])\n
......@@ -81,9 +84,11 @@ REQUEST=context.REQUEST\n
if uids != []:\n
#context.manage_copyObjects(uids=REQUEST[\'uids\'], REQUEST=REQUEST, RESPONSE=REQUEST.RESPONSE)\n
context.manage_copyObjects(uids=uids, REQUEST=REQUEST, RESPONSE=REQUEST.RESPONSE)\n
return REQUEST.RESPONSE.redirect(context.absolute_url() + \'/\' + form_id + \'?portal_status_message=Item(s)+Copied.\')\n
message = N_("Item(s)+Copied.")\n
return REQUEST.RESPONSE.redirect(context.absolute_url() + \'/\' + form_id + \'?portal_status_message=%s\' % message)\n
else:\n
return REQUEST.RESPONSE.redirect(context.absolute_url() + \'/\' + form_id + \'?portal_status_message=Please+select+one+or+more+items+to+copy+first.\')\n
message = N_("Please+select+one+or+more+items+to+copy+first.")\n
return REQUEST.RESPONSE.redirect(context.absolute_url() + \'/\' + form_id + \'?portal_status_message=%s\' % message)\n
</string> </value>
</item>
<item>
......@@ -136,8 +141,11 @@ else:\n
<string>selection_name</string>
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
<string>N_</string>
<string>selected_uids</string>
<string>REQUEST</string>
<string>message</string>
</tuple>
</value>
</item>
......
......@@ -66,7 +66,10 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>REQUEST=context.REQUEST\n
<value> <string>portal = context.getPortalObject()\n
N_ = portal.Base_translateString\n
\n
REQUEST=context.REQUEST\n
\n
# Add an object of the same type as the container\n
# or if allowed content types is 1 add that type\n
......@@ -77,7 +80,8 @@ except IndexError:\n
# return only a portal_status_message if the IndexError is raised because\n
# there are no elemnts in context.allowedContentTypes()\n
if not context.allowedContentTypes():\n
return REQUEST.RESPONSE.redirect(\'%s?portal_status_message=You are not allowed to add new content in this context.\' %context.absolute_url())\n
message = N_("You are not allowed to add new content in this context.")\n
return REQUEST.RESPONSE.redirect(\'%s?portal_status_message=%s\' % (context.absolute_url(), message))\n
else:\n
raise\n
url = new_object.absolute_url()\n
......@@ -126,9 +130,12 @@ return REQUEST.RESPONSE.redirect(url)\n
<tuple>
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
<string>N_</string>
<string>REQUEST</string>
<string>new_object</string>
<string>IndexError</string>
<string>message</string>
<string>url</string>
</tuple>
</value>
......
......@@ -66,12 +66,14 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>selected_uids = context.portal_selections.updateSelectionCheckedUidList(selection_name,listbox_uid,uids)\n
<value> <string>portal = context.getPortalObject()\n
N_ = portal.Base_translateString\n
\n
selected_uids = context.portal_selections.updateSelectionCheckedUidList(selection_name,listbox_uid,uids)\n
uids = context.portal_selections.getSelectionCheckedUidsFor(selection_name)\n
# make sure nothing is checked after\n
context.portal_selections.setSelectionCheckedUidsFor(selection_name, [])\n
\n
\n
REQUEST=context.REQUEST\n
# do we still need ids ? XXX finish the work here\n
#if REQUEST.has_key(\'ids\'):\n
......@@ -81,9 +83,11 @@ REQUEST=context.REQUEST\n
if uids != []:\n
#context.manage_cutObjects(uids=REQUEST[\'uids\'], REQUEST=REQUEST)\n
context.manage_cutObjects(uids=uids, REQUEST=REQUEST)\n
return REQUEST.RESPONSE.redirect(context.absolute_url() + \'/\' + form_id + \'?portal_status_message=Item(s)+Cut.\')\n
message = N_("Item(s)+Cut.")\n
return REQUEST.RESPONSE.redirect(context.absolute_url() + \'/\' + form_id + \'?portal_status_message=%s\' % message)\n
else:\n
return REQUEST.RESPONSE.redirect(context.absolute_url() + \'/Folder_viewContentList?portal_status_message=Please+select+one+or+more+items+to+cut+first.\')\n
message = N_("Please+select+one+or+more+items+to+cut+first.")\n
return REQUEST.RESPONSE.redirect(context.absolute_url() + \'/Folder_viewContentList?portal_status_message=%s\' % message)\n
</string> </value>
</item>
<item>
......@@ -129,9 +133,12 @@ else:\n
<string>uids</string>
<string>listbox_uid</string>
<string>_getattr_</string>
<string>context</string>
<string>context</string>
<string>portal</string>
<string>N_</string>
<string>selected_uids</string>
<string>REQUEST</string>
<string>message</string>
</tuple>
</value>
</item>
......
......@@ -69,6 +69,9 @@
<value> <string encoding="cdata"><![CDATA[
from ZODB.POSException import ConflictError\n
portal = context.getPortalObject()\n
N_ = portal.Base_translateString\n
\n
selected_uids = context.portal_selections.updateSelectionCheckedUidList(selection_name,listbox_uid,uids)\n
uids = context.portal_selections.getSelectionCheckedUidsFor(selection_name)\n
\n
......@@ -94,7 +97,8 @@ def Object_hasRelation(object):\n
\n
ret_url = context.absolute_url() + \'/\' + form_id\n
if error:\n
qs = \'?portal_status_message=Sorry+your+selection+has+changed\'\n
message = N_("Sorry+your+selection+has+changed")\n
qs = \'?portal_status_message=%s\' % message\n
elif uids is not None:\n
# Check if there is some related objets.\n
object_used = 0\n
......@@ -103,19 +107,24 @@ elif uids is not None:\n
if Object_hasRelation(object):\n
object_used += 1\n
if object_used>0:\n
if object_used == 1: \n
qs = \'?portal_status_message=Sorry,+1+Item+Is+In+Use.\'\n
if object_used == 1:\n
message = N_("Sorry,+1+Item+Is+In+Use.")\n
qs = \'?portal_status_message=%s\' % message\n
else:\n
qs = \'?portal_status_message=Sorry,+%s+Items+Are+In+Use.\' % repr(object_used)\n
message = N_("Sorry,+${count}+Items+Are+In+Use.",\n
mapping={\'count\': repr(object_used)})\n
qs = \'?portal_status_message=%s\' % message \n
else:\n
try : \n
context.manage_delObjects(uids=uids, REQUEST=REQUEST)\n
qs = \'?portal_status_message=Deleted.\'\n
message = N_("Deleted.")\n
qs = \'?portal_status_message=%s\' % message\n
except ConflictError : raise\n
except Exception, message : \n
qs = \'?portal_status_message=%s\' % message\n
else:\n
qs = \'?portal_status_message=Please+select+one+or+more+items+first.\'\n
message = N_("Please+select+one+or+more+items+first.")\n
qs = \'?portal_status_message=%s\' % message\n
\n
return REQUEST.RESPONSE.redirect( ret_url + qs )\n
......@@ -173,12 +182,15 @@ return REQUEST.RESPONSE.redirect( ret_url + qs )\n
<string>ConflictError</string>
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
<string>N_</string>
<string>selected_uids</string>
<string>error</string>
<string>REQUEST</string>
<string>qs</string>
<string>ret_url</string>
<string>Object_hasRelation</string>
<string>message</string>
<string>None</string>
<string>object_used</string>
<string>_getiter_</string>
......@@ -187,7 +199,6 @@ return REQUEST.RESPONSE.redirect( ret_url + qs )\n
<string>object</string>
<string>repr</string>
<string>Exception</string>
<string>message</string>
</tuple>
</value>
</item>
......
......@@ -72,14 +72,22 @@ if context.cb_dataValid:\n
# We first look if the content of objects to paste is allowed\n
# inside this folder\n
object_list = context.cb_dataItems()\n
portal_type_list = map(lambda x: x.getPortalType(),object_list)\n
allowed_type_list = map(lambda x: x.id, context.allowedContentTypes())\n
try:\n
portal_type_list = [x.getPortalType() for x in object_list]\n
except AttributeError:\n
error_message = \'Sorry+you+can+not+paste+theses+Items+here\'\n
else:\n
allowed_type_list = [x.id for x in context.allowedContentTypes()]\n
for portal_type in portal_type_list:\n
if portal_type not in allowed_type_list:\n
error_message = \'Sorry+you+can+not+paste+theses+Items+here\'\n
if context.cb_dataValid and error_message==\'\':\n
try:\n
new_item_list = context.manage_pasteObjects(REQUEST[\'__cp\'])\n
new_id_list = map(lambda i: i[\'new_id\'],new_item_list)\n
except KeyError:\n
return REQUEST.RESPONSE.redirect(context.absolute_url() + \'/\' + form_id + \'?portal_status_message=Nothing+To+Paste.\')\n
else:\n
new_id_list = [i[\'new_id\'] for i in new_item_list]\n
for my_id in new_id_list:\n
context[my_id].flushActivity(invoke=0, method_id=\'immediateReindexObject\')\n
context[my_id].recursiveImmediateReindexObject()\n
......@@ -130,17 +138,22 @@ else:\n
<tuple>
<string>form_id</string>
<string>_getattr_</string>
<string>context</string>
<string>context</string>
<string>REQUEST</string>
<string>error_message</string>
<string>object_list</string>
<string>map</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>x</string>
<string>portal_type_list</string>
<string>AttributeError</string>
<string>allowed_type_list</string>
<string>_getiter_</string>
<string>portal_type</string>
<string>_getitem_</string>
<string>new_item_list</string>
<string>KeyError</string>
<string>i</string>
<string>new_id_list</string>
<string>my_id</string>
</tuple>
......
......@@ -47,31 +47,78 @@
</value>
</item>
<item>
<key> <string>node_uid</string> </key>
<key> <string>date_condition_in_join</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>portal_type_list</string> </key>
<key> <string>from_date</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>section_uid_list</string> </key>
<key> <string>from_table_list</string> </key>
<value>
<dictionary>
<item>
<key> <string>type</string> </key>
<value> <string>list</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>group_by_expression</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>input</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>join_on_item</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>order_by_expression</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>simulation_state_list</string> </key>
<key> <string>output</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>variation_text_list</string> </key>
<key> <string>selection_domain</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>selection_report</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>to_date</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>where_expression</string> </key>
<value>
<dictionary/>
</value>
......@@ -83,12 +130,19 @@
<key> <string>_keys</string> </key>
<value>
<list>
<string>node_uid</string>
<string>from_date</string>
<string>at_date</string>
<string>section_uid_list</string>
<string>portal_type_list</string>
<string>variation_text_list</string>
<string>simulation_state_list</string>
<string>to_date</string>
<string>input</string>
<string>output</string>
<string>from_table_list</string>
<string>where_expression</string>
<string>selection_domain</string>
<string>selection_report</string>
<string>order_by_expression</string>
<string>group_by_expression</string>
<string>join_on_item</string>
<string>date_condition_in_join</string>
</list>
</value>
</item>
......@@ -274,12 +328,19 @@
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>node_uid\r\n
<value> <string>from_date\r\n
at_date\r\n
section_uid_list\r\n
portal_type_list\r\n
variation_text_list\r\n
simulation_state_list</string> </value>
to_date\r\n
input\r\n
output\r\n
from_table_list:list\r\n
where_expression\r\n
selection_domain\r\n
selection_report\r\n
order_by_expression\r\n
group_by_expression\r\n
join_on_item\r\n
date_condition_in_join</string> </value>
</item>
<item>
<key> <string>cache_time_</string> </key>
......@@ -319,44 +380,75 @@ simulation_state_list</string> </value>
SELECT \n
item.aggregate_uid AS uid,\n
catalog.path AS path,\n
item_catalog.path AS path,\n
item.date AS date,\n
item.node_uid AS node_uid,\n
item.section_uid AS section_uid,\n
item.resource_uid AS resource_uid,\n
item.variation_text AS variation_text\n
item.variation_text AS variation_text,\n
item.uid AS delivery_uid\n
FROM\n
catalog, item\n
LEFT JOIN \n
catalog as item_catalog\n
<dtml-if from_table_list>\n
<dtml-in prefix="table" expr="from_table_list"> \n
<dtml-if expr="table_key != \'item\'">, <dtml-var table_item> AS <dtml-var table_key></dtml-if>\n
</dtml-in>\n
</dtml-if>\n
<dtml-if selection_domain>, <dtml-var "selection_domain.asSqlJoinExpression()"> </dtml-if>\n
<dtml-if selection_report>, <dtml-var "selection_report.asSqlJoinExpression()"> </dtml-if>\n
, item\n
\n
\n
<dtml-if join_on_item>\n
LEFT JOIN \n
item AS next_item\n
ON\n
(next_item.date <= <dtml-sqlvar at_date type="string">\n
AND \n
ON (\n
<dtml-if date_condition_in_join>\n
next_item.date <= <dtml-sqlvar at_date type="string">\n
AND\n
</dtml-if>\n
next_item.aggregate_uid = item.aggregate_uid\n
AND\n
AND\n
<dtml-if input>\n
next_item.date < item.date\n
<dtml-else>\n
next_item.date > item.date\n
</dtml-if>\n
)\n
</dtml-if>\n
\n
WHERE\n
catalog.uid = item.aggregate_uid\n
AND\n
next_item.uid IS NULL\n
AND\n
item.node_uid = <dtml-sqlvar node_uid type="int">\n
AND\n
item.date <= <dtml-sqlvar at_date type="string">\n
<dtml-if section_uid_list>\n
AND (<dtml-in section_uid_list><dtml-unless sequence-start> OR </dtml-unless>item.section_uid=\'<dtml-var sequence-item>\'</dtml-in>)\n
1 = 1\n
\n
<dtml-if where_expression>\n
AND <dtml-var where_expression>\n
</dtml-if>\n
<dtml-if portal_type_list>\n
AND (<dtml-in portal_type_list><dtml-unless sequence-start> OR </dtml-unless>item.portal_type=\'<dtml-var sequence-item>\'</dtml-in>)\n
\n
AND item_catalog.uid = item.aggregate_uid\n
\n
<dtml-if join_on_item>\n
AND next_item.uid IS NULL\n
</dtml-if>\n
<dtml-if variation_text_list>\n
AND (<dtml-in variation_text_list><dtml-unless sequence-start> OR </dtml-unless>item.variation_text=\'<dtml-var sequence-item>\'</dtml-in>)\n
\n
\n
<dtml-if selection_domain>\n
AND <dtml-var "selection_domain.asSqlExpression(join_table=\'item\',\n
join_column=\'node_uid\')">\n
</dtml-if>\n
<dtml-if simulation_state_list>\n
AND (<dtml-in simulation_state_list><dtml-unless sequence-start> OR </dtml-unless>item.simulation_state=\'<dtml-var sequence-item>\'</dtml-in>)\n
<dtml-if selection_report>\n
AND <dtml-var "selection_report.asSqlExpression(strict_membership=1)">\n
</dtml-if>\n
\n
<dtml-if group_by_expression>\n
GROUP BY <dtml-var group_by_expression>\n
</dtml-if>\n
\n
<dtml-if order_by_expression>\n
ORDER BY\n
<dtml-var order_by_expression>\n
<dtml-else>\n
ORDER BY item.date DESC\n
</dtml-if>
]]></string> </value>
</item>
......@@ -396,44 +488,75 @@ AND (<dtml-in simulation_state_list><dtml-unless sequence-start> OR </dtml-unles
SELECT \n
item.aggregate_uid AS uid,\n
catalog.path AS path,\n
item_catalog.path AS path,\n
item.date AS date,\n
item.node_uid AS node_uid,\n
item.section_uid AS section_uid,\n
item.resource_uid AS resource_uid,\n
item.variation_text AS variation_text\n
item.variation_text AS variation_text,\n
item.uid AS delivery_uid\n
FROM\n
catalog, item\n
LEFT JOIN \n
catalog as item_catalog\n
<dtml-if from_table_list>\n
<dtml-in prefix="table" expr="from_table_list"> \n
<dtml-if expr="table_key != \'item\'">, <dtml-var table_item> AS <dtml-var table_key></dtml-if>\n
</dtml-in>\n
</dtml-if>\n
<dtml-if selection_domain>, <dtml-var "selection_domain.asSqlJoinExpression()"> </dtml-if>\n
<dtml-if selection_report>, <dtml-var "selection_report.asSqlJoinExpression()"> </dtml-if>\n
, item\n
\n
\n
<dtml-if join_on_item>\n
LEFT JOIN \n
item AS next_item\n
ON\n
(next_item.date <= <dtml-sqlvar at_date type="string">\n
AND \n
ON (\n
<dtml-if date_condition_in_join>\n
next_item.date <= <dtml-sqlvar at_date type="string">\n
AND\n
</dtml-if>\n
next_item.aggregate_uid = item.aggregate_uid\n
AND\n
AND\n
<dtml-if input>\n
next_item.date < item.date\n
<dtml-else>\n
next_item.date > item.date\n
</dtml-if>\n
)\n
</dtml-if>\n
\n
WHERE\n
catalog.uid = item.aggregate_uid\n
AND\n
next_item.uid IS NULL\n
AND\n
item.node_uid = <dtml-sqlvar node_uid type="int">\n
AND\n
item.date <= <dtml-sqlvar at_date type="string">\n
<dtml-if section_uid_list>\n
AND (<dtml-in section_uid_list><dtml-unless sequence-start> OR </dtml-unless>item.section_uid=\'<dtml-var sequence-item>\'</dtml-in>)\n
1 = 1\n
\n
<dtml-if where_expression>\n
AND <dtml-var where_expression>\n
</dtml-if>\n
<dtml-if portal_type_list>\n
AND (<dtml-in portal_type_list><dtml-unless sequence-start> OR </dtml-unless>item.portal_type=\'<dtml-var sequence-item>\'</dtml-in>)\n
\n
AND item_catalog.uid = item.aggregate_uid\n
\n
<dtml-if join_on_item>\n
AND next_item.uid IS NULL\n
</dtml-if>\n
<dtml-if variation_text_list>\n
AND (<dtml-in variation_text_list><dtml-unless sequence-start> OR </dtml-unless>item.variation_text=\'<dtml-var sequence-item>\'</dtml-in>)\n
\n
\n
<dtml-if selection_domain>\n
AND <dtml-var "selection_domain.asSqlExpression(join_table=\'item\',\n
join_column=\'node_uid\')">\n
</dtml-if>\n
<dtml-if simulation_state_list>\n
AND (<dtml-in simulation_state_list><dtml-unless sequence-start> OR </dtml-unless>item.simulation_state=\'<dtml-var sequence-item>\'</dtml-in>)\n
<dtml-if selection_report>\n
AND <dtml-var "selection_report.asSqlExpression(strict_membership=1)">\n
</dtml-if>\n
\n
<dtml-if group_by_expression>\n
GROUP BY <dtml-var group_by_expression>\n
</dtml-if>\n
\n
<dtml-if order_by_expression>\n
ORDER BY\n
<dtml-var order_by_expression>\n
<dtml-else>\n
ORDER BY item.date DESC\n
</dtml-if>
]]></string> </value>
</item>
......
......@@ -68,7 +68,8 @@
<key> <string>_body</string> </key>
<value> <string>from Products.Formulator.Errors import ValidationError, FormValidationError\n
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
\n
portal = context.getPortalObject()\n
N_ = portal.Base_translateString\n
request=context.REQUEST\n
\n
try:\n
......@@ -100,9 +101,10 @@ try:\n
context,\n
kw[\'workflow_action\'],\n
**kw)\n
\n
redirect_url = \'%s/%s?%s\' % ( context.absolute_url(), form_id\n
, \'portal_status_message=Status+changed.\' )\n
message = N_(\'Status+changed.\')\n
redirect_url = \'%s/%s?portal_status_message=%s\' % ( \n
context.absolute_url(), form_id,\n
message)\n
\n
except FormValidationError, validation_errors:\n
# Pack errors into the request\n
......@@ -111,6 +113,7 @@ except FormValidationError, validation_errors:\n
return form(request)\n
\n
except ValidationFailed, error_message:\n
# I hope the error_message is already translated (if we need to use mapping)\n
redirect_url = \'%s/%s?%s\' % ( context.absolute_url(), form_id\n
, \'portal_status_message=%s\' % error_message\n
)\n
......@@ -165,6 +168,8 @@ context.REQUEST[ \'RESPONSE\' ].redirect( redirect_url )\n
<string>ValidationFailed</string>
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
<string>N_</string>
<string>request</string>
<string>getattr</string>
<string>form</string>
......@@ -183,6 +188,7 @@ context.REQUEST[ \'RESPONSE\' ].redirect( redirect_url )\n
<string>listbox_line</string>
<string>tuple</string>
<string>_apply_</string>
<string>message</string>
<string>redirect_url</string>
<string>validation_errors</string>
<string>field_errors</string>
......
2006-03-03 Seb
* Commit Guillaume's fix to Resource_zGetTrackingList
2006-03-02 romain
* Correct Folder_paste.
2006-02-28 aurel
* add Domain Generator Method field in BaseDomain_view
* modify ERP5Site_reindexAll to reindex domains
......
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