[Erp5-report] r27171 - in /erp5/trunk/bt5/erp5_web: SkinTemplateItem/portal_skins/erp5_web_...
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue May 26 09:55:16 CEST 2009
Author: kazuhiko
Date: Tue May 26 09:55:15 2009
New Revision: 27171
URL: http://svn.erp5.org?rev=27171&view=rev
Log:
improve admin_toolbox:
* more translation
* remove unused condition for default_page because context should be a default page not a web section here.
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=27171&r1=27170&r2=27171&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/Base_getAdminToolboxEditShortcutList.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/Base_getAdminToolboxEditShortcutList.xml [utf8] Tue May 26 09:55:15 2009
@@ -69,9 +69,10 @@
translateString = context.Base_translateString\n
result = []\n
portal_type = context.getPortalType()\n
+translated_portal_type = context.getTranslatedPortalType()\n
request = context.REQUEST\n
current_web_section = request.current_web_section\n
-current_web_section_pt = current_web_section.getPortalType()\n
+current_web_section_translated_portal_type = current_web_section.getTranslatedPortalType()\n
action_dict = request.get(\'actions\', {}) # XXX actions needs to be renamed to action_dict\n
exchange_action_list = action_dict.get(\'object_exchange\', [])\n
button_action_list = action_dict.get(\'object_button\', [])\n
@@ -97,34 +98,20 @@
request.get(\'editable_mode\', 0)))\n
# Append a button to edit the current document\n
if not editable_mode:\n
- # The title is called Edit only if the document can be edited\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
- # change portal_type, this will be taken into account when determining parent action (below)\n
- portal_type = default_document.getPortalType() \n
- edit_title = getActionTitleForContext(context, portal_type)\n
- result.append(dict(\n
- url = "%s/view?editable_mode:int=1&%s" \n
- %(default_document.absolute_url(), http_parameters),\n
- icon = default_document.getIcon() or \'file_icon.gif\',\n
- title = edit_title,\n
- label = "%s Icon" % portal_type,))\n
- else:\n
- edit_title = getActionTitleForContext(context, portal_type)\n
- result.append(dict(\n
- url = "%s/view?editable_mode:int=1&%s" \n
- %(editable_absolute_url, http_parameters),\n
- icon = context.getIcon() or \'file_icon.gif\',\n
- title = edit_title,\n
- label = "%s Icon" % portal_type,))\n
+ edit_title = getActionTitleForContext(context, translated_portal_type)\n
+ result.append(dict(\n
+ url = "%s/view?editable_mode:int=1&%s" \n
+ %(editable_absolute_url, http_parameters),\n
+ icon = context.getIcon() or \'file_icon.gif\',\n
+ title = edit_title,\n
+ label = "%s Icon" % translated_portal_type,))\n
else: \n
result.append(dict(\n
url = "%s/view?editable_mode:int=0&%s" % (absolute_url, http_parameters),\n
icon = context.getIcon() or \'file_icon.gif\',\n
title = translateString("View ${portal_type}", \n
- mapping=dict(portal_type=portal_type)),\n
- label = "%s Icon" % portal_type,))\n
+ mapping=dict(portal_type=translated_portal_type)),\n
+ label = "%s Icon" % translated_portal_type,))\n
\n
# Append a button to edit the parent section\n
if portal_type not in (\'Web Section\', \'Web Site\'): \n
@@ -132,8 +119,8 @@
url = "%s/view?editable_mode=1" % current_web_section.absolute_url(),\n
icon = current_web_section.getIcon(),\n
title = translateString("Edit Parent ${portal_type}",\n
- mapping=dict(portal_type=current_web_section_pt)),\n
- label = "%s Icon" % current_web_section_pt,))\n
+ mapping=dict(portal_type=current_web_section_translated_portal_type)),\n
+ label = "%s Icon" % current_web_section_translated_portal_type,))\n
\n
# Append all icon buttons\n
for action in button_action_list:\n
@@ -199,9 +186,10 @@
<string>translateString</string>
<string>result</string>
<string>portal_type</string>
+ <string>translated_portal_type</string>
<string>request</string>
<string>current_web_section</string>
- <string>current_web_section_pt</string>
+ <string>current_web_section_translated_portal_type</string>
<string>action_dict</string>
<string>exchange_action_list</string>
<string>button_action_list</string>
@@ -213,8 +201,6 @@
<string>getActionTitleForContext</string>
<string>int</string>
<string>editable_mode</string>
- <string>None</string>
- <string>default_document</string>
<string>edit_title</string>
<string>dict</string>
<string>_getiter_</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=27171&r1=27170&r2=27171&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/admin_toolbox.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/admin_toolbox.xml [utf8] Tue May 26 09:55:15 2009
@@ -41,11 +41,12 @@
<!-- Floating Panel -->\n
\n
-<!-- header_definitions must be re-called and is_web_mode rededined because calling\n
+<!-- header_definitions must be re-called and is_web_mode redefined because calling\n
the current page template through editor_field in the form layout seems to reset\n
the context needed by action drop-down list.\n
\n
- TODO: Is this case should be handle by automaticcaly by erp5_xhtml_style ?\n
+ TODO: Is this case should be handle by automatically by erp5_xhtml_style ?\n
+ More translation is required.\n
-->\n
\n
<tal:block\n
@@ -82,10 +83,13 @@
the current object and which have no button equivalent\n
\n
We need to setup the actions variable from the request because\n
- this template is called from outside the main rendering process-->\n
+ this template is called from outside the main rendering process\n
+\n
+ XXX - the location of context_box_render is hardcoded.\n
+ -->\n
<div class="adminSection">\n
<h3><tal:block tal:content="portal_type"/> Actions</h3>\n
- <tal:block metal:use-macro="here/context_box_render/macros/action"/>\n
+ <tal:block metal:use-macro="here/portal_skins/erp5_xhtml_style/context_box_render/macros/action"/>\n
</div>\n
\n
<!-- Document creation panel.\n
@@ -115,7 +119,7 @@
<fieldset style="display:block;">\n
\n
<div class="field">\n
- <label>Title</label>\n
+ <label i18n:translate="" i18n:domain="ui">Title</label>\n
<div class="input">\n
<input class="input" size="12" \n
type="text" name="clone_title"\n
@@ -124,7 +128,7 @@
</div>\n
\n
<div class="field">\n
- <label>Reference</label>\n
+ <label i18n:translate="" i18n:domain="ui">Reference</label>\n
<div class="input">\n
<input class="input" size="12" \n
type="text" name="clone_reference"\n
@@ -133,7 +137,7 @@
</div>\n
\n
<div class="field">\n
- <label>Version</label>\n
+ <label i18n:translate="" i18n:domain="ui">Version</label>\n
<div class="input">\n
<input class="input" size="5" \n
type="text" name="clone_version"\n
@@ -142,7 +146,7 @@
</div>\n
\n
<div class="field">\n
- <label>Language</label>\n
+ <label i18n:translate="" i18n:domain="ui">Language</label>\n
<div class="input">\n
<input class="input" size="5" \n
type="text" name="clone_language"\n
@@ -150,16 +154,16 @@
</div>\n
</div>\n
\n
- <div class="field hiddenLabel">\n
- <label>Type</label>\n
+ <div class="field">\n
+ <label i18n:translate="" i18n:domain="ui">Portal 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
+ <option tal:repeat="portal_type python: here.getPortalWebDocumentTypeList()"\n
+ tal:content="portal_type"\n
+ tal:attributes="value portal_type"\n
+ i18n:translate="" i18n:domain="ui">portal_type</option>\n
</select>\n
</div>\n
</div>\n
@@ -194,7 +198,7 @@
var action_name = \'Clone & Edit\';\n
var icon = \'admin_toolbox_clone_document.png\';\n
var name = \'Base_cloneContent:method\';\n
- var clone_class = \'\';\n
+ var clone_display = \'inline\';\n
var new_title = \'\';\n
\n
// a portal type is given, so create a new document\n
@@ -204,13 +208,13 @@
action_name = \'Create New & Edit\';\n
icon = \'admin_toolbox_new_document.png\';\n
name = \'Base_newContent:method\';\n
- clone_class = \'doNotDisplay\';\n
+ clone_display = \'none\';\n
new_title = \'Create New Document\';\n
}\n
\n
// update action dependent values\n
document.getElementById(\'create_new_document_title\').innerHTML = new_title;\n
- document.getElementById(\'clone_document_title\' ).className = clone_class;\n
+ document.getElementById(\'clone_document_title\' ).style.display = clone_display;\n
document.getElementById(\'duplicate_document_action\').innerHTML = action_name;\n
\n
// replace the action icon\n
Modified: erp5/trunk/bt5/erp5_web/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web/bt/revision?rev=27171&r1=27170&r2=27171&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_web/bt/revision [utf8] Tue May 26 09:55:15 2009
@@ -1,1 +1,1 @@
-813
+814
More information about the Erp5-report
mailing list