From fc1c0a7d55287351a18c791c112ca8c682bcf162 Mon Sep 17 00:00:00 2001 From: Christophe Dumez <christophe@nexedi.com> Date: Wed, 12 Apr 2006 15:43:20 +0000 Subject: [PATCH] fixed infos and history for newly added files git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6564 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../erp5_svn/BusinessTemplate_viewSvnInfosFile.xml | 6 ++++++ .../SkinTemplateItem/portal_skins/erp5_svn/svn_log.xml | 3 +++ .../SkinTemplateItem/portal_skins/erp5_svn/svn_ls.xml | 7 +++++-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnInfosFile.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnInfosFile.xml index 1ce9291f42..ac1f5ab55c 100644 --- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnInfosFile.xml +++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_viewSvnInfosFile.xml @@ -57,9 +57,11 @@ \n <tal:block tal:define="path context/file;\n infos_dict context/infos_dict">\n +\n <font color=\'black\'>\n <br><a tal:attributes="href python:\'BusinessTemplate_viewSvnShowFile?file=\'+str(path)"><b tal:content="path"></b></a>\n <a tal:attributes="href context/edit_path"><img src=\'imgs/edit.png\' border=\'0\'></a><hr><br>\n +<span tal:condition="infos_dict">\n <table width=60%% border=1>\n <tr height="18px"><td style=\'background-color: rgb(204, 204, 255);\'><b>Name</b></td><td style=\'background-color: white;\' tal:content="python:path.split(\'/\')[-1]">filename</td></tr>\n <tr height="18px"><td style=\'background-color: rgb(204, 204, 255);\'><b>Size</b></td><td style=\'background-color: white;\' tal:content="python:infos_dict[\'size\']/1024.">filesize</td></tr>\n @@ -68,6 +70,10 @@ <tr height="18px"><td style=\'background-color: rgb(204, 204, 255);\'><b>Last Change Author</b></td><td style=\'background-color: white;\' tal:content="python:infos_dict[\'last_author\']">last author</td></tr>\n <tr height="18px"><td style=\'background-color: rgb(204, 204, 255);\'><b>Last Change Date</b></td><td style=\'background-color: white;\' tal:content="python:infos_dict[\'time\']">last date</td></tr>\n </table>\n +</span>\n +<span tal:condition="not:infos_dict">\n + No informations for this file since it\'s not yet committed to the repository !\n +</span>\n </font>\n <br><br>\n <center><button onclick="history.back()" value="back" name="back" type="button">Back</button>\n diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_log.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_log.xml index 164f828763..e8f1e96c25 100644 --- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_log.xml +++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_log.xml @@ -85,6 +85,9 @@ except SubversionLoginError, error1 :\n context.REQUEST.set(\'portal_status_message\', \'Server needs authentication, no cookie found\')\n return context.asContext(caller=\'log\', 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 diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_ls.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_ls.xml index 1b873a7a97..483e8e1060 100644 --- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_ls.xml +++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_ls.xml @@ -82,8 +82,10 @@ except SubversionSSLTrustError, error:\n except SubversionLoginError, error1 :\n context.REQUEST.set(\'portal_status_message\', \'Server needs authentication, no cookie found\')\n return context.asContext(caller=\'ls\', realm = error1.getRealm(), username = context.getPortalObject().portal_preferences.getPreference(\'preferred_subversion_user_name\')).BusinessTemplate_viewSvnLogin()\n -\n -return context.asContext(infos_dict=infos_list[0], file=file, edit_path=context.getPortalObject()["portal_subversion"].editPath(context, file)).BusinessTemplate_viewSvnInfosFile()\n +if infos_list:\n + return context.asContext(infos_dict=infos_list[0], file=file, edit_path=context.getPortalObject()["portal_subversion"].editPath(context, file)).BusinessTemplate_viewSvnInfosFile()\n +else:\n + return context.asContext(infos_dict=False, file=file, edit_path=context.getPortalObject()["portal_subversion"].editPath(context, file)).BusinessTemplate_viewSvnInfosFile()\n </string> </value> </item> <item> @@ -135,6 +137,7 @@ return context.asContext(infos_dict=infos_list[0], file=file, edit_path=context. <string>infos_list</string> <string>error</string> <string>error1</string> + <string>False</string> </tuple> </value> </item> -- 2.30.9