Commit fef423b7 authored by Kevin Deldycke's avatar Kevin Deldycke

Minor BT format changes.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10135 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6fda9951
......@@ -87,7 +87,7 @@ IGNORED_FORM_ID_LIST = [ \\\n
, \'x\', \'y\'\n
# custom forms field ids\n
, \'new_portal_type\', \'destination_section\'\n
]\n
]\n
\n
directory = context.restrictedTraverse(context.getRelativeUrl()).getParent()\n
creation_mode = form_data[\'document_action_mode\']\n
......
......@@ -66,7 +66,7 @@
, \'admin_tool_duplicate_document\'\n
, \'admin_tool_duplicate_section\'\n
, \'admin_tool_debug\'\n
]">\n
]">\n
-->\n
<tal:block metal:use-macro="here/global_definitions/macros/header_definitions"/>\n
\n
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PageTemplates.ZopePageTemplate</string>
<string>ZopePageTemplate</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
<tal:block metal:define-macro="master">\n
\n
<h3>Debug Menu</h3>\n
\n
<ul>\n
\n
<li>\n
<pre>\n
<tal:block tal:content="python: \'is_edit_mode = \' + repr(is_edit_mode)" />\n
<tal:block tal:content="python: \'is_section = \' + repr(is_section)" />\n
<tal:block tal:content="python: \'is_webdoc = \' + repr(is_webdoc)" />\n
<tal:block tal:content="python: \'is_portal_root = \' + repr(is_portal_root)" />\n
<tal:block tal:content="python: \'valid_default_doc = \' + repr(valid_default_doc)"/>\n
</pre>\n
</li>\n
\n
<li>\n
<a tal:attributes="href python: \'%s/view?ignore_layout=1\' % context.WebSite_getSection();"\n
><img src="pictures/section.png"/> Edit <tal:block tal:content="python: (is_webdoc and \'Parent \') or \'Current \'"/>Section in ERP5</a>\n
</li>\n
\n
<li tal:condition="python: (is_section and valid_default_doc and not is_edit_mode) or is_webdoc">\n
<a tal:attributes="href python: \'%s/view?ignore_layout=1\' % context.WebSite_getDocumentPhysicalPath();"\n
><img src="pictures/webpage.png" tal:attributes="src string:${portal_url}/pictures/webpage.png"/> Edit <tal:block tal:content="python: (is_section and \'Default \') or \'Current \'"/>Page in ERP5</a>\n
</li>\n
\n
</ul>\n
\n
</tal:block>\n
]]></string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>admin_tool_debug</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PageTemplates.ZopePageTemplate</string>
<string>ZopePageTemplate</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
<tal:block metal:define-macro="master"\n
tal:define="document context/WebSite_getDocumentValue;"\n
tal:condition="python: (is_section and valid_default_doc and not is_edit_mode) or is_webdoc">\n
\n
<form name="tool_create" method="post" action="WebSite_newContent">\n
\n
<input id="document_action_mode" name="document_action_mode" value="clone" type="hidden"/>\n
\n
<h3>\n
<span id="create_new_document_title"></span>\n
<span id="clone_document_title">Clone <tal:block tal:content="python: (is_section and \'Default \') or \'Current \'"/>Page</span>\n
</h3>\n
\n
<table cellspacing="1" cellpadding="0" border="0">\n
<tr>\n
<td>Title</td>\n
<td><input class="input" size="20" type="text" name="title" tal:attributes="value document/getTitle | nothing"/></td>\n
</tr>\n
<tr>\n
<td>Page URI</td>\n
<td><input class="input" size="20" type="text" name="reference" tal:attributes="value document/getReference | nothing"/></td>\n
</tr>\n
<tr>\n
<td>Version</td>\n
<td><input class="input" size="5" type="text" name="version" tal:attributes="value document/getVersion | nothing"/></td>\n
</tr>\n
<tr>\n
<td>Language</td>\n
<td><input class="input" size="5" type="text" name="language" tal:attributes="value document/getLanguage | nothing"/></td>\n
<!--select name="language" size="1"\n
tal:define="language_map python: here.Localizer.get_languages_map()">\n
<tal:block tal:repeat="language language_map">\n
<tal:block tal:condition="python: document.getLanguage() == language[\'id\'] or language[\'selected\']">\n
<option tal:attributes="value language/id"\n
tal:content="language/id"\n
selected/>\n
</tal:block>\n
<tal:block tal:condition="python: not(document.getLanguage() == language[\'id\'] or language[\'selected\'])">\n
<option tal:attributes="value language/id"\n
tal:content="language/id"/>\n
</tal:block>\n
</tal:block>\n
</select-->\n
</tr>\n
\n
<script type="text/javascript" language="JavaScript">\n
<!--\n
// preload action icons\n
if (document.images) {\n
clone_icon = new Image();\n
new_icon = new Image();\n
clone_icon.src = "pictures/clone-document.png";\n
new_icon.src = "pictures/new-document.png";\n
}\n
\n
function setCreationMode (sel) {\n
// default is cloning\n
var action = \'clone\';\n
var action_name = \'Clone &amp; Edit\';\n
var icon = \'clone-document.png\';\n
var clone_class = \'\';\n
var new_title = \'\';\n
\n
// a portal type is given, so create a new document\n
var portal_type = sel.options[sel.selectedIndex].value;\n
if (portal_type != \'None\') {\n
action = \'new\'\n
action_name = \'Create New &amp; Edit\';\n
icon = \'new-document.png\';\n
clone_class = \'doNotDisplay\';\n
new_title = \'Create New Document\';\n
}\n
\n
// update action dependent values\n
document.getElementById(\'document_action_mode\' ).value = action;\n
document.getElementById(\'create_new_document_title\').innerHTML = new_title;\n
document.getElementById(\'clone_document_title\' ).className = clone_class;\n
document.getElementById(\'duplicate_document_action\').innerHTML = action_name;\n
\n
// replace the action icon\n
document.getElementById(\'clone_action_icon\').src = eval(action + "_icon.src");\n
\n
// update action button alt & title\n
var button = document.getElementById(\'clone_action_button\');\n
button.alt = action_name;\n
button.title = action_name;\n
}\n
-->\n
</script>\n
\n
<tr>\n
<td>Type</td>\n
<td>\n
<select class="input" name="new_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.portal_types.objectValues()">\n
<option tal:condition="python: \'web_document\' in getattr(portal_type, \'group_list\', [])"\n
tal:content="portal_type/id"\n
tal:attributes="value portal_type/id"/>\n
</tal:block>\n
</select>\n
</td>\n
</tr>\n
<tr>\n
<td colspan="2" class="centeredInner">\n
<button alt=\'Clone &amp; Edit\' id="clone_action_button" title=\'Clone &amp; Edit\'><img src="pictures/clone-document.png" id="clone_action_icon"/> <span id="duplicate_document_action">Clone &amp; Edit</span></button>\n
<!--input type="image" alt="Clone &amp; Edit" title="Clone &amp; Edit" src="pictures/clone-document.png" id="clone_action_icon"/> <span id="duplicate_document_action">Clone &amp; Edit</span-->\n
</td>\n
</tr>\n
</table>\n
\n
</form>\n
\n
</tal:block>
]]></string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>admin_tool_duplicate_document</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PageTemplates.ZopePageTemplate</string>
<string>ZopePageTemplate</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
<tal:block metal:define-macro="master">\n
\n
<h3>Edit</h3>\n
\n
<ul>\n
\n
<!--li tal:condition="python: is_portal_root">\n
<a tal:attributes="href python: \'%s/view?editable_mode=1\' % context.WebSite_getSite();"\n
><img src="pictures/section.png"/> Edit Web Site</a>\n
</li-->\n
\n
<!--li tal:condition="python: not is_portal_root">\n
<a tal:attributes="href python: \'%s/view?editable_mode=1\' % context.WebSite_getSection();"\n
><img src="pictures/section.png"/> Edit <tal:block tal:content="python: (is_webdoc and \'Parent \') or \'Current \'"/>Section</a>\n
</li-->\n
\n
<!--li tal:condition="python: (not is_portal_root) and ((is_section and valid_default_doc and not is_edit_mode) or is_webdoc)">\n
<a tal:attributes="href python: \'%s/view?editable_mode=1\' % context.WebSite_getDocumentPhysicalPath();"\n
><img src="pictures/webpage.png"/> Edit <tal:block tal:content="python: (is_section and \'Default \') or \'Current \'"/>Page</a>\n
</li-->\n
\n
<!--li tal:define="context_url python: context.absolute_url();\n
url_list python: context_url[context_url.find(\'://\')+3:].split(\'/\');\n
is_secure python: context_url[4].lower() == \'s\';\n
base_url python: url_list[0];\n
doc_url python: \'/\'.join(url_list[1:]);\n
webdav_prefix python: \'webdav\' + (is_secure and \'s\' or \'\');\n
WEBDAV_PORT python: \'443\'">\n
<a tal:attributes="href python: \'%s://webdav.%s:%s/%s\' % (webdav_prefix, base_url, WEBDAV_PORT, doc_url)"\n
><img src="pictures/webdav.png" tal:attributes="src string:${portal_url}/pictures/webdav.png"/> Open <tal:block tal:content="python: (is_secure and \'Secured \') or \'Unsecured \'"/>webdav</a>\n
</li-->\n
</ul>\n
</tal:block>
]]></string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>admin_tool_edit</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PageTemplates.ZopePageTemplate</string>
<string>ZopePageTemplate</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
<tal:block\n
metal:define-macro="master"\n
tal:define="here python: getattr(here.REQUEST, \'here\', here);\n
url python: \'\';\n
actions python: [];\n
">\n
<!-- this title mimic the behaviour of menu content depending on context -->\n
<h3><tal:block tal:content="here/getPortalType"/> Actions</h3>\n
\n
<p tal:content="python: repr(here.REQUEST.items())"/>\n
\n
<!--tal:block metal:use-macro="here/context_box_render/macros/action"/-->\n
\n
</tal:block>
]]></string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>admin_tool_menus</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PageTemplates.ZopePageTemplate</string>
<string>ZopePageTemplate</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
<!-- Floating Panel -->\n
<tal:block tal:define="widget_list python: [ \'admin_tool_menus\']">\n
<!-- , \'admin_tool_edit\'\n
, \'admin_tool_duplicate_document\'\n
, \'admin_tool_duplicate_section\'\n
, \'admin_tool_debug\'\n
]">\n
-->\n
<div id="adminToolBox" tal:condition="python: len(widget_list) > 0">\n
\n
<script type="text/javascript" language="JavaScript" src="js/cookie_utils.js"></script>\n
<script type="text/javascript" language="JavaScript">\n
<!--\n
// global variables\n
var cookie_name = "erp5_admin_tool_box_hidden_state"\n
var hidden_class = "doNotDisplay";\n
var elements_to_hide_name = "adminSection";\n
\n
function hideElements (hide) {\n
if (hide == true) {\n
new_hidden_class = hidden_class;\n
} else if (hide == false) {\n
new_hidden_class = "";\n
} else {\n
return;\n
}\n
// set the visibility of each element\n
element_list = document.getElementsByName(elements_to_hide_name);\n
for (var i = 0; i < element_list.length; i++) {\n
element_list[i].className = new_hidden_class;\n
}\n
// update cookie to remember the visibility status\n
days = 1; // cookie lifetime\n
stop_date = new Date();\n
stop_date.setTime(stop_date.getTime() + (days*24*60*60*1000));\n
SetCookie(cookie_name, hidden_status, stop_date);\n
}\n
\n
function autoHide () {\n
element_list = document.getElementsByName(elements_to_hide_name);\n
hidden_status = false;\n
// compute the global visibility only once to avoid inconsistencies\n
if (element_list[0].className != hidden_class) {\n
hidden_status = true;\n
}\n
hideElements(hidden_status);\n
}\n
\n
function initHiddenState () {\n
hidden_status = GetCookie(cookie_name);\n
// be carefull: cookies contain string values\n
if (hidden_status == "false") {\n
hidden_status = false;\n
} else if (hidden_status == "true") {\n
hidden_status = true;\n
}\n
// restore the previous state\n
hideElements(hidden_status);\n
}\n
-->\n
</script>\n
\n
<h3 title="Collapse / Expand administrator toolbar." onclick="autoHide()" class="warning"><img src="admin_toolbox/admin-tool-box.png"/><span name="adminSection"> Admin Tool Box</span></h3>\n
\n
<!-- this title mimic the behaviour of menu content depending on context -->\n
<h3><tal:block tal:content="here/getPortalType"/> Actions</h3>\n
\n
<!--tal:block metal:use-macro="here/context_box_render/macros/master"/-->\n
\n
\n
\n
\n
<!--div name="adminSection" tal:repeat="widget python: widget_list">\n
<tal:block tal:define="widget_object python: here[widget]">\n
<tal:block metal:use-macro="widget_object/macros/master"/>\n
</tal:block>\n
</div-->\n
\n
</div>\n
</tal:block>
]]></string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>admin_toolbox-ORIGINAL</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -121,7 +121,7 @@ return REQUEST.RESPONSE.redirect(website_url)\n
<value>
<tuple>
<string>_getattr_</string>
<string>context</string>
<string>context</string>
<string>REQUEST</string>
<string>_getitem_</string>
<string>website</string>
......
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