[Erp5-report] r22651 - in /erp5/trunk/bt5/erp5_web: SkinTemplateItem/portal_skins/erp5_web_...
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Jul 25 11:12:48 CEST 2008
Author: ivan
Date: Fri Jul 25 11:12:47 2008
New Revision: 22651
URL: http://svn.erp5.org?rev=22651&view=rev
Log:
Improve code indentation.
Modified:
erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/Base_getAdminToolboxEditShortcutList.xml
erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/admin_toolbox.xml
erp5/trunk/bt5/erp5_web/bt/revision
Modified: erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/Base_getAdminToolboxEditShortcutList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/Base_getAdminToolboxEditShortcutList.xml?rev=22651&r1=22650&r2=22651&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/Base_getAdminToolboxEditShortcutList.xml (original)
+++ erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/Base_getAdminToolboxEditShortcutList.xml Fri Jul 25 11:12:47 2008
@@ -106,9 +106,8 @@
return edit_title\n
\n
# Append a button to edit the current document\n
-if not request.form.get(\'editable_mode\', 0):\n
+if not bool(request.get(\'editable_mode\', 0)):\n
# The title is called Edit only if the document can be edited\n
-\n
if portal_type == \'Web Section\' and context.getDefaultDocumentValue() is not None:\n
# try to show link to default page\n
default_document = context.getDefaultDocumentValue()\n
@@ -129,7 +128,6 @@
icon = context.getIcon() or \'file_icon.gif\',\n
title = edit_title,\n
label = "%s Icon" % portal_type,))\n
-\n
else: \n
result.append(dict(\n
url = "%s/view?editable_mode:int=0&%s" % (absolute_url, http_parameters),\n
@@ -235,6 +233,7 @@
<string>getattr</string>
<string>editable_absolute_url</string>
<string>getActionTitleForContext</string>
+ <string>bool</string>
<string>None</string>
<string>default_document</string>
<string>edit_title</string>
Modified: erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/admin_toolbox.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/admin_toolbox.xml?rev=22651&r1=22650&r2=22651&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/admin_toolbox.xml (original)
+++ erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/admin_toolbox.xml Fri Jul 25 11:12:47 2008
@@ -66,7 +66,10 @@
actions request/actions | python:\n
here.Base_filterDuplicateActions(\n
here.portal_actions.listFilteredActionsFor(here));\n
- dummy python:request.set(\'actions\', actions);">\n
+ dummy python:request.set(\'actions\', actions);\n
+ is_default_document_available \n
+ python: getattr(here,\'getDefaultDocumentValue\', None) is not None and\n
+ here.getDefaultDocumentValue() is not None;">\n
\n
<!-- XXX is this really useful - called how many times ?? - tried to removed but failed -->\n
<!-- <tal:block metal:use-macro="here/global_definitions/macros/header_definitions"/> -->\n
@@ -107,64 +110,83 @@
Behaviour should be to create content in section / site\n
-->\n
<div name="adminSection" class="adminSection"\n
- tal:condition="here/isDocument | python: (portal_type in [\'Web Site\', \'Web Section\']\n
- and here.getDefaultWebPageValue() is not None)">\n
-\n
+ tal:condition="python: is_default_document_available or here.isDocument"\n
+ tal:define="document python: test(is_default_document_available, \n
+ here.getDefaultDocumentValue(), \n
+ here);\n
+ portal_type document/getPortalType;">\n
<h3>\n
<span id="create_new_document_title"></span>\n
- <span id="clone_document_title"><tal:block tal:replace="python: \'Clone %s %s\' % ((portal_type in [\'Web Site\', \'Web Section\'] and \'Default\') or \'Current\', portal_type)"/></span>\n
+ <span id="clone_document_title">\n
+ <tal:block \n
+ tal:replace="python: \'Clone %s %s\' % \n
+ ((portal_type in [\'Web Site\', \'Web Section\'] and \'Default\') or \'Current\', portal_type)"/>\n
+ </span>\n
</h3>\n
\n
<fieldset style="display:block;">\n
- <!--legend class="group_title">left</legend-->\n
-\n
- <div class="field">\n
- <label>Title</label>\n
- <div class="input"><input class="input" size="12" type="text" name="clone_title"\n
- tal:attributes="value here/getTitle | nothing"/></div>\n
- </div>\n
-\n
- <div class="field">\n
- <label>Reference</label>\n
- <div class="input"><input class="input" size="12" type="text" name="clone_reference"\n
- tal:attributes="value here/getReference | nothing"/></div>\n
- </div>\n
-\n
- <div class="field">\n
- <label>Version</label>\n
- <div class="input"><input class="input" size="5" type="text" name="clone_version"\n
- tal:attributes="value here/getVersion | nothing"/></div>\n
- </div>\n
-\n
- <div class="field">\n
- <label>Language</label>\n
- <div class="input"><input class="input" size="5" type="text" name="clone_language"\n
- tal:attributes="value here/getLanguage | nothing"/></div>\n
- </div>\n
-\n
- <div class="field hiddenLabel">\n
- <label>Type</label>\n
- <div class="input">\n
- <select class="input" name="clone_portal_type" size="1" onchange="setCreationMode(this)">\n
- <option value="None" selected>— Same as Current —</option>\n
- <tal:block tal:repeat="portal_type python: here.getPortalWebDocumentTypeList()">\n
- <option tal:content="portal_type"\n
- tal:attributes="value portal_type"/>\n
- </tal:block>\n
- </select>\n
- </div>\n
- </div>\n
-\n
- <div class="field hiddenLabel">\n
- <label> </label>\n
- <div class="input">\n
- <button alt=\'Clone & Edit\' id="clone_action_button" title=\'Clone & Edit\'\n
- name="Base_cloneContent:method">\n
- <img src="admin_toolbox_clone_document.png" id="clone_action_icon"/>\n
- <span id="duplicate_document_action">Clone & Edit</span>\n
- </button>\n
- </div>\n
- </div>\n
+\n
+ <div class="field">\n
+ <label>Title</label>\n
+ <div class="input">\n
+ <input class="input" size="12" \n
+ type="text" name="clone_title"\n
+ tal:attributes="value document/getTitle | nothing"/>\n
+ </div>\n
+ </div>\n
+\n
+ <div class="field">\n
+ <label>Reference</label>\n
+ <div class="input">\n
+ <input class="input" size="12" \n
+ type="text" name="clone_reference"\n
+ tal:attributes="value document/getReference | nothing"/>\n
+ </div>\n
+ </div>\n
+\n
+ <div class="field">\n
+ <label>Version</label>\n
+ <div class="input">\n
+ <input class="input" size="5" \n
+ type="text" name="clone_version"\n
+ tal:attributes="value document/getVersion | nothing"/>\n
+ </div>\n
+ </div>\n
+\n
+ <div class="field">\n
+ <label>Language</label>\n
+ <div class="input">\n
+ <input class="input" size="5" \n
+ type="text" name="clone_language"\n
+ tal:attributes="value document/getLanguage | nothing"/>\n
+ </div>\n
+ </div>\n
+\n
+ <div class="field hiddenLabel">\n
+ <label>Type</label>\n
+ <div class="input">\n
+ <select class="input" name="clone_portal_type" \n
+ size="1" onchange="setCreationMode(this)">\n
+ <option value="None" selected>— Same as Current —</option>\n
+ <tal:block tal:repeat="portal_type python: here.getPortalWebDocumentTypeList()">\n
+ <option tal:content="portal_type"\n
+ tal:attributes="value portal_type"/>\n
+ </tal:block>\n
+ </select>\n
+ </div>\n
+ </div>\n
+\n
+ <div class="field hiddenLabel">\n
+ <label> </label>\n
+ <div class="input">\n
+ <button alt=\'Clone & Edit\' id="clone_action_button" \n
+ title=\'Clone & Edit\'\n
+ name="Base_cloneContent:method">\n
+ <img src="admin_toolbox_clone_document.png" id="clone_action_icon"/>\n
+ <span id="duplicate_document_action">Clone & Edit</span>\n
+ </button>\n
+ </div>\n
+ </div>\n
\n
</fieldset>\n
\n
Modified: erp5/trunk/bt5/erp5_web/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web/bt/revision?rev=22651&r1=22650&r2=22651&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web/bt/revision (original)
+++ erp5/trunk/bt5/erp5_web/bt/revision Fri Jul 25 11:12:47 2008
@@ -1,1 +1,1 @@
-681
+682
More information about the Erp5-report
mailing list