imio.smartweb.common 1.2.23__tar.gz → 1.2.24__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/CHANGES.rst +7 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/PKG-INFO +8 -1
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/setup.py +1 -1
- imio_smartweb_common-1.2.24/src/imio/smartweb/common/browser/collective_taxonomy_controlpanel.py +45 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/browser/configure.zcml +12 -2
- imio_smartweb_common-1.2.24/src/imio/smartweb/common/browser/edit_taxonomy_data.pt +190 -0
- imio_smartweb_common-1.2.24/src/imio/smartweb/common/tests/test_taxonomy.py +73 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio.smartweb.common.egg-info/PKG-INFO +8 -1
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio.smartweb.common.egg-info/SOURCES.txt +1 -0
- imio_smartweb_common-1.2.23/src/imio/smartweb/common/browser/collective_taxonomy_controlpanel.py +0 -67
- imio_smartweb_common-1.2.23/src/imio/smartweb/common/tests/test_taxonomy.py +0 -140
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/CONTRIBUTORS.rst +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/DEVELOP.rst +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/LICENSE.GPL +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/LICENSE.rst +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/MANIFEST.in +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/README.rst +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/docs/conf.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/docs/index.rst +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/requirements-coverage.txt +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/requirements.txt +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/setup.cfg +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/__init__.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/__init__.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/__init__.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/adapters.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/adapters.zcml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/behaviors/__init__.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/behaviors/configure.zcml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/behaviors/iam.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/behaviors/topics.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/browser/__init__.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/browser/cropping.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/browser/description.pt +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/browser/description.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/browser/forms.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/browser/overrides/plone.app.z3cform.templates.widget.pt +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/browser/privacy/__init__.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/browser/privacy/configure.zcml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/browser/privacy/form.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/browser/privacy/utils.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/browser/privacy/views.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/browser/scaling.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/browser/static/Makefile +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/browser/static/package.json +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/browser/static/smartweb-common-edit-compiled.css +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/browser/static/smartweb-common-edit-compiled.js +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/browser/static/smartweb-common-view-compiled.css +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/browser/static/smartweb-common-view-compiled.js +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/browser/static/src/edit.js +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/browser/static/src/edit.less +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/browser/static/src/view.js +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/browser/static/src/view.less +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/browser/static/webpack.config.js +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/browser/vocabulary.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/caching.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/caching_overrides.zcml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/config.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/configure.zcml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/contact_utils.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/faceted/__init__.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/faceted/configure.zcml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/faceted/utils.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/faceted/widget.pt +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/faceted/widget.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/indexers.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/indexers.zcml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/interfaces.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/permissions.zcml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/privacy.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/privacy.zcml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/profiles/default/actions.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/profiles/default/browserlayer.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/profiles/default/catalog.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/profiles/default/metadata.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/profiles/default/registry.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/profiles/default/rolemap.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/profiles/testing/catalog.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/profiles/testing/metadata.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/profiles/testing/registry.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/profiles/testing/types/Collection.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/profiles/testing/types/Document.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/profiles/testing/types/Folder.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/profiles/uninstall/browserlayer.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/profiles.zcml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/rest/__init__.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/rest/configure.zcml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/rest/odwb.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/rest/search_filters.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/rest/utils.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/setuphandlers.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/sharing/__init__.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/sharing/configure.zcml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/sharing/localroles.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/sharing/permissions.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/sharing/permissions.zcml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/subscribers.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/subscribers.zcml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/testing.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/testing.zcml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/tests/__init__.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/tests/resources/image.png +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/tests/resources/image_1400x800.png +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/tests/resources/image_1800x700.png +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/tests/robot/test_example.robot +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/tests/test_cropping.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/tests/test_description.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/tests/test_forms.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/tests/test_indexes.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/tests/test_local_roles.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/tests/test_permissions.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/tests/test_privacy.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/tests/test_rest.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/tests/test_robot.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/tests/test_setup.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/tests/test_subscribers.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/tests/test_text.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/tests/test_utils.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/tests/test_viewlets.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/tests/test_vocabularies.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/tests/test_vocabulary.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/tests/test_widgets.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/upgrades/__init__.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/upgrades/configure.zcml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/upgrades/profiles/1007_to_1008/rolemap.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/upgrades/profiles/1008_to_1009/actions.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/upgrades/profiles/1009_to_1010/registry/tiny_nonbreakingspace.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/upgrades/profiles/1010_to_1011/registry/resources.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/upgrades/profiles/1010_to_1011/registry/scales.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/upgrades/profiles/1010_to_1011/registry/tinymce.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/upgrades/profiles/1011_to_1012/registry/bundles.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/upgrades/profiles/1013_to_1014/registry/tinymce.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/upgrades/profiles/1014_to_1015/registry/syndication.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/upgrades/profiles/1015_to_1016/registry/patched-faceted-jquery.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/upgrades/profiles/1016_to_1017/registry/scales.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/upgrades/profiles/1017_to_1018/registry.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/upgrades/profiles/1018_to_1019/registry/scales.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/upgrades/profiles/1022_to_1023/registry/scales.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/upgrades/profiles/1023_to_1024/registry/scales.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/upgrades/profiles/1025_to_1026/registry/scales.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/upgrades/profiles/1027_to_1028/restored-faceted-jquery.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/upgrades/profiles/1028_to_1029/registry.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/upgrades/profiles/1029_to_1030/registry.xml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/upgrades/upgrades.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/utils.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/viewlets/__init__.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/viewlets/analytics.pt +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/viewlets/colophon.pt +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/viewlets/colophon.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/viewlets/configure.zcml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/viewlets/privacy.pt +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/viewlets/privacy.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/viewlets/skip_to_content.pt +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/viewlets/skip_to_content.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/vocabularies.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/vocabularies.zcml +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/widgets/__init__.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/widgets/select.py +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio.smartweb.common.egg-info/dependency_links.txt +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio.smartweb.common.egg-info/namespace_packages.txt +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio.smartweb.common.egg-info/not-zip-safe +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio.smartweb.common.egg-info/requires.txt +0 -0
- {imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio.smartweb.common.egg-info/top_level.txt +0 -0
|
@@ -2,6 +2,13 @@ Changelog
|
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
1.2.24 (2025-03-10)
|
|
6
|
+
-------------------
|
|
7
|
+
|
|
8
|
+
- WEB-4232 : Refactoring of the code that prevents the deletion of a taxonomy term if it is used in at least one object
|
|
9
|
+
[boulch]
|
|
10
|
+
|
|
11
|
+
|
|
5
12
|
1.2.23 (2025-02-24)
|
|
6
13
|
-------------------
|
|
7
14
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: imio.smartweb.common
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.24
|
|
4
4
|
Summary: Common utilities, vocabularies, taxonomies for imio.smartweb & co products
|
|
5
5
|
Home-page: https://github.com/imio/imio.smartweb.common
|
|
6
6
|
Author: iMio
|
|
@@ -174,6 +174,13 @@ Changelog
|
|
|
174
174
|
=========
|
|
175
175
|
|
|
176
176
|
|
|
177
|
+
1.2.24 (2025-03-10)
|
|
178
|
+
-------------------
|
|
179
|
+
|
|
180
|
+
- WEB-4232 : Refactoring of the code that prevents the deletion of a taxonomy term if it is used in at least one object
|
|
181
|
+
[boulch]
|
|
182
|
+
|
|
183
|
+
|
|
177
184
|
1.2.23 (2025-02-24)
|
|
178
185
|
-------------------
|
|
179
186
|
|
|
@@ -16,7 +16,7 @@ long_description = "\n\n".join(
|
|
|
16
16
|
|
|
17
17
|
setup(
|
|
18
18
|
name="imio.smartweb.common",
|
|
19
|
-
version="1.2.
|
|
19
|
+
version="1.2.24",
|
|
20
20
|
description="Common utilities, vocabularies, taxonomies for imio.smartweb & co products",
|
|
21
21
|
long_description=long_description,
|
|
22
22
|
# Get more from https://pypi.org/classifiers/
|
imio_smartweb_common-1.2.24/src/imio/smartweb/common/browser/collective_taxonomy_controlpanel.py
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
|
|
3
|
+
from collective.taxonomy.interfaces import ITaxonomy
|
|
4
|
+
from collective.taxonomy.jsonimpl import EditTaxonomyData as baseEditTaxonomyData
|
|
5
|
+
from imio.smartweb.locales import SmartwebMessageFactory as _
|
|
6
|
+
from plone import api
|
|
7
|
+
from zope.component import queryUtility
|
|
8
|
+
from zope.component import queryUtility
|
|
9
|
+
from plone import api
|
|
10
|
+
from Products.Five import BrowserView
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
import json
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class EditTaxonomyData(baseEditTaxonomyData, BrowserView):
|
|
17
|
+
"""Edit taxonomy data."""
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class DeleteTaxonomyData(BrowserView):
|
|
21
|
+
|
|
22
|
+
def check_delete_taxonomy(self):
|
|
23
|
+
body = self.request.get("BODY", b"{}") # Récupération du corps de la requête
|
|
24
|
+
data = json.loads(body) # Décodage du JSON
|
|
25
|
+
term_id = data.get("termId") # Extraction de l'ID
|
|
26
|
+
result = {term_id} if term_id else set()
|
|
27
|
+
taxonomy = queryUtility(ITaxonomy, name="collective.taxonomy.contact_category")
|
|
28
|
+
catalog = api.portal.get_tool("portal_catalog")
|
|
29
|
+
brains = catalog.searchResults(object_provides=taxonomy.getGeneratedName())
|
|
30
|
+
# On parcours tous les brains pour lesquels la taxonomie est utilisée
|
|
31
|
+
for brain in brains:
|
|
32
|
+
index_key = f"taxonomy_{taxonomy.getShortName()}"
|
|
33
|
+
if hasattr(brain, index_key):
|
|
34
|
+
set2 = set(getattr(brain, index_key))
|
|
35
|
+
if result & set2:
|
|
36
|
+
obj = brain.getObject()
|
|
37
|
+
url = obj.absolute_url()
|
|
38
|
+
title = obj.Title()
|
|
39
|
+
return json.dumps(
|
|
40
|
+
{
|
|
41
|
+
"status": "error",
|
|
42
|
+
"message": f'<h2>Impossible de supprimer ce terme.</h2><p>Ce terme est au moins utilisé ici : <a href="{url}" target="_blank" title="{title}">{url}</a></p>',
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
return json.dumps({"status": "success", "message": "Suppression autorisée"})
|
|
@@ -91,9 +91,19 @@
|
|
|
91
91
|
/>
|
|
92
92
|
|
|
93
93
|
<browser:page
|
|
94
|
-
name="taxonomy-
|
|
94
|
+
name="taxonomy-edit-data"
|
|
95
95
|
for="Products.CMFCore.interfaces.ISiteRoot"
|
|
96
|
-
class=".collective_taxonomy_controlpanel.
|
|
96
|
+
class=".collective_taxonomy_controlpanel.EditTaxonomyData"
|
|
97
|
+
template="edit_taxonomy_data.pt"
|
|
98
|
+
permission="collective.taxonomy.ManageTaxonomies"
|
|
99
|
+
layer="imio.smartweb.common.interfaces.IImioSmartwebCommonLayer"
|
|
100
|
+
/>
|
|
101
|
+
|
|
102
|
+
<browser:page
|
|
103
|
+
name="check_delete_taxonomy"
|
|
104
|
+
attribute="check_delete_taxonomy"
|
|
105
|
+
for="*"
|
|
106
|
+
class=".collective_taxonomy_controlpanel.DeleteTaxonomyData"
|
|
97
107
|
permission="collective.taxonomy.ManageTaxonomies"
|
|
98
108
|
layer="imio.smartweb.common.interfaces.IImioSmartwebCommonLayer"
|
|
99
109
|
/>
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
<html xmlns="http://www.w3.org/1999/xhtml"
|
|
2
|
+
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
|
|
3
|
+
xmlns:metal="http://xml.zope.org/namespaces/metal"
|
|
4
|
+
xmlns:tal="http://xml.zope.org/namespaces/tal"
|
|
5
|
+
metal:use-macro="context/main_template/macros/master"
|
|
6
|
+
>
|
|
7
|
+
|
|
8
|
+
<head>
|
|
9
|
+
<metal:block fill-slot="style_slot">
|
|
10
|
+
<link rel="stylesheet"
|
|
11
|
+
type="text/css"
|
|
12
|
+
tal:attributes="
|
|
13
|
+
href string:$portal_url/++resource++taxonomy/icons/css/taxonomy.css;
|
|
14
|
+
"
|
|
15
|
+
/>
|
|
16
|
+
<link rel="stylesheet"
|
|
17
|
+
type="text/css"
|
|
18
|
+
tal:attributes="
|
|
19
|
+
href string:$portal_url/++resource++taxonomy/js/css/react-treeview.css;
|
|
20
|
+
"
|
|
21
|
+
/>
|
|
22
|
+
<link rel="stylesheet"
|
|
23
|
+
type="text/css"
|
|
24
|
+
tal:attributes="
|
|
25
|
+
href string:$portal_url/++resource++taxonomy/css/collective.taxonomy.css;
|
|
26
|
+
"
|
|
27
|
+
/>
|
|
28
|
+
</metal:block>
|
|
29
|
+
</head>
|
|
30
|
+
|
|
31
|
+
<body>
|
|
32
|
+
<metal:block fill-slot="main">
|
|
33
|
+
<style>
|
|
34
|
+
/* Modale en arrière-plan */
|
|
35
|
+
.modal {
|
|
36
|
+
display: none; /* Caché par défaut */
|
|
37
|
+
position: fixed;
|
|
38
|
+
z-index: 1000;
|
|
39
|
+
left: 0;
|
|
40
|
+
top: 0;
|
|
41
|
+
width: 100%;
|
|
42
|
+
height: 100%;
|
|
43
|
+
background-color: rgba(0,0,0,0.5); /* Fond semi-transparent */
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Contenu de la modale */
|
|
47
|
+
.modal-content {
|
|
48
|
+
background-color: white;
|
|
49
|
+
margin: 15% auto;
|
|
50
|
+
padding: 20px;
|
|
51
|
+
border-radius: 8px;
|
|
52
|
+
width: 50%;
|
|
53
|
+
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* Bouton de fermeture */
|
|
57
|
+
.close {
|
|
58
|
+
color: #aaa;
|
|
59
|
+
float: right;
|
|
60
|
+
font-size: 28px;
|
|
61
|
+
font-weight: bold;
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.close:hover {
|
|
66
|
+
color: black;
|
|
67
|
+
}
|
|
68
|
+
</style>
|
|
69
|
+
<div id="content-core">
|
|
70
|
+
<script type="text/javascript">
|
|
71
|
+
<!--
|
|
72
|
+
document.addEventListener("DOMContentLoaded", function() {
|
|
73
|
+
var rootDiv = document.getElementById("root");
|
|
74
|
+
var portalUrl = rootDiv ? rootDiv.dataset.portalUrl : window.location.origin + "/Plone"; // Fallback
|
|
75
|
+
|
|
76
|
+
// Sélection des éléments de la modale
|
|
77
|
+
const modal = document.getElementById("error-modal");
|
|
78
|
+
const modalMessage = document.getElementById("error-message");
|
|
79
|
+
const closeModalBtn = document.querySelector(".close");
|
|
80
|
+
|
|
81
|
+
// Fonction pour afficher la modale avec un message d'erreur
|
|
82
|
+
function showModal(message) {
|
|
83
|
+
modalMessage.innerHTML = message;
|
|
84
|
+
modal.style.display = "block";
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Fonction pour fermer la modale
|
|
88
|
+
function closeModal() {
|
|
89
|
+
modal.style.display = "none";
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Écouteur d'événement pour fermer la modale avec "X"
|
|
93
|
+
closeModalBtn.addEventListener("click", closeModal);
|
|
94
|
+
|
|
95
|
+
// Fermer la modale si on clique en dehors du contenu
|
|
96
|
+
window.addEventListener("click", function(event) {
|
|
97
|
+
if (event.target === modal) {
|
|
98
|
+
closeModal();
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
document.querySelectorAll(".taxonomy-icon-minus").forEach(button => {
|
|
103
|
+
button.addEventListener("click", function(event) {
|
|
104
|
+
event.preventDefault(); // Empêche le comportement par défaut
|
|
105
|
+
event.stopPropagation(); // Empêche l'événement de se propager
|
|
106
|
+
var nodeElement = this.closest(".info");
|
|
107
|
+
if (nodeElement == null) {
|
|
108
|
+
showModal("Impossible de supprimer cet élément car il contient d'autres termes .");
|
|
109
|
+
return;from zope.schema.interfaces import IVocabularyFactory
|
|
110
|
+
|
|
111
|
+
}
|
|
112
|
+
var identifierInput = nodeElement.querySelector(".identifier-input");
|
|
113
|
+
var termTitle = nodeElement.querySelector("input").value; // Récupération du titre du terme
|
|
114
|
+
if (!identifierInput) {
|
|
115
|
+
console.error("Impossible de trouver l'identifiant du nœud.");
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
var termId = identifierInput.value; // Récupération de l'ID du terme
|
|
120
|
+
|
|
121
|
+
// Confirmation avant suppression
|
|
122
|
+
if (!confirm(`Voulez-vous vraiment supprimer le terme "${termTitle}" ?`)) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
var deleteUrl = `${portalUrl}/@@check_delete_taxonomy`;
|
|
126
|
+
|
|
127
|
+
// Annulation de la suppression de l'élément de l'UI ici
|
|
128
|
+
var buttonDelete = this; // Le bouton "supprimer"
|
|
129
|
+
buttonDelete.disabled = true; // Désactive temporairement le bouton "supprimer"
|
|
130
|
+
|
|
131
|
+
// Envoie une requête AJAX pour vérifier si la suppression est possible
|
|
132
|
+
fetch(deleteUrl, {
|
|
133
|
+
method: 'POST',
|
|
134
|
+
headers: {
|
|
135
|
+
'Content-Type': 'application/json'
|
|
136
|
+
},
|
|
137
|
+
body: JSON.stringify({ termId: termId })
|
|
138
|
+
})
|
|
139
|
+
.then(response => response.json())
|
|
140
|
+
.then(data => {
|
|
141
|
+
handleDeleteResponse(data, event, buttonDelete, nodeElement);
|
|
142
|
+
})
|
|
143
|
+
.catch(error => {
|
|
144
|
+
console.error('Erreur lors de la suppression:', error);
|
|
145
|
+
alert('Une erreur est survenue.');
|
|
146
|
+
buttonDelete.disabled = false; // Réactive le bouton "supprimer" si erreur AJAX
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
function handleDeleteResponse(data, event, buttonDelete, nodeElement) {
|
|
152
|
+
if (data.status === 'error') {
|
|
153
|
+
showModal(data.message);
|
|
154
|
+
buttonDelete.disabled = false;
|
|
155
|
+
event.stopPropagation();
|
|
156
|
+
} else {
|
|
157
|
+
alert("Terme supprimé avec succès !");
|
|
158
|
+
nodeElement.remove();
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
-->
|
|
163
|
+
</script>
|
|
164
|
+
|
|
165
|
+
<div id="root"
|
|
166
|
+
tal:attributes="
|
|
167
|
+
data-taxonomy view/get_data;
|
|
168
|
+
data-languages view/get_languages_mapping;
|
|
169
|
+
data-portal-url context/absolute_url
|
|
170
|
+
"
|
|
171
|
+
>
|
|
172
|
+
</div>
|
|
173
|
+
|
|
174
|
+
</div>
|
|
175
|
+
|
|
176
|
+
<script type="text/javascript"
|
|
177
|
+
tal:attributes="
|
|
178
|
+
src view/get_resource_url;
|
|
179
|
+
"
|
|
180
|
+
></script>
|
|
181
|
+
<div id="error-modal" class="modal">
|
|
182
|
+
<div class="modal-content">
|
|
183
|
+
<span class="close">×</span>
|
|
184
|
+
<p id="error-message"></p>
|
|
185
|
+
</div>
|
|
186
|
+
</div>
|
|
187
|
+
</metal:block>
|
|
188
|
+
|
|
189
|
+
</body>
|
|
190
|
+
</html>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
|
|
3
|
+
from imio.smartweb.common.testing import IMIO_SMARTWEB_COMMON_FUNCTIONAL_TESTING
|
|
4
|
+
from plone import api
|
|
5
|
+
from plone.app.testing import setRoles
|
|
6
|
+
from plone.app.testing import TEST_USER_ID
|
|
7
|
+
from plone.app.testing.interfaces import SITE_OWNER_NAME
|
|
8
|
+
from plone.app.testing.interfaces import SITE_OWNER_PASSWORD
|
|
9
|
+
from plone.testing.z2 import Browser
|
|
10
|
+
from transaction import commit
|
|
11
|
+
|
|
12
|
+
import json
|
|
13
|
+
import unittest
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class TestTaxonomy(unittest.TestCase):
|
|
17
|
+
layer = IMIO_SMARTWEB_COMMON_FUNCTIONAL_TESTING
|
|
18
|
+
|
|
19
|
+
def setUp(self):
|
|
20
|
+
"""Custom shared utility setup for tests"""
|
|
21
|
+
self.request = self.layer["request"]
|
|
22
|
+
self.portal = self.layer["portal"]
|
|
23
|
+
setRoles(self.portal, TEST_USER_ID, ["Manager"])
|
|
24
|
+
self.browser = Browser(self.layer["app"])
|
|
25
|
+
self.browser.handleErrors = False
|
|
26
|
+
self.browser.addHeader(
|
|
27
|
+
"Authorization",
|
|
28
|
+
"Basic {0}:{1}".format(SITE_OWNER_NAME, SITE_OWNER_PASSWORD),
|
|
29
|
+
)
|
|
30
|
+
commit()
|
|
31
|
+
self.page = api.content.create(
|
|
32
|
+
container=self.portal,
|
|
33
|
+
type="Document",
|
|
34
|
+
title="Test page",
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
def test_removing_unused_taxonomy_term(self):
|
|
38
|
+
body_data = {
|
|
39
|
+
"languages": ["fr", "en", "nl", "ru", "da", "de"],
|
|
40
|
+
"tree": {
|
|
41
|
+
"key": "0",
|
|
42
|
+
"title": "Test vocabulary",
|
|
43
|
+
"subnodes": [
|
|
44
|
+
{
|
|
45
|
+
"key": "1",
|
|
46
|
+
"translations": {
|
|
47
|
+
"da": "Informationsvidenskab",
|
|
48
|
+
"de": "Informatik",
|
|
49
|
+
"en": "Information Science",
|
|
50
|
+
"ru": "Информатику",
|
|
51
|
+
},
|
|
52
|
+
"subnodes": [
|
|
53
|
+
{
|
|
54
|
+
"key": "3",
|
|
55
|
+
"translations": {"da": "Kronologi", "en": "Chronology"},
|
|
56
|
+
"subnodes": [],
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"default_language": "da",
|
|
62
|
+
},
|
|
63
|
+
"taxonomy": "collective.taxonomy.test",
|
|
64
|
+
}
|
|
65
|
+
json_str = json.dumps(body_data)
|
|
66
|
+
bytes_data = json_str.encode("utf-8")
|
|
67
|
+
self.request.set("BODY", bytes_data)
|
|
68
|
+
self.request.method = "POST"
|
|
69
|
+
result = self.portal.restrictedTraverse("@@taxonomy-import")()
|
|
70
|
+
self.assertEqual(
|
|
71
|
+
result,
|
|
72
|
+
'{"status": "info", "message": "Your taxonomy has been saved with success."}',
|
|
73
|
+
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: imio.smartweb.common
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.24
|
|
4
4
|
Summary: Common utilities, vocabularies, taxonomies for imio.smartweb & co products
|
|
5
5
|
Home-page: https://github.com/imio/imio.smartweb.common
|
|
6
6
|
Author: iMio
|
|
@@ -174,6 +174,13 @@ Changelog
|
|
|
174
174
|
=========
|
|
175
175
|
|
|
176
176
|
|
|
177
|
+
1.2.24 (2025-03-10)
|
|
178
|
+
-------------------
|
|
179
|
+
|
|
180
|
+
- WEB-4232 : Refactoring of the code that prevents the deletion of a taxonomy term if it is used in at least one object
|
|
181
|
+
[boulch]
|
|
182
|
+
|
|
183
|
+
|
|
177
184
|
1.2.23 (2025-02-24)
|
|
178
185
|
-------------------
|
|
179
186
|
|
|
@@ -53,6 +53,7 @@ src/imio/smartweb/common/browser/configure.zcml
|
|
|
53
53
|
src/imio/smartweb/common/browser/cropping.py
|
|
54
54
|
src/imio/smartweb/common/browser/description.pt
|
|
55
55
|
src/imio/smartweb/common/browser/description.py
|
|
56
|
+
src/imio/smartweb/common/browser/edit_taxonomy_data.pt
|
|
56
57
|
src/imio/smartweb/common/browser/forms.py
|
|
57
58
|
src/imio/smartweb/common/browser/scaling.py
|
|
58
59
|
src/imio/smartweb/common/browser/vocabulary.py
|
imio_smartweb_common-1.2.23/src/imio/smartweb/common/browser/collective_taxonomy_controlpanel.py
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
|
|
3
|
-
from collective.taxonomy.interfaces import ITaxonomy
|
|
4
|
-
from collective.taxonomy.jsonimpl import ImportJson as baseImportJson
|
|
5
|
-
from imio.smartweb.locales import SmartwebMessageFactory as _
|
|
6
|
-
from plone import api
|
|
7
|
-
from zope.component import queryUtility
|
|
8
|
-
from zope.i18n import translate
|
|
9
|
-
|
|
10
|
-
import json
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
class ImportJson(baseImportJson):
|
|
14
|
-
"""Update taxonomy using json data."""
|
|
15
|
-
|
|
16
|
-
def __call__(self):
|
|
17
|
-
request = self.request
|
|
18
|
-
if request.method == "POST":
|
|
19
|
-
data = json.loads(request.get("BODY", ""))
|
|
20
|
-
taxonomy = queryUtility(ITaxonomy, name=data["taxonomy"])
|
|
21
|
-
languages = data["languages"]
|
|
22
|
-
items_to_check = []
|
|
23
|
-
nodes = data["tree"]["subnodes"]
|
|
24
|
-
for language in languages:
|
|
25
|
-
for node in nodes:
|
|
26
|
-
if node["translations"].get(language):
|
|
27
|
-
items_to_check.append(
|
|
28
|
-
{node["key"]: node["translations"][language]}
|
|
29
|
-
)
|
|
30
|
-
ids_remaining = [key for data in items_to_check for key in data.keys()]
|
|
31
|
-
if not taxonomy.inverted_data.get(language):
|
|
32
|
-
continue
|
|
33
|
-
initial_taxonomy_ids = [k for k in taxonomy.inverted_data[language]]
|
|
34
|
-
for id in initial_taxonomy_ids:
|
|
35
|
-
if id in ids_remaining:
|
|
36
|
-
continue
|
|
37
|
-
# This is a removed term
|
|
38
|
-
catalog = api.portal.get_tool("portal_catalog")
|
|
39
|
-
brains = catalog.searchResults(
|
|
40
|
-
object_provides=taxonomy.getGeneratedName()
|
|
41
|
-
)
|
|
42
|
-
for brain in brains:
|
|
43
|
-
index_key = f"taxonomy_{taxonomy.getShortName()}"
|
|
44
|
-
if hasattr(brain, index_key) and id in getattr(
|
|
45
|
-
brain, index_key
|
|
46
|
-
):
|
|
47
|
-
obj = brain.getObject()
|
|
48
|
-
here = obj.absolute_url()
|
|
49
|
-
term_title = taxonomy.translate(
|
|
50
|
-
id, context=obj, target_language=language
|
|
51
|
-
)
|
|
52
|
-
return json.dumps(
|
|
53
|
-
{
|
|
54
|
-
"status": "error",
|
|
55
|
-
"message": translate(
|
|
56
|
-
_(
|
|
57
|
-
'Term "${term_title}" can\'t be removed because it is used (at least) here : ${here}',
|
|
58
|
-
mapping={
|
|
59
|
-
"term_title": term_title,
|
|
60
|
-
"here": here,
|
|
61
|
-
},
|
|
62
|
-
),
|
|
63
|
-
context=request,
|
|
64
|
-
),
|
|
65
|
-
}
|
|
66
|
-
)
|
|
67
|
-
return super(ImportJson, self).__call__()
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
|
|
3
|
-
from imio.smartweb.common.testing import IMIO_SMARTWEB_COMMON_FUNCTIONAL_TESTING
|
|
4
|
-
from plone import api
|
|
5
|
-
from plone.app.testing import setRoles
|
|
6
|
-
from plone.app.testing import TEST_USER_ID
|
|
7
|
-
from plone.app.testing.interfaces import SITE_OWNER_NAME
|
|
8
|
-
from plone.app.testing.interfaces import SITE_OWNER_PASSWORD
|
|
9
|
-
from plone.testing.z2 import Browser
|
|
10
|
-
from transaction import commit
|
|
11
|
-
|
|
12
|
-
import json
|
|
13
|
-
import unittest
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
class TestTaxonomy(unittest.TestCase):
|
|
17
|
-
layer = IMIO_SMARTWEB_COMMON_FUNCTIONAL_TESTING
|
|
18
|
-
|
|
19
|
-
def setUp(self):
|
|
20
|
-
"""Custom shared utility setup for tests"""
|
|
21
|
-
self.request = self.layer["request"]
|
|
22
|
-
self.portal = self.layer["portal"]
|
|
23
|
-
setRoles(self.portal, TEST_USER_ID, ["Manager"])
|
|
24
|
-
self.browser = Browser(self.layer["app"])
|
|
25
|
-
self.browser.handleErrors = False
|
|
26
|
-
self.browser.addHeader(
|
|
27
|
-
"Authorization",
|
|
28
|
-
"Basic {0}:{1}".format(SITE_OWNER_NAME, SITE_OWNER_PASSWORD),
|
|
29
|
-
)
|
|
30
|
-
commit()
|
|
31
|
-
self.page = api.content.create(
|
|
32
|
-
container=self.portal,
|
|
33
|
-
type="Document",
|
|
34
|
-
title="Test page",
|
|
35
|
-
)
|
|
36
|
-
|
|
37
|
-
def test_removing_unused_taxonomy_term(self):
|
|
38
|
-
body_data = {
|
|
39
|
-
"languages": ["fr", "en", "nl", "ru", "da", "de"],
|
|
40
|
-
"tree": {
|
|
41
|
-
"key": "0",
|
|
42
|
-
"title": "Test vocabulary",
|
|
43
|
-
"subnodes": [
|
|
44
|
-
{
|
|
45
|
-
"key": "1",
|
|
46
|
-
"translations": {
|
|
47
|
-
"da": "Informationsvidenskab",
|
|
48
|
-
"de": "Informatik",
|
|
49
|
-
"en": "Information Science",
|
|
50
|
-
"ru": "Информатику",
|
|
51
|
-
},
|
|
52
|
-
"subnodes": [
|
|
53
|
-
{
|
|
54
|
-
"key": "3",
|
|
55
|
-
"translations": {"da": "Kronologi", "en": "Chronology"},
|
|
56
|
-
"subnodes": [],
|
|
57
|
-
}
|
|
58
|
-
],
|
|
59
|
-
}
|
|
60
|
-
],
|
|
61
|
-
"default_language": "da",
|
|
62
|
-
},
|
|
63
|
-
"taxonomy": "collective.taxonomy.test",
|
|
64
|
-
}
|
|
65
|
-
json_str = json.dumps(body_data)
|
|
66
|
-
bytes_data = json_str.encode("utf-8")
|
|
67
|
-
self.request.set("BODY", bytes_data)
|
|
68
|
-
self.request.method = "POST"
|
|
69
|
-
result = self.portal.restrictedTraverse("@@taxonomy-import")()
|
|
70
|
-
self.assertEqual(
|
|
71
|
-
result,
|
|
72
|
-
'{"status": "info", "message": "Your taxonomy has been saved with success."}',
|
|
73
|
-
)
|
|
74
|
-
|
|
75
|
-
def test_removing_used_taxonomy_term(self):
|
|
76
|
-
self.page.taxonomy_test = ["1", "2"]
|
|
77
|
-
body_data = {
|
|
78
|
-
"languages": ["fr", "en", "nl", "ru", "da", "de"],
|
|
79
|
-
"tree": {
|
|
80
|
-
"key": "0",
|
|
81
|
-
"title": "Test vocabulary",
|
|
82
|
-
"subnodes": [
|
|
83
|
-
{
|
|
84
|
-
"key": "1",
|
|
85
|
-
"translations": {
|
|
86
|
-
"da": "Informationsvidenskab",
|
|
87
|
-
"de": "Informatik",
|
|
88
|
-
"en": "Information Science",
|
|
89
|
-
"ru": "Информатику",
|
|
90
|
-
},
|
|
91
|
-
"subnodes": [
|
|
92
|
-
{
|
|
93
|
-
"key": "3",
|
|
94
|
-
"translations": {"da": "Kronologi", "en": "Chronology"},
|
|
95
|
-
"subnodes": [],
|
|
96
|
-
}
|
|
97
|
-
],
|
|
98
|
-
}
|
|
99
|
-
],
|
|
100
|
-
"default_language": "da",
|
|
101
|
-
},
|
|
102
|
-
"taxonomy": "collective.taxonomy.test",
|
|
103
|
-
}
|
|
104
|
-
json_str = json.dumps(body_data)
|
|
105
|
-
bytes_data = json_str.encode("utf-8")
|
|
106
|
-
self.request.set("BODY", bytes_data)
|
|
107
|
-
self.request.method = "POST"
|
|
108
|
-
result = self.portal.restrictedTraverse("@@taxonomy-import")()
|
|
109
|
-
self.assertEqual(
|
|
110
|
-
result,
|
|
111
|
-
'{"status": "error", "message": "Term \\"Information Science \\u00bb Book Collecting\\" can\'t be removed because it is used (at least) here : http://nohost/plone/test-page"}',
|
|
112
|
-
)
|
|
113
|
-
|
|
114
|
-
def test_removing_used_parent_taxonomy_term(self):
|
|
115
|
-
self.page.taxonomy_test = ["2"]
|
|
116
|
-
self.page.reindexObject()
|
|
117
|
-
catalog = api.portal.get_tool("portal_catalog")
|
|
118
|
-
brain = api.content.find(UID=self.page.UID())[0]
|
|
119
|
-
indexes = catalog.getIndexDataForRID(brain.getRID())
|
|
120
|
-
index = indexes.get("taxonomy_test")
|
|
121
|
-
self.assertListEqual(sorted(index), ["1", "2"])
|
|
122
|
-
body_data = {
|
|
123
|
-
"languages": ["fr", "en", "nl", "ru", "da", "de"],
|
|
124
|
-
"tree": {
|
|
125
|
-
"key": "0",
|
|
126
|
-
"title": "Test vocabulary",
|
|
127
|
-
"subnodes": [],
|
|
128
|
-
"default_language": "da",
|
|
129
|
-
},
|
|
130
|
-
"taxonomy": "collective.taxonomy.test",
|
|
131
|
-
}
|
|
132
|
-
json_str = json.dumps(body_data)
|
|
133
|
-
bytes_data = json_str.encode("utf-8")
|
|
134
|
-
self.request.set("BODY", bytes_data)
|
|
135
|
-
self.request.method = "POST"
|
|
136
|
-
result = self.portal.restrictedTraverse("@@taxonomy-import")()
|
|
137
|
-
self.assertEqual(
|
|
138
|
-
result,
|
|
139
|
-
'{"status": "error", "message": "Term \\"Information Science\\" can\'t be removed because it is used (at least) here : http://nohost/plone/test-page"}',
|
|
140
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/__init__.py
RENAMED
|
File without changes
|
{imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/adapters.py
RENAMED
|
File without changes
|
{imio_smartweb_common-1.2.23 → imio_smartweb_common-1.2.24}/src/imio/smartweb/common/adapters.zcml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|