Add the display of listbox and matrix with their title into all group (left, right, center, bottom)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34320 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3fa6b9af
master TMP-2to3 UpdateValidationStateFromConsistency addToDate_implicit_localtime alexander_forum allow_login_change allow_login_change_wip arnau arnau-RD-Components-CacheTool arnau-RD-Components-ERP5Form-ERP5Report arnau-RD-Components-ERP5Form-SelectionTool-MemcachedTool arnau-RD-Components-ERP5OOo arnau-RD-Components-PreferenceTool-Preference arnau-RD-Components-Products-import-compat arnau-RD-Components-astroid_cache_per_component_reset arnau-RD-Components-erp5_crm arnau-RD-Components-erp5_trade-TODO-Interactor arnau-RD-ERP5ify-portal_workflow-1-seb-merged-with-recent-master arnau-RD-ERP5ify-portal_workflow-2-do-not-rename-erp5_workflow-portal_types arnau-RD-ERP5ify-portal_workflow-BAK arnau-RD-ERP5ify-portal_workflow-WIP arnau-RD-ERP5ify-portal_workflow-WITHOUT-MIGRATION arnau-RD-ERP5ify-portal_workflow-WORKFLOWS-NOT-MIGRATED arnau-RD-py3-master-TM arnau-RD-py3-master-TM-BAK arnau-RD-py3-master-WIP arnau-RD-py3-master-WIP-BAK arnau-RD-py3-master-WIP-bt5-and-tests arnau-RD-zope4py3 arnau-TM-Components-Migrate-PortalTransforms arnau-TM-Components-ModuleSecurityInfo arnau-TM-FEC-output arnau-TM-WIP arnau-TM-isBuildable-with-multiple-BusinessLinks arnau-TM-newContent-temp_object arnau-TM-runUnitTest-clear-previous-execution-catalog arnau-TM-wkhtmltopdf arnau-WIP arnau-kns arnau-kns-without-property-mapping arnau-merge arnau-my2to3 arnau-poc arnau-real-time-inventory-accounting arnau-zope4py2 aurel-zope4py2 auto_extend_select_list autoflake backup_erp5_workflow bk_erp5ish_actions_tool bk_sqlcatalog boc-interaction-drop bt5_config cache cache-control-304-response callable-jupyter-storage catalog_filter catalog_fulltext catalog_fulltext_old cedric cedriclen cedriclen-eos certificate_authority cherry-pick-4a8e045d cleanJSByJSLint clean_up_upgrader cleanup_acquisition_base_category cloud_reliability_test credential_update_action cribjs-bootloader datetimefield deferred_listbox delivery_item_barcode douglas_forum dream_distributor drop-ZServer dsn-phase3 e2e-erp5 enhance_scalability_testing eos-dev erp5-component erp5-component-bak erp5-forum erp5-imt erp5-messenger erp5-preference erp5-release erp5-slapos-upgrade erp5-util-testing erp5-vifib erp5-vifib-cleanup erp5-vifib-no-Products.DCWorkflowGraph erp5_calendar erp5_catalog erp5_catalog_final erp5_corporate_identity erp5_drone_simulator erp5_free_subscription erp5_hal_json_style_fix_restricted_access_with_traverse erp5_payslip_migration erp5_workflow erp5testnode_max_timeout feat/ZMySQLDA-ssl feat/dedup_roles_in_pickles feat/dms_implicit_predecessor_successor_fields feat/erp5_ide feat/erp5pt feat/inventory_api_group_by_time_interval_list feat/lxml-html-snapshot feat/notification-message-ignore-missing feat/olapy feat/python_language_support feat/slapos_agent_distributor feature/renderjs-ui-no-header fix/ZMI_editor_preference fix/advance_ecommerce_coding_crimes fix/login_validate_check_consistency fix/monaco-altClick fix/officejs_support_request_rss_secu fix/support-request-app-empty fix/test_traceback fix/workflow_method_security fix_web_illustration for_testrunner_1 for_testrunner_2 for_testrunner_3 gabriel gadget-json-value graphic_gadget_js hotfix/rjs-formfields-padding improve_default_caching_policy_manager initsite interaction-drop inventory isDeletable ivan jerome-bt-reference-doc jerome_graph_editor_renderjs jerome_user_preference_time_zone jio jm/form-action-guard js-ui kns lazy_simulation_causality lignan limit_accelerated_http_cache_manager lingnan listbox_url lle-bout/metadata-modules macros_fix mame-test-stock-indexation master-erp5-test-result-scalability master-erp5-test-result-scalability-rebase master-test-fix-additionalbt5path master_w mic_wind monitoring-graph mr1362 mrp my2to3 new-render-presentation nicolas-slice-price no_longer_simulated_state notebook_roque officejs override_cache_control_header_by_caching_policy_manager pere poc/json-forms-study portal_callables portal_solver_process_security_configuration presentation publish_recursiveReindexObject rebased_mrp refactor/base_edit reindex_calendar_after_change_calendar_exception restore-from-trashbin revert-192c2000 revert-38554dbe rfc/activate_default rjs_listbox_sort_icon roque_quick scalability-master scalability-master2 scalability-master2-rebase scalability-roque scalability-roque-2 scalability-run-command scalability_crash_mariadb shop-box shop-box-rebase streaming_fix streaming_fix-0 support_legacy_sftp_server support_relative_url_in_hyperlink_field support_request syncml taskdistribution-xmlrpc-binary test-renderjs-float-field-step test_dynamic_methods test_page testnode_software_link timezones tomo_testnode_slap_request translatable_path_master tristan tristan-merge tristan-performance trustable-x-forwarded-for ttrm unify_predicate_edit view-aggregated-amounts vivekpab_renderjs_interfaces wenjie wenjie_branch without_legacy_workflow wsgi wsgi-gevent wsgi_backport_setbody_lock wsgi_medusa_stream_fix yryr yryr-components-cp yryr-inventory-cache yryr-test yryr-with-components zope2zope4py2 zope4py3 zope4py3-master-rebase 0.4.59.1 0.4.59 test-ui test-rjsacc test-rjs renderjs-test nexedi-erp5-vifib-20201105 erp5.util-0.4.74 erp5.util-0.4.73 erp5.util-0.4.72 erp5.util-0.4.71 erp5.util-0.4.69 erp5.util-0.4.68 erp5.util-0.4.67 erp5.util-0.4.66 erp5.util-0.4.65 erp5.util-0.4.64 erp5.util-0.4.63 erp5.util-0.4.62 erp5.util-0.4.61 erp5.util-0.4.60 erp5.util-0.4.59.1 erp5.util-0.4.59 erp5.util-0.4.58 erp5.util-0.4.57 erp5.util-0.4.56 erp5.util-0.4.55 erp5.util-0.4.54 erp5.util-0.4.53 erp5.util-0.4.52 erp5.util-0.4.49 erp5.util-0.4.46 erp5.util-0.4.44 erp5.util-0.4.43 erp5.util-0.4.41 erp5.util-0.4.40 erp5.util-0.4.37 erp5.util-0.4.1 erp5.util-0.4 erp5.util-0.3 erp5.util-0.2 erp5.util-0.1 erp5-vifib-20230331 erp5-vifib-20230201 erp5-vifib-20220526 erp5-vifib-20220302 erp5-vifib-20210707 erp5-vifib-20201229 erp5-vifib-20200129
No related merge requests found
......@@ -40,38 +40,98 @@
<value> <string encoding="cdata"><![CDATA[
<tal:block xmlns:draw=\'urn:oasis:names:tc:opendocument:xmlns:drawing:1.0\' xmlns:office=\'urn:oasis:names:tc:opendocument:xmlns:office:1.0\' xmlns:text=\'urn:oasis:names:tc:opendocument:xmlns:text:1.0\' xmlns:ooo=\'http://openoffice.org/2004/office\' xmlns:number=\'urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0\' xmlns:dc=\'http://purl.org/dc/elements/1.1/\' xmlns:meta=\'urn:oasis:names:tc:opendocument:xmlns:meta:1.0\' xmlns:table=\'urn:oasis:names:tc:opendocument:xmlns:table:1.0\' xmlns:dr3d=\'urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0\' xmlns:fo=\'urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0\' xmlns:style=\'urn:oasis:names:tc:opendocument:xmlns:style:1.0\' xmlns:xforms=\'http://www.w3.org/2002/xforms\' xmlns:form=\'urn:oasis:names:tc:opendocument:xmlns:form:1.0\' xmlns:script=\'urn:oasis:names:tc:opendocument:xmlns:script:1.0\' xmlns:ooow=\'http://openoffice.org/2004/writer\' xmlns:svg=\'urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0\' xmlns:chart=\'urn:oasis:names:tc:opendocument:xmlns:chart:1.0\' xmlns:dom=\'http://www.w3.org/2001/xml-events\' xmlns:xlink=\'http://www.w3.org/1999/xlink\' xmlns:xsd=\'http://www.w3.org/2001/XMLSchema\' xmlns:xsi=\'http://www.w3.org/2001/XMLSchema-instance\' xmlns:oooc=\'http://openoffice.org/2004/calc\' xmlns:math=\'http://www.w3.org/1998/Math/MathML\' xmlns:tal=\'http://xml.zope.org/namespaces/tal\' xmlns:i18n=\'http://xml.zope.org/namespaces/i18n\' xmlns:metal=\'http://xml.zope.org/namespaces/metal\' office:version=\'1.0\' metal:define-macro="master" tal:attributes=\'dummy python:request.RESPONSE.setHeader("Content-Type", "text/html;; charset=utf-8")\'>\n
\n
<tal:block metal:use-macro="here/style_macros/macros/style_macro"/>\n
<office:scripts/>\n
\n
<office:body metal:define-macro="form_layout">\n
<office:spreadsheet>\n
\n
\n
<!-- Render the field in the bottom group. `field` must be defined.\n
The field in the bottom group, can be ListBoxField, MatrixBoxField or a ProxyField to one of thoses.\n
-->\n
<tal:block metal:define-macro="bottom_group_field"\n
<tal:block metal:define-macro="field_render" \n
tal:define="field_meta_type python: field.meta_type == \'ProxyField\' and field.getRecursiveTemplateField().meta_type or field.meta_type">\n
<tal:block tal:condition="python: field_meta_type in (\'MatrixBox\', \'ListBox\')">\n
<!-- for Listbox and Matrix add a new line -->\n
<table:table-row>\n
<table:table-cell table:style-name=\'Default\'/>\n
</table:table-row>\n
<!-- for Listbox and Matrix, the title is added -->\n
<table:table-row table:style-name=\'ro2\'>\n
<!-- field title -->\n
<table:table-cell table:number-rows-spanned=\'1\'\n
table:style-name=\'report-column-title\'\n
table:number-columns-spanned=\'1\'\n
office:value-type=\'string\'>\n
<text:p tal:content="python:here.Localizer.erp5_ui.gettext(field.get_value(\'title\')).encode(\'utf-8\')">\n
</text:p>\n
</table:table-cell>\n
</table:table-row>\n
</tal:block>\n
<!-- Add values -->\n
<tal:block tal:condition="python: field_meta_type == \'MatrixBox\'">\n
<tal:block tal:define="matrixbox python:field;">\n
<tal:block metal:use-macro="here/matrixbox_ods_macro/macros/matrixbox" />\n
</tal:block>\n
</tal:block>\n
<tal:block tal:condition="python: field_meta_type == \'ListBox\'">\n
<tal:block tal:define="listbox python:field;" >\n
<tal:block tal:define="listbox python:field;">\n
<tal:block metal:use-macro="here/listbox_ods_macro/macros/listbox" />\n
</tal:block>\n
</tal:block>\n
<tal:block tal:condition="python: field_meta_type not in (\'ListBox\', \'MatrixBox\', \'OOoChart\')">\n
<tal:block tal:define="warning_log python: context.log(\'field_ods_macro ignored field:%s\' % field)"/>\n
<table:table-row table:style-name="ro2">\n
<table:table-cell/>\n
</table:table-row>\n
<!-- Add the title and the value for standard fields -->\n
<tal:block tal:condition="python: field_meta_type not in (\'MatrixBox\', \'ListBox\')">\n
<tal:block tal:define="field python:field;">\n
<tal:block metal:use-macro="here/field_ods_macro/macros/standard_field_value" />\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
\n
<!-- Render a value for the field which is not a Listbox / MatrixBox -->\n
<tal:block metal:define-macro="standard_field_value">\n
<table:table-row table:style-name=\'ro2\'>\n
<tal:block tal:condition="python:group != \'bottom\'">\n
<!-- field title -->\n
<table:table-cell table:number-rows-spanned=\'1\'\n
table:style-name=\'report-column-title\'\n
table:number-columns-spanned=\'1\'\n
office:value-type=\'string\'>\n
<text:p tal:content="python:here.Localizer.erp5_ui.gettext(field.get_value(\'title\')).encode(\'utf-8\')">\n
</text:p>\n
</table:table-cell>\n
</tal:block>\n
\n
<!-- field value -->\n
<tal:block tal:define="item_list python:field.has_value(\'items\') and field.get_value(\'items\') or None"\n
tal:condition="python: field.get_value(\'title\')">\n
<!-- if the group bottom there isn\'t a title -->\n
<table:table-cell table:number-rows-spanned=\'1\'\n
table:style-name=\'report-content-heading2-with-lines\'\n
tal:attributes="table:number-columns-spanned python:group == \'bottom\' and column_len or column_len-1"\n
office:value-type=\'string\'\n
tal:define="value python: field.get_value(\'default\')">\n
<tal:block tal:condition="python: same_type(value, []) or same_type(value, ())">\n
<tal:block tal:repeat="item value">\n
<text:p tal:condition="not:item_list" tal:content="item"></text:p>\n
<text:p tal:condition="item_list" tal:content="python: [i[0] for i in item_list if i[1] == item][0]"></text:p>\n
</tal:block>\n
</tal:block>\n
<tal:block tal:condition="python: (not (same_type(value, []) or same_type(value, ()))) and value is not None">\n
<text:p tal:condition="not: item_list" tal:content="value">\n
</text:p>\n
<tal:block tal:condition="python: value != \'\'">\n
<tal:block tal:condition="item_list">\n
<tal:block tal:define="displayed_value_list python: [str(i[0]).replace(\'&amp;\', \'\') for i in item_list if i[1] == value]">\n
<text:p tal:condition="displayed_value_list" tal:content="python: displayed_value_list[0]" />\n
<text:p tal:condition="not: displayed_value_list" tal:content="python: value" />\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
<tal:block tal:condition="python: value is None">\n
<text:p table:style="Default" tal:content="python: \' \'" />\n
</tal:block>\n
</tal:block>\n
</table:table-cell>\n
</tal:block>\n
</table:table-row>\n
</tal:block>\n
\n
<!-- Render a value for a field in a Listbox / MatrixBox. `value` must be defined,\n
`field` is optional and is only defined when we have an editable field for this column or cell.\n
-->\n
......
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