Commit 1f8ba1ae authored by Ivan Tyagov's avatar Ivan Tyagov

Improve code indentation.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22651 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ab966168
......@@ -106,9 +106,8 @@ def getActionTitleForContext(context, portal_type):\n
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 @@ if not request.form.get(\'editable_mode\', 0):\n
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 @@ return result\n
<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>
......
......@@ -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 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"><input class="input" size="12" type="text" name="clone_reference"\n
tal:attributes="value here/getReference | nothing"/></div>\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"><input class="input" size="5" type="text" name="clone_version"\n
tal:attributes="value here/getVersion | nothing"/></div>\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"><input class="input" size="5" type="text" name="clone_language"\n
tal:attributes="value here/getLanguage | nothing"/></div>\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" size="1" onchange="setCreationMode(this)">\n
<option value="None" selected>&mdash; Same as Current &mdash;</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 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>&mdash; Same as Current &mdash;</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 &amp; Edit\' id="clone_action_button" title=\'Clone &amp; 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 &amp; Edit</span>\n
</button>\n
</div>\n
<div class="field hiddenLabel">\n
<label> </label>\n
<div class="input">\n
<button alt=\'Clone &amp; Edit\' id="clone_action_button" \n
title=\'Clone &amp; 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 &amp; Edit</span>\n
</button>\n
</div>\n
</div>\n
\n
</fieldset>\n
\n
......
681
\ No newline at end of file
682
\ No newline at end of file
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