[Erp5-report] r10118 - /erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widg...
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Sep 18 18:03:05 CEST 2006
Author: kevin
Date: Mon Sep 18 18:03:03 2006
New Revision: 10118
URL: http://svn.erp5.org?rev=10118&view=rev
Log:
Merge all toolbar code in a page template located at the root of the erp5_web_widget_library skin folder, because using sub folder break the request and acquisition.
Modified:
erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/admin_toolbox.xml
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=10118&r1=10117&r2=10118&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 Mon Sep 18 18:03:03 2006
@@ -60,8 +60,7 @@
\n
<tal:block\n
tal:define="is_web_mode python: True;\n
- portal_type python: here.getPortalType();\n
-">\n
+ portal_type python: here.getPortalType();">\n
<!-- widget_list python: [ \'admin_tool_menus\']"\n
, \'admin_tool_edit\'\n
, \'admin_tool_duplicate_document\'\n
@@ -69,8 +68,8 @@
, \'admin_tool_debug\'\n
]">\n
-->\n
-\n
<tal:block metal:use-macro="here/global_definitions/macros/header_definitions"/>\n
+\n
\n
<div id="adminToolBox">\n
\n
@@ -141,16 +140,6 @@
</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
@@ -164,11 +153,152 @@
</ul>\n
</div>\n
\n
+\n
<!-- Action drop-down contextual menu -->\n
<div name="adminSection">\n
<h3><tal:block tal:content="portal_type"/> Actions</h3>\n
<tal:block metal:use-macro="here/context_box_render/macros/action"/>\n
</div>\n
+\n
+\n
+ <!-- Document creation panel -->\n
+ <div name="adminSection">\n
+ <form name="tool_create" method="post" action="WebSite_newContent">\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: (portal_type and \'Default \') or \'Current \'"/>Page</span>\n
+ </h3>\n
+\n
+ <!-- TODO: bad use of table ! Generic css class for forms should be used there -->\n
+ <table cellspacing="1" cellpadding="0" border="0">\n
+ <tr>\n
+ <td>Title</td>\n
+ <td><input class="input" size="15" 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="15" 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
+ <!-- No required widget (make the form more complex) -->\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 = "clone-document.png";\n
+ new_icon.src = "new-document.png";\n
+ }\n
+\n
+ function setCreationMode (sel) {\n
+ // default is cloning\n
+ var action = \'clone\';\n
+ var action_name = \'Clone & 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 & 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>— Same as Current —</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 & Edit\' id="clone_action_button" title=\'Clone & Edit\'><img src="pictures/clone-document.png" id="clone_action_icon"/> <span id="duplicate_document_action">Clone & Edit</span></button>\n
+ <!--input type="image" alt="Clone & Edit" title="Clone & Edit" src="pictures/clone-document.png" id="clone_action_icon"/> <span id="duplicate_document_action">Clone & Edit</span-->\n
+ </td>\n
+ </tr>\n
+ </table>\n
+\n
+ </form>\n
+ </div>\n
+\n
+\n
+ <!-- Debug panel -->\n
+ <!-- TODO: only display this part for manager -->\n
+ <div name="adminSection">\n
+ <h3>Debug Menu</h3>\n
+ <ul>\n
+ <li>\n
+ <pre>\n
+ <!-- Display erp5 web globals -->\n
+ <b>Globals:</b>\n
+ <tal:block tal:content="python: \'is_web_mode = \' + repr(is_web_mode)" />\n
+ </pre>\n
+ </li>\n
+ <!-- XXX should we display this part everytime ? -->\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
+ <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
+ </ul>\n
+ </div>\n
+\n
\n
<!-- Generic attempt -->\n
<!--div name="adminSection" tal:repeat="widget python: widget_list">\n
More information about the Erp5-report
mailing list