Commit b3b29e81 authored by Romain Courteaud's avatar Romain Courteaud

* Modify field_render (use render_htmlgrid)

* Improve ERP5Site_createModule
* remove action translate on Person.
* display translated state for Organisation.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5780 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7030d6d5
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.ActionInformation</string>
<string>ActionInformation</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_exchange</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>translate</string> </value>
</item>
<item>
<key> <string>optional</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>Translate Content</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>15.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Translate</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.Expression</string>
<string>Expression</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/translation_template_view</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -122,7 +122,13 @@ module_portal_type_value.addAction( "list_ui"\n ...@@ -122,7 +122,13 @@ module_portal_type_value.addAction( "list_ui"\n
, "View"\n , "View"\n
, "object_ui"\n , "object_ui"\n
)\n )\n
\n module_portal_type_value.addAction( "print_pdf"\n
, "Print"\n
, "string:${object_url}/Base_printPdf"\n
, ""\n
, "View"\n
, "object_print"\n
)\n
# Create the skin directory if does not exist yet\n # Create the skin directory if does not exist yet\n
portal_skins_folder_name = portal_skins_folder\n portal_skins_folder_name = portal_skins_folder\n
portal_skins = portal.portal_skins\n portal_skins = portal.portal_skins\n
...@@ -169,6 +175,13 @@ object_portal_type_value.addAction( "view"\n ...@@ -169,6 +175,13 @@ object_portal_type_value.addAction( "view"\n
, "View"\n , "View"\n
, "object_view"\n , "object_view"\n
)\n )\n
object_portal_type_value.addAction( "history"\n
, "History"\n
, "string:${object_url}/Base_viewHistory"\n
, ""\n
, "View"\n
, "object_view"\n
)\n
object_portal_type_value.addAction( "metadata"\n object_portal_type_value.addAction( "metadata"\n
, "Metadata"\n , "Metadata"\n
, "string:${object_url}/Base_viewMetadata"\n , "string:${object_url}/Base_viewMetadata"\n
...@@ -176,8 +189,13 @@ object_portal_type_value.addAction( "metadata"\n ...@@ -176,8 +189,13 @@ object_portal_type_value.addAction( "metadata"\n
, "Manage properties"\n , "Manage properties"\n
, "object_view"\n , "object_view"\n
)\n )\n
\n object_portal_type_value.addAction( "print_pdf"\n
\n , "Print"\n
, "string:${object_url}/Base_printPdf"\n
, ""\n
, "View"\n
, "object_print"\n
)\n
# Finally add the module to the site\n # Finally add the module to the site\n
portal.newContent( portal_type = module_portal_type\n portal.newContent( portal_type = module_portal_type\n
, id = module_id\n , id = module_id\n
......
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
<string>my_activity</string> <string>my_activity</string>
<string>my_function</string> <string>my_function</string>
<string>my_site</string> <string>my_site</string>
<string>my_validation_state</string> <string>my_translated_validation_state_title</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -12,9 +12,15 @@ ...@@ -12,9 +12,15 @@
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>my_validation_state</string> </value> <value> <string>my_translated_validation_state_title</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -243,7 +249,7 @@ ...@@ -243,7 +249,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Validation State</string> </value> <value> <string>State</string> </value>
</item> </item>
<item> <item>
<key> <string>truncate</string> </key> <key> <string>truncate</string> </key>
......
...@@ -55,24 +55,32 @@ ...@@ -55,24 +55,32 @@
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
<tal:block metal:define-macro="field_render">\n <tal:block metal:define-macro="field_render">\n
<tr tal:condition="python:field.meta_type != \'HiddenStringField\'">\n <tal:block tal:define="value python:request.get(field.id, None)">\n
<td tal:content="structure field/title"\n <tal:block tal:define="html_render python: field.render_htmlgrid(value, request)">\n
<tal:block tal:condition="python:field.meta_type != \'HiddenStringField\'">\n
<tal:repeat repeat="html_tuple html_render">\n
<tr>\n
<td tal:content="structure python: html_tuple[0]"\n
tal:attributes="class python: \n tal:attributes="class python: \n
{0: {0: None, 1: \'required\'},\n {0: {0: None, 1: \'required\'},\n
1: {0: \'error\', 1: \'reqerror\'}}[field_errors.has_key(field.id)][field.is_required()]"\n 1: {0: \'error\', 1: \'reqerror\'}}[field_errors.has_key(field.id)][field.is_required()]"\n
i18n:translate="" i18n:domain="ui" />\n i18n:translate="" i18n:domain="ui" />\n
<td tal:define="value python:request.get(field.id, None)">\n <td>\n
<tal:block tal:replace="structure python: field.render(value, request)" />\n <tal:block tal:replace="structure python: html_tuple[1]" />\n
</td>\n </td>\n
</tr>\n </tr>\n
\n
</tal:repeat>\n
</tal:block>\n
<tr tal:condition="python: field_errors.has_key(field.id)">\n <tr tal:condition="python: field_errors.has_key(field.id)">\n
<td />\n <td />\n
<td tal:content="python:field_errors[field.id].error_text"\n <td tal:content="python:field_errors[field.id].error_text"\n
i18n:translate="" i18n:domain="ui"\n i18n:translate="" i18n:domain="ui"\n
class="error" />\n class="error" />\n
</tr>\n </tr>\n
</tal:block>\n </tal:block>\n
</tal:block>\n
</tal:block>
]]></string> </value> ]]></string> </value>
</item> </item>
......
...@@ -213,7 +213,6 @@ Person | print ...@@ -213,7 +213,6 @@ Person | print
Person | profile Person | profile
Person | report Person | report
Person | terminate_career Person | terminate_career
Person | translate
Person | view Person | view
Predicate | print_pdf Predicate | print_pdf
Predicate | view Predicate | view
......
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