[Erp5-report] r7159 - in /erp5/trunk/bt5/erp5_forge: ActionTemplateItem/portal_types/Templa...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed May 10 17:42:31 CEST 2006


Author: chris
Date: Wed May 10 17:42:26 2006
New Revision: 7159

URL: http://svn.erp5.org?rev=7159&view=rev
Log:
- You can now view a bt svn history directly from portal_templates (action entry)
- code clean for svn log

Added:
    erp5/trunk/bt5/erp5_forge/ActionTemplateItem/portal_types/Template%20Tool/
    erp5/trunk/bt5/erp5_forge/ActionTemplateItem/portal_types/Template%20Tool/bt_svn_history.xml
    erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_doSvnLogGlobal.xml
Modified:
    erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_doSvnLog.xml
    erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnStatus.xml
    erp5/trunk/bt5/erp5_forge/bt/template_action_path_list

Added: erp5/trunk/bt5/erp5_forge/ActionTemplateItem/portal_types/Template%20Tool/bt_svn_history.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/ActionTemplateItem/portal_types/Template%2520Tool/bt_svn_history.xml?rev=7159&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_forge/ActionTemplateItem/portal_types/Template%20Tool/bt_svn_history.xml (added)
+++ erp5/trunk/bt5/erp5_forge/ActionTemplateItem/portal_types/Template%20Tool/bt_svn_history.xml Wed May 10 17:42:26 2006
@@ -1,0 +1,93 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.CMFCore.ActionInformation</string>
+          <string>ActionInformation</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>action</string> </key>
+            <value>
+              <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+            </value>
+        </item>
+        <item>
+            <key> <string>category</string> </key>
+            <value> <string>object_action</string> </value>
+        </item>
+        <item>
+            <key> <string>condition</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>icon</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>bt_svn_history</string> </value>
+        </item>
+        <item>
+            <key> <string>optional</string> </key>
+            <value> <int>0</int> </value>
+        </item>
+        <item>
+            <key> <string>permissions</string> </key>
+            <value>
+              <tuple>
+<string></string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>priority</string> </key>
+            <value> <float>9.0</float> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string>View SVN History</string> </value>
+        </item>
+        <item>
+            <key> <string>visible</string> </key>
+            <value> <int>1</int> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.CMFCore.Expression</string>
+          <string>Expression</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>text</string> </key>
+            <value> <string>string:${object_url}/BusinessTemplate_doSvnLogGlobal</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_doSvnLog.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_doSvnLog.xml?rev=7159&r1=7158&r2=7159&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_doSvnLog.xml (original)
+++ erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_doSvnLog.xml Wed May 10 17:42:26 2006
@@ -91,12 +91,8 @@
   temp_object.edit(**my_dict)\n
   object_list.append(temp_object)\n
 \n
-#return object_list\n
 context.REQUEST.set(\'object_list\', object_list)\n
 return context.BusinessTemplate_viewSvnLog()\n
-return context.REQUEST.RESPONSE.redirect(context.absolute_url()+\'/BusinessTemplate_viewSvnLog\')\n
-return context.asContext(object_list=object_list).BusinessTemplate_viewSvnLog() # Working "here.object_list"\n
-#return context.BusinessTemplate_viewSvnLog()\n
 
 
 ]]></string> </value>

Added: erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_doSvnLogGlobal.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_doSvnLogGlobal.xml?rev=7159&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_doSvnLogGlobal.xml (added)
+++ erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_doSvnLogGlobal.xml Wed May 10 17:42:26 2006
@@ -1,0 +1,201 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.PythonScripts.PythonScript</string>
+          <string>PythonScript</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Python_magic</string> </key>
+            <value> <string encoding="base64">bfINCg==</string> </value>
+        </item>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string encoding="cdata"><![CDATA[
+
+from Products.ERP5Subversion.SubversionClient import SubversionSSLTrustError, SubversionLoginError\n
+from Products.ERP5Type.Document import newTempBase\n
+\n
+# get selected business templates\n
+p = context.getPortalObject()\n
+portal_selections = p.portal_selections\n
+selection_name = \'business_template_selection\' # harcoded because we can also get delete_selection\n
+uids = portal_selections.getSelectionCheckedUidsFor(selection_name)\n
+\n
+if len(uids) != 1:\n
+  raise \'TemplateConditionError\', \'You can select only one Business Template\'\n
+\n
+file = context.portal_catalog.getObject(uids[0]).getTitle()\n
+\n
+try:\n
+  log_list = context.getPortalObject()["portal_subversion"].log(file, context.portal_catalog.getObject(uids[0]))\n
+except SubversionSSLTrustError, error:\n
+  context.REQUEST.set(\'portal_status_message\', \'SSL Certificate was not recognized\')\n
+  return context.asContext(trust_dict = error.getTrustDict(), caller=\'log\', file=file).BusinessTemplate_viewSvnSSLTrust()\n
+except SubversionLoginError, error1 :\n
+  context.REQUEST.set(\'portal_status_message\', \'Server needs authentication, no cookie found\')\n
+  return context.asContext(caller=\'log\', file=file, realm = error1.getRealm(), username = context.getPortalObject().portal_preferences.getPreference(\'preferred_subversion_user_name\')).BusinessTemplate_viewSvnLogin()\n
+\n
+if not log_list:\n
+  return []\n
+\n
+object_list = []\n
+for my_dict in log_list:\n
+  my_dict[\'message\']=\'<br>\'.join(my_dict[\'message\'].split(\'\\n\'))\n
+  my_dict[\'uid\']=my_dict[\'revision\']\n
+  temp_object = newTempBase(folder=context.getPortalObject(), id=\'1234\')\n
+  temp_object.edit(**my_dict)\n
+  object_list.append(temp_object)\n
+\n
+context.REQUEST.set(\'object_list\', object_list)\n
+context.REQUEST.set(\'file\', file)\n
+return context.asContext(context=context.portal_catalog.getObject(uids[0])).BusinessTemplate_viewSvnLog()\n
+
+
+]]></string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value> <string>Script (Python):/erp5/portal_skins/erp5_svn/BusinessTemplate_doSvnLogGlobal</string> </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>**kw</string> </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>0</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>kw</string>
+                            <string>Products.ERP5Subversion.SubversionClient</string>
+                            <string>SubversionSSLTrustError</string>
+                            <string>SubversionLoginError</string>
+                            <string>Products.ERP5Type.Document</string>
+                            <string>newTempBase</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>p</string>
+                            <string>portal_selections</string>
+                            <string>selection_name</string>
+                            <string>uids</string>
+                            <string>len</string>
+                            <string>_getitem_</string>
+                            <string>file</string>
+                            <string>log_list</string>
+                            <string>error</string>
+                            <string>error1</string>
+                            <string>object_list</string>
+                            <string>_getiter_</string>
+                            <string>my_dict</string>
+                            <string>_write_</string>
+                            <string>temp_object</string>
+                            <string>_apply_</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>BusinessTemplate_doSvnLogGlobal</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnStatus.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnStatus.xml?rev=7159&r1=7158&r2=7159&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnStatus.xml (original)
+++ erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnStatus.xml Wed May 10 17:42:26 2006
@@ -76,6 +76,7 @@
 <input type=\'hidden\' name=\'modified\' value=\'\'>\n
 <input type=\'hidden\' name=\'files\' value=\'\'>\n
 <!-- End Hidden -->\n
+\n
 <div id="menudiv" style="position:absolute; display:none; top:0px; left:0px;z-index:10000;" onmouseover="javascript:overpopupmenu=true;" onmouseout="javascript:overpopupmenu=false;">\n
 <table width=82 cellspacing=1 cellpadding=0 bgcolor=lightgray>\n
   <tr><td>\n

Modified: erp5/trunk/bt5/erp5_forge/bt/template_action_path_list
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/bt/template_action_path_list?rev=7159&r1=7158&r2=7159&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_forge/bt/template_action_path_list (original)
+++ erp5/trunk/bt5/erp5_forge/bt/template_action_path_list Wed May 10 17:42:26 2006
@@ -16,5 +16,6 @@
 External Folder | print
 External Folder | view
 Preference | subversion
+Template Tool | bt_svn_history
 Upload Module | list
 Upload Module | view




More information about the Erp5-report mailing list