diff --git a/bundle/NetgenInformationCollectionBundle.php b/bundle/NetgenInformationCollectionBundle.php index 5fca24be..9d5c93e0 100644 --- a/bundle/NetgenInformationCollectionBundle.php +++ b/bundle/NetgenInformationCollectionBundle.php @@ -2,6 +2,8 @@ namespace Netgen\Bundle\InformationCollectionBundle; +use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\EzPublishCoreExtension; +use Netgen\Bundle\InformationCollectionBundle\PolicyProvider\InformationCollectionPolicyProvider; use Netgen\Bundle\InformationCollectionBundle\DependencyInjection\Compiler\ActionsPass; use Netgen\Bundle\InformationCollectionBundle\DependencyInjection\Compiler\CustomFieldHandlersPass; use Netgen\Bundle\InformationCollectionBundle\DependencyInjection\Compiler\FieldAnonymizerVisitorPass; @@ -20,5 +22,10 @@ public function build(ContainerBuilder $container) $container->addCompilerPass(new ActionsPass()); $container->addCompilerPass(new CustomFieldHandlersPass()); $container->addCompilerPass(new FieldAnonymizerVisitorPass()); + + $eZExtension = $container->getExtension('ezpublish'); + if ($eZExtension instanceof EzPublishCoreExtension) { + $eZExtension->addPolicyProvider(new InformationCollectionPolicyProvider()); + } } } diff --git a/bundle/PolicyProvider/InformationCollectionPolicyProvider.php b/bundle/PolicyProvider/InformationCollectionPolicyProvider.php new file mode 100644 index 00000000..e0253059 --- /dev/null +++ b/bundle/PolicyProvider/InformationCollectionPolicyProvider.php @@ -0,0 +1,28 @@ +addConfig([ + 'infocollector' => [ + 'read' => [], + 'delete' => [], + 'anonymize' => [], + 'export' => [], + ], + ]); + + return []; + } +} diff --git a/bundle/Resources/translations/netgen_information_collection_admin.en.yml b/bundle/Resources/translations/netgen_information_collection_admin.en.yml index ba5b10a3..334e97e0 100644 --- a/bundle/Resources/translations/netgen_information_collection_admin.en.yml +++ b/bundle/Resources/translations/netgen_information_collection_admin.en.yml @@ -29,6 +29,7 @@ netgen_information_collection_admin_collection_no_collections_results: "Displayi netgen_information_collection_admin_view_title: 'Collection #%collection_id% for %content_name%' netgen_information_collection_admin_view_subtitle: 'Last modified: %date%, %user_name%' +netgen_information_collection_admin_view_download: 'Download link' netgen_information_collection_admin_view_delete: 'Delete' netgen_information_collection_admin_view_anonymize: 'Anonymize' netgen_information_collection_admin_view_delete_field: 'Delete selected fields' diff --git a/bundle/Resources/views/admin/view.html.twig b/bundle/Resources/views/admin/view.html.twig index e0111f0d..9cdbda72 100644 --- a/bundle/Resources/views/admin/view.html.twig +++ b/bundle/Resources/views/admin/view.html.twig @@ -35,7 +35,11 @@ {{ ez_field_name(content, attribute.field.identifier) }}: - {{ attribute.entity.value }} + {% if attribute.field.fieldTypeIdentifier == 'enhancedezbinaryfile' %} + {{ 'netgen_information_collection_admin_view_download'|trans }}: {{ attribute.field.identifier }} + {% else %} + {{ attribute.entity.value }} + {% endif %} diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index 3916d810..22d090a9 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -6,6 +6,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [1.7.0] - 2020-01-24 +### Added +- Implemented Information collection policy provider +- Enabled download controller for enhanced binary file + ## [1.6.8] - 2019-04-26 ### Added - A bit more looser coupling to `doctrine/orm` version