diff --git a/bt5/erp5_forge/ActionTemplateItem/portal_types/Glossary%20Module/find_duplicate_terms.xml b/bt5/erp5_forge/ActionTemplateItem/portal_types/Glossary%20Module/find_duplicate_terms.xml new file mode 100644 index 0000000000000000000000000000000000000000..ef1817b6ecd8bab64d69f7a796ac31ea1c09f993 --- /dev/null +++ b/bt5/erp5_forge/ActionTemplateItem/portal_types/Glossary%20Module/find_duplicate_terms.xml @@ -0,0 +1,77 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="ActionInformation" module="Products.CMFCore.ActionInformation"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <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_action</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>find_duplicate_terms</string> </value> + </item> + <item> + <key> <string>permissions</string> </key> + <value> + <tuple> + <string>View</string> + </tuple> + </value> + </item> + <item> + <key> <string>priority</string> </key> + <value> <float>20.0</float> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Find Duplicate Terms</string> </value> + </item> + <item> + <key> <string>visible</string> </key> + <value> <int>1</int> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <global name="Expression" module="Products.CMFCore.Expression"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>text</string> </key> + <value> <string>string:${object_url}/GlossaryModule_viewDuplicateGlossaryTermList</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_getDuplicateGlossaryTermList.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_getDuplicateGlossaryTermList.xml new file mode 100644 index 0000000000000000000000000000000000000000..dce922c8f605a90aac5bcd250fc9974c6341eb2d --- /dev/null +++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_getDuplicateGlossaryTermList.xml @@ -0,0 +1,126 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </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_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <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>_body</string> </key> + <value> <string>kw[\'language_title\'] = kw.get(\'language_title\', \'\') or \'%\'\n +kw[\'business_field_title\'] = kw.get(\'business_field_title\', \'\') or \'%\'\n +return context.getPortalObject().GlossaryModule_zGetDuplicateGlossaryTermList(selection_params=kw)\n +</string> </value> + </item> + <item> + <key> <string>_code</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>**kw</string> </value> + </item> + <item> + <key> <string>errors</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>func_code</string> </key> + <value> + <object> + <klass> + <global name="FuncCode" module="Shared.DC.Scripts.Signature"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>co_argcount</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>co_varnames</string> </key> + <value> + <tuple> + <string>kw</string> + <string>_getattr_</string> + <string>_write_</string> + <string>context</string> + </tuple> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>func_defaults</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>GlossaryModule_getDuplicateGlossaryTermList</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_viewDuplicateGlossaryTermList.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_viewDuplicateGlossaryTermList.xml index 58d1777f5f44c47e1b6e1b328d8a1b26633da091..6ed99a4f1b2c71bd8582067120b7877d3ccd04ee 100644 --- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_viewDuplicateGlossaryTermList.xml +++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_viewDuplicateGlossaryTermList.xml @@ -40,6 +40,14 @@ <key> <string>action</string> </key> <value> <string>Base_doSelect</string> </value> </item> + <item> + <key> <string>description</string> </key> + <value> <string>Display duplicate glossary terms that have the same reference, language and business_field.</string> </value> + </item> + <item> + <key> <string>edit_order</string> </key> + <value> <string>[]</string> </value> + </item> <item> <key> <string>encoding</string> </key> <value> <string>UTF-8</string> </value> @@ -56,7 +64,6 @@ <string>right</string> <string>center</string> <string>bottom</string> - <string>hidden</string> </list> </value> </item> @@ -78,12 +85,6 @@ <list/> </value> </item> - <item> - <key> <string>hidden</string> </key> - <value> - <list/> - </value> - </item> <item> <key> <string>left</string> </key> <value> @@ -125,7 +126,7 @@ </item> <item> <key> <string>title</string> </key> - <value> <string>Glossary</string> </value> + <value> <string>Duplicate Glossary Terms</string> </value> </item> <item> <key> <string>unicode_mode</string> </key> diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_viewDuplicateGlossaryTermList/listbox.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_viewDuplicateGlossaryTermList/listbox.xml new file mode 100644 index 0000000000000000000000000000000000000000..ebe8e9a2b9745d19f44fd23664d820eb55efd87d --- /dev/null +++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_viewDuplicateGlossaryTermList/listbox.xml @@ -0,0 +1,236 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>delegated_list</string> </key> + <value> + <list> + <string>title</string> + <string>columns</string> + <string>all_columns</string> + <string>search_columns</string> + <string>list_method</string> + <string>count_method</string> + <string>selection_name</string> + <string>portal_types</string> + </list> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>listbox</string> </value> + </item> + <item> + <key> <string>message_values</string> </key> + <value> + <dictionary> + <item> + <key> <string>external_validator_failed</string> </key> + <value> <string>The input failed the external validator.</string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>all_columns</string> </key> + <value> + <list> + <tuple> + <string>reference</string> + <string>Reference</string> + </tuple> + <tuple> + <string>language_title</string> + <string>Language</string> + </tuple> + <tuple> + <string>business_field_title</string> + <string>Business Field</string> + </tuple> + <tuple> + <string>title</string> + <string>Title</string> + </tuple> + <tuple> + <string>description</string> + <string>Description</string> + </tuple> + <tuple> + <string>translated_validation_state_title</string> + <string>State</string> + </tuple> + <tuple> + <string>num_of_duplicates</string> + <string>Num of duplicates</string> + </tuple> + </list> + </value> + </item> + <item> + <key> <string>columns</string> </key> + <value> + <list> + <tuple> + <string>reference</string> + <string>Reference</string> + </tuple> + <tuple> + <string>language_title</string> + <string>Language</string> + </tuple> + <tuple> + <string>business_field_title</string> + <string>Business Field</string> + </tuple> + <tuple> + <string>title</string> + <string>Title</string> + </tuple> + <tuple> + <string>description</string> + <string>Description</string> + </tuple> + <tuple> + <string>translated_validation_state_title</string> + <string>State</string> + </tuple> + <tuple> + <string>num_of_duplicates</string> + <string>Num of duplicates</string> + </tuple> + </list> + </value> + </item> + <item> + <key> <string>count_method</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>field_id</string> </key> + <value> <string>my_list_mode_listbox</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>Base_viewFieldLibrary</string> </value> + </item> + <item> + <key> <string>list_method</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>portal_types</string> </key> + <value> + <list> + <tuple> + <string>Glossary Term</string> + <string>Glossary Term</string> + </tuple> + </list> + </value> + </item> + <item> + <key> <string>search_columns</string> </key> + <value> + <list> + <tuple> + <string>reference</string> + <string>Reference</string> + </tuple> + <tuple> + <string>language_title</string> + <string>Language</string> + </tuple> + <tuple> + <string>business_field_title</string> + <string>Business Field</string> + </tuple> + </list> + </value> + </item> + <item> + <key> <string>selection_name</string> </key> + <value> <string>glossary_module_selection</string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string>Click to edit the target</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Duplicate Glossary Terms</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <global name="Method" module="Products.Formulator.MethodField"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>method_name</string> </key> + <value> <string>GlossaryModule_getDuplicateGlossaryTermList</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_zGetDuplicateGlossaryTermList.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_zGetDuplicateGlossaryTermList.xml new file mode 100644 index 0000000000000000000000000000000000000000..b176a60280a7391807010d05fee52f5933ef283d --- /dev/null +++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_zGetDuplicateGlossaryTermList.xml @@ -0,0 +1,268 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="SQL" module="Products.ZSQLMethods.SQL"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_arg</string> </key> + <value> + <object> + <klass> + <global name="Args" module="Shared.DC.ZRDB.Aqueduct"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_data</string> </key> + <value> + <dictionary> + <item> + <key> <string>selection_params</string> </key> + <value> + <dictionary> + <item> + <key> <string>default</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>_keys</string> </key> + <value> + <list> + <string>selection_params</string> + </list> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_col</string> </key> + <value> + <list> + <dictionary> + <item> + <key> <string>name</string> </key> + <value> <string>path</string> </value> + </item> + <item> + <key> <string>null</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>type</string> </key> + <value> <string>t</string> </value> + </item> + <item> + <key> <string>width</string> </key> + <value> <int>27</int> </value> + </item> + </dictionary> + <dictionary> + <item> + <key> <string>name</string> </key> + <value> <string>uid</string> </value> + </item> + <item> + <key> <string>null</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>type</string> </key> + <value> <string>l</string> </value> + </item> + <item> + <key> <string>width</string> </key> + <value> <int>10</int> </value> + </item> + </dictionary> + <dictionary> + <item> + <key> <string>name</string> </key> + <value> <string>num_of_duplicates</string> </value> + </item> + <item> + <key> <string>null</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>type</string> </key> + <value> <string>l</string> </value> + </item> + <item> + <key> <string>width</string> </key> + <value> <int>1</int> </value> + </item> + </dictionary> + </list> + </value> + </item> + <item> + <key> <string>allow_simple_one_argument_traversal</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>arguments_src</string> </key> + <value> <string>selection_params=""</string> </value> + </item> + <item> + <key> <string>cache_time_</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>class_file_</string> </key> + <value> <string>ZSQLCatalog.zsqlbrain</string> </value> + </item> + <item> + <key> <string>class_name_</string> </key> + <value> <string>ZSQLBrain</string> </value> + </item> + <item> + <key> <string>connection_hook</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>connection_id</string> </key> + <value> <string>erp5_sql_connection</string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>GlossaryModule_zGetDuplicateGlossaryTermList</string> </value> + </item> + <item> + <key> <string>max_cache_</string> </key> + <value> <int>100</int> </value> + </item> + <item> + <key> <string>max_rows_</string> </key> + <value> <int>1000</int> </value> + </item> + <item> + <key> <string>src</string> </key> + <value> <string encoding="cdata"><![CDATA[ + +<dtml-let query="portal_catalog.buildSQLQuery(query=portal_catalog.getSecurityQuery(**selection_params), **selection_params)">\n +\n +select distinct\n + catalog.path, catalog.uid, count(*) as num_of_duplicates\n +from\n + <dtml-in prefix="table" expr="query[\'from_table_list\']">\n + <dtml-if "table_key not in (\'catalog\',)">\n + <dtml-var table_item> AS <dtml-var table_key>,\n + </dtml-if>\n + </dtml-in>\n + catalog\n +where\n + catalog.portal_type=\'Glossary Term\'\n + and catalog.validation_state in (\'draft\', \'validated\')\n + and related_language_title_category.category_strict_membership = 1\n + and related_business_field_title_category.category_strict_membership = 1\n + <dtml-if "query[\'where_expression\']">\n + AND <dtml-var "query[\'where_expression\']">\n + </dtml-if>\n +group by\n + catalog.reference, related_language_title_category.category_uid, related_business_field_title_category.category_uid\n +having\n + count(*) > 1\n +<dtml-if "query[\'order_by_expression\']">\n + order by <dtml-var "query[\'order_by_expression\']">\n +</dtml-if>\n +</dtml-let> + +]]></string> </value> + </item> + <item> + <key> <string>template</string> </key> + <value> + <object> + <klass> + <global name="__newobj__" module="copy_reg"/> + </klass> + <tuple> + <global name="SQL" module="Shared.DC.ZRDB.DA"/> + </tuple> + <state> + <dictionary> + <item> + <key> <string>__name__</string> </key> + <value> <string encoding="cdata"><![CDATA[ + +<string> + +]]></string> </value> + </item> + <item> + <key> <string>_vars</string> </key> + <value> + <dictionary/> + </value> + </item> + <item> + <key> <string>globals</string> </key> + <value> + <dictionary/> + </value> + </item> + <item> + <key> <string>raw</string> </key> + <value> <string encoding="cdata"><![CDATA[ + +<dtml-let query="portal_catalog.buildSQLQuery(query=portal_catalog.getSecurityQuery(**selection_params), **selection_params)">\n +\n +select distinct\n + catalog.path, catalog.uid, count(*) as num_of_duplicates\n +from\n + <dtml-in prefix="table" expr="query[\'from_table_list\']">\n + <dtml-if "table_key not in (\'catalog\',)">\n + <dtml-var table_item> AS <dtml-var table_key>,\n + </dtml-if>\n + </dtml-in>\n + catalog\n +where\n + catalog.portal_type=\'Glossary Term\'\n + and catalog.validation_state in (\'draft\', \'validated\')\n + and related_language_title_category.category_strict_membership = 1\n + and related_business_field_title_category.category_strict_membership = 1\n + <dtml-if "query[\'where_expression\']">\n + AND <dtml-var "query[\'where_expression\']">\n + </dtml-if>\n +group by\n + catalog.reference, related_language_title_category.category_uid, related_business_field_title_category.category_uid\n +having\n + count(*) > 1\n +<dtml-if "query[\'order_by_expression\']">\n + order by <dtml-var "query[\'order_by_expression\']">\n +</dtml-if>\n +</dtml-let> + +]]></string> </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryTerm_view/listbox.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryTerm_view/listbox.xml index afaea1cd6b107486e64782c326934cd5fc78c26c..3cf212e553d4e32374547be95f8be08f3b66e1f3 100644 --- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryTerm_view/listbox.xml +++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryTerm_view/listbox.xml @@ -352,6 +352,10 @@ <string>comment</string> <string>Comment</string> </tuple> + <tuple> + <string>translated_validation_state_title</string> + <string>State</string> + </tuple> </list> </value> </item> diff --git a/bt5/erp5_forge/bt/revision b/bt5/erp5_forge/bt/revision index 812799aa82ed573e25002889181db700932e62c9..13ef0a79b8787de65a0c008583ab7dd8a4a47fd0 100644 --- a/bt5/erp5_forge/bt/revision +++ b/bt5/erp5_forge/bt/revision @@ -1 +1 @@ -452 \ No newline at end of file +453 \ No newline at end of file diff --git a/bt5/erp5_forge/bt/template_action_path_list b/bt5/erp5_forge/bt/template_action_path_list index 56223afcf18394ee6e783fad6b34665e4d7510f1..68e331e227c4135384ea57c77566123e660fb187 100644 --- a/bt5/erp5_forge/bt/template_action_path_list +++ b/bt5/erp5_forge/bt/template_action_path_list @@ -16,6 +16,7 @@ Business Template | view_svn_repos_infos External Folder | view Glossary Module | create_term_for_translation Glossary Module | export_po_file +Glossary Module | find_duplicate_terms Glossary Module | find_terms_from_portal_type Glossary Module | find_terms_from_property_sheet Glossary Module | find_terms_from_workflow