From 3d76849404ebba91f87068d548614f51f357241a Mon Sep 17 00:00:00 2001
From: Ayush <ayush.tiwari@nexedi.com>
Date: Thu, 20 Sep 2018 11:38:31 +0200
Subject: [PATCH] DiffTool: Fixup default date time display in case we run diff
 action on an object

View wise, the date and path for new version/obvject should be on right side which
in our case is `your_second_date`. Thus, the case where we run diff action on single
object, the right side should show the current version and the left side shoule show
the last version.
---
 .../your_first_date.xml                       | 26 ++++++++++++++++++-
 .../your_second_date.xml                      | 26 +------------------
 2 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/ERP5Site_viewDiffTwoObjectDialog/your_first_date.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/ERP5Site_viewDiffTwoObjectDialog/your_first_date.xml
index 4531cd28b4..5f4e0f357e 100644
--- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/ERP5Site_viewDiffTwoObjectDialog/your_first_date.xml
+++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/ERP5Site_viewDiffTwoObjectDialog/your_first_date.xml
@@ -10,6 +10,7 @@
             <key> <string>delegated_list</string> </key>
             <value>
               <list>
+                <string>default</string>
                 <string>items</string>
                 <string>title</string>
               </list>
@@ -49,6 +50,12 @@
             <key> <string>tales</string> </key>
             <value>
               <dictionary>
+                <item>
+                    <key> <string>default</string> </key>
+                    <value>
+                      <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+                    </value>
+                </item>
                 <item>
                     <key> <string>field_id</string> </key>
                     <value> <string></string> </value>
@@ -60,7 +67,7 @@
                 <item>
                     <key> <string>items</string> </key>
                     <value>
-                      <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+                      <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
                     </value>
                 </item>
                 <item>
@@ -74,6 +81,10 @@
             <key> <string>values</string> </key>
             <value>
               <dictionary>
+                <item>
+                    <key> <string>default</string> </key>
+                    <value> <string></string> </value>
+                </item>
                 <item>
                     <key> <string>field_id</string> </key>
                     <value> <string>my_list_field</string> </value>
@@ -99,6 +110,19 @@
     </pickle>
   </record>
   <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <global name="TALESMethod" module="Products.Formulator.TALESField"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_text</string> </key>
+            <value> <string>python: context.Base_getDefaultRevisionDate()</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="3" aka="AAAAAAAAAAM=">
     <pickle>
       <global name="TALESMethod" module="Products.Formulator.TALESField"/>
     </pickle>
diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/ERP5Site_viewDiffTwoObjectDialog/your_second_date.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/ERP5Site_viewDiffTwoObjectDialog/your_second_date.xml
index 771180663f..192a611ddb 100644
--- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/ERP5Site_viewDiffTwoObjectDialog/your_second_date.xml
+++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_diff/ERP5Site_viewDiffTwoObjectDialog/your_second_date.xml
@@ -10,7 +10,6 @@
             <key> <string>delegated_list</string> </key>
             <value>
               <list>
-                <string>default</string>
                 <string>items</string>
                 <string>title</string>
               </list>
@@ -50,12 +49,6 @@
             <key> <string>tales</string> </key>
             <value>
               <dictionary>
-                <item>
-                    <key> <string>default</string> </key>
-                    <value>
-                      <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
-                    </value>
-                </item>
                 <item>
                     <key> <string>field_id</string> </key>
                     <value> <string></string> </value>
@@ -67,7 +60,7 @@
                 <item>
                     <key> <string>items</string> </key>
                     <value>
-                      <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
+                      <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
                     </value>
                 </item>
                 <item>
@@ -81,10 +74,6 @@
             <key> <string>values</string> </key>
             <value>
               <dictionary>
-                <item>
-                    <key> <string>default</string> </key>
-                    <value> <string></string> </value>
-                </item>
                 <item>
                     <key> <string>field_id</string> </key>
                     <value> <string>my_list_field</string> </value>
@@ -110,19 +99,6 @@
     </pickle>
   </record>
   <record id="2" aka="AAAAAAAAAAI=">
-    <pickle>
-      <global name="TALESMethod" module="Products.Formulator.TALESField"/>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <item>
-            <key> <string>_text</string> </key>
-            <value> <string>python: context.Base_getDefaultRevisionDate()</string> </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-  <record id="3" aka="AAAAAAAAAAM=">
     <pickle>
       <global name="TALESMethod" module="Products.Formulator.TALESField"/>
     </pickle>
-- 
2.30.9