diff --git a/README.md b/README.md index 5726066..04fdfc3 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,8 @@ ibexa: Next, import the routes into your project: ```yaml -netgen_better_ibexa_admin_ui: - resource: '@NetgenBetterIbexaAdminUIBundle/Resources/config/routing.yaml' +netgen_ibexa_admin_ui_extra: + resource: '@NetgenIbexaAdminUIExtraBundle/Resources/config/routing.yaml' ``` Licensed under [GPLv2](LICENSE) diff --git a/bundle/Controller/Content/UpdateAlwaysAvailable.php b/bundle/Controller/Content/UpdateAlwaysAvailable.php index 0c1afef..1528c01 100644 --- a/bundle/Controller/Content/UpdateAlwaysAvailable.php +++ b/bundle/Controller/Content/UpdateAlwaysAvailable.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace Netgen\Bundle\BetterIbexaAdminUIBundle\Controller\Content; +namespace Netgen\Bundle\IbexaAdminUIExtraBundle\Controller\Content; use Ibexa\Contracts\AdminUi\Controller\Controller; use Ibexa\Contracts\Core\Repository\ContentService; use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException; use Ibexa\Core\Helper\TranslationHelper; -use Netgen\Bundle\BetterIbexaAdminUIBundle\Form\FormFactory; +use Netgen\Bundle\IbexaAdminUIExtraBundle\Form\FormFactory; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; @@ -33,7 +33,7 @@ public function __invoke(int $id, Request $request): Response if ($form->isSubmitted() && $form->isValid()) { $contentInfo = $this->contentService->loadContentInfo($id); - /** @var \Netgen\Bundle\BetterIbexaAdminUIBundle\Form\Data\Content\ContentUpdateAlwaysAvailableData $data */ + /** @var \Netgen\Bundle\IbexaAdminUIExtraBundle\Form\Data\Content\ContentUpdateAlwaysAvailableData $data */ $data = $form->getData(); $alwaysAvailable = $data->getAlwaysAvailable(); diff --git a/bundle/DependencyInjection/Compiler/SearchOverridePass.php b/bundle/DependencyInjection/Compiler/SearchOverridePass.php index bdff216..c64fae1 100644 --- a/bundle/DependencyInjection/Compiler/SearchOverridePass.php +++ b/bundle/DependencyInjection/Compiler/SearchOverridePass.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Netgen\Bundle\BetterIbexaAdminUIBundle\DependencyInjection\Compiler; +namespace Netgen\Bundle\IbexaAdminUIExtraBundle\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; diff --git a/bundle/DependencyInjection/NetgenBetterIbexaAdminUIExtension.php b/bundle/DependencyInjection/NetgenIbexaAdminUIExtraExtension.php similarity index 90% rename from bundle/DependencyInjection/NetgenBetterIbexaAdminUIExtension.php rename to bundle/DependencyInjection/NetgenIbexaAdminUIExtraExtension.php index 1e9e502..d3a2393 100644 --- a/bundle/DependencyInjection/NetgenBetterIbexaAdminUIExtension.php +++ b/bundle/DependencyInjection/NetgenIbexaAdminUIExtraExtension.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Netgen\Bundle\BetterIbexaAdminUIBundle\DependencyInjection; +namespace Netgen\Bundle\IbexaAdminUIExtraBundle\DependencyInjection; use Symfony\Component\Config\FileLocator; use Symfony\Component\Config\Loader\DelegatingLoader; @@ -17,7 +17,7 @@ use function file_get_contents; -final class NetgenBetterIbexaAdminUIExtension extends Extension implements PrependExtensionInterface +final class NetgenIbexaAdminUIExtraExtension extends Extension implements PrependExtensionInterface { public function load(array $configs, ContainerBuilder $container): void { diff --git a/bundle/Form/Data/Content/ContentUpdateAlwaysAvailableData.php b/bundle/Form/Data/Content/ContentUpdateAlwaysAvailableData.php index 7a56587..e7e77df 100644 --- a/bundle/Form/Data/Content/ContentUpdateAlwaysAvailableData.php +++ b/bundle/Form/Data/Content/ContentUpdateAlwaysAvailableData.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Netgen\Bundle\BetterIbexaAdminUIBundle\Form\Data\Content; +namespace Netgen\Bundle\IbexaAdminUIExtraBundle\Form\Data\Content; class ContentUpdateAlwaysAvailableData { diff --git a/bundle/Form/FormFactory.php b/bundle/Form/FormFactory.php index 1eed6fb..ce13609 100644 --- a/bundle/Form/FormFactory.php +++ b/bundle/Form/FormFactory.php @@ -2,11 +2,10 @@ declare(strict_types=1); -namespace Netgen\Bundle\BetterIbexaAdminUIBundle\Form; +namespace Netgen\Bundle\IbexaAdminUIExtraBundle\Form; -use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; -use Netgen\Bundle\BetterIbexaAdminUIBundle\Form\Data\Content\ContentUpdateAlwaysAvailableData; -use Netgen\Bundle\BetterIbexaAdminUIBundle\Form\Type\Content\Translation\AlwaysAvailableUpdateType; +use Netgen\Bundle\IbexaAdminUIExtraBundle\Form\Data\Content\ContentUpdateAlwaysAvailableData; +use Netgen\Bundle\IbexaAdminUIExtraBundle\Form\Type\Content\Translation\AlwaysAvailableUpdateType; use Symfony\Component\Form\FormFactoryInterface; use Symfony\Component\Form\FormInterface; diff --git a/bundle/Form/Type/Content/Translation/AlwaysAvailableUpdateType.php b/bundle/Form/Type/Content/Translation/AlwaysAvailableUpdateType.php index 798c350..7d61077 100644 --- a/bundle/Form/Type/Content/Translation/AlwaysAvailableUpdateType.php +++ b/bundle/Form/Type/Content/Translation/AlwaysAvailableUpdateType.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace Netgen\Bundle\BetterIbexaAdminUIBundle\Form\Type\Content\Translation; +namespace Netgen\Bundle\IbexaAdminUIExtraBundle\Form\Type\Content\Translation; -use Netgen\Bundle\BetterIbexaAdminUIBundle\Form\Data\Content\ContentUpdateAlwaysAvailableData; +use Netgen\Bundle\IbexaAdminUIExtraBundle\Form\Data\Content\ContentUpdateAlwaysAvailableData; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\CheckboxType; use Symfony\Component\Form\FormBuilderInterface; diff --git a/bundle/NetgenBetterIbexaAdminUIBundle.php b/bundle/NetgenIbexaAdminUIExtraBundle.php similarity index 58% rename from bundle/NetgenBetterIbexaAdminUIBundle.php rename to bundle/NetgenIbexaAdminUIExtraBundle.php index 18c811b..b028807 100644 --- a/bundle/NetgenBetterIbexaAdminUIBundle.php +++ b/bundle/NetgenIbexaAdminUIExtraBundle.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace Netgen\Bundle\BetterIbexaAdminUIBundle; +namespace Netgen\Bundle\IbexaAdminUIExtraBundle; -use Netgen\Bundle\BetterIbexaAdminUIBundle\DependencyInjection\Compiler\SearchOverridePass; +use Netgen\Bundle\IbexaAdminUIExtraBundle\DependencyInjection\Compiler\SearchOverridePass; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\HttpKernel\Bundle\Bundle; -final class NetgenBetterIbexaAdminUIBundle extends Bundle +final class NetgenIbexaAdminUIExtraBundle extends Bundle { public function build(ContainerBuilder $container): void { diff --git a/bundle/Resources/config/routing.yaml b/bundle/Resources/config/routing.yaml index 9cab051..478d5d3 100644 --- a/bundle/Resources/config/routing.yaml +++ b/bundle/Resources/config/routing.yaml @@ -1,6 +1,6 @@ -netgen.better_ibexa_admin_ui.content.update_always_available: +netgen.ibexa_admin_ui_extra.content.update_always_available: path: /content/{id}/update-always-available methods: ['POST'] - controller: 'Netgen\Bundle\BetterIbexaAdminUIBundle\Controller\Content\UpdateAlwaysAvailable' + controller: 'Netgen\Bundle\IbexaAdminUIExtraBundle\Controller\Content\UpdateAlwaysAvailable' requirements: id: \d+ diff --git a/bundle/Resources/config/services/controllers.yaml b/bundle/Resources/config/services/controllers.yaml index ba77ccf..bde2c05 100644 --- a/bundle/Resources/config/services/controllers.yaml +++ b/bundle/Resources/config/services/controllers.yaml @@ -1,8 +1,8 @@ services: - Netgen\Bundle\BetterIbexaAdminUIBundle\Controller\Content\UpdateAlwaysAvailable: + Netgen\Bundle\IbexaAdminUIExtraBundle\Controller\Content\UpdateAlwaysAvailable: parent: Ibexa\Contracts\AdminUi\Controller\Controller arguments: - '@translator' - '@ibexa.api.service.content' - - '@Netgen\Bundle\BetterIbexaAdminUIBundle\Form\FormFactory' + - '@Netgen\Bundle\IbexaAdminUIExtraBundle\Form\FormFactory' - '@Ibexa\Core\Helper\TranslationHelper' diff --git a/bundle/Resources/config/services/forms.yaml b/bundle/Resources/config/services/forms.yaml index 3fd149a..fb2fbee 100644 --- a/bundle/Resources/config/services/forms.yaml +++ b/bundle/Resources/config/services/forms.yaml @@ -1,6 +1,6 @@ services: - Netgen\Bundle\BetterIbexaAdminUIBundle\Form\Type\Content\Translation\AlwaysAvailableUpdateType: ~ + Netgen\Bundle\IbexaAdminUIExtraBundle\Form\Type\Content\Translation\AlwaysAvailableUpdateType: ~ - Netgen\Bundle\BetterIbexaAdminUIBundle\Form\FormFactory: + Netgen\Bundle\IbexaAdminUIExtraBundle\Form\FormFactory: arguments: - '@form.factory' diff --git a/bundle/Resources/config/services/tabs.yaml b/bundle/Resources/config/services/tabs.yaml index 9cafbe0..5721d97 100644 --- a/bundle/Resources/config/services/tabs.yaml +++ b/bundle/Resources/config/services/tabs.yaml @@ -1,11 +1,11 @@ services: - Netgen\Bundle\BetterIbexaAdminUIBundle\Tab\LocationView\TranslationsTab: + Netgen\Bundle\IbexaAdminUIExtraBundle\Tab\LocationView\TranslationsTab: decorates: Ibexa\AdminUi\Tab\LocationView\TranslationsTab decoration_inner_name: TranslationsTab.inner arguments: - '@TranslationsTab.inner' - '@Ibexa\Core\Repository\Permission\PermissionResolver' - - '@Netgen\Bundle\BetterIbexaAdminUIBundle\Form\FormFactory' + - '@Netgen\Bundle\IbexaAdminUIExtraBundle\Form\FormFactory' - '@twig' - '@translator' - '@event_dispatcher' diff --git a/bundle/Resources/config/services/templating.yaml b/bundle/Resources/config/services/templating.yaml index 6a63e75..f42aef8 100644 --- a/bundle/Resources/config/services/templating.yaml +++ b/bundle/Resources/config/services/templating.yaml @@ -1,12 +1,12 @@ services: - netgen.better_ibexa_admin_ui.twig.runtime.better_ibexa_admin_ui: - class: Netgen\Bundle\BetterIbexaAdminUIBundle\Templating\Twig\BetterIbexaAdminUIRuntime + netgen.ibexa_admin_ui_extra.twig.runtime.ibexa_admin_ui_extra: + class: Netgen\Bundle\IbexaAdminUIExtraBundle\Templating\Twig\IbexaAdminUIExtraRuntime arguments: - "@ibexa.api.service.content" tags: - { name: twig.runtime } - netgen.better_ibexa_admin_ui.twig.extension.better_ibexa_admin_ui: - class: Netgen\Bundle\BetterIbexaAdminUIBundle\Templating\Twig\BetterIbexaAdminUIExtension + netgen.ibexa_admin_ui_extra.twig.extension.ibexa_admin_ui_extra: + class: Netgen\Bundle\IbexaAdminUIExtraBundle\Templating\Twig\IbexaAdminUIExtraExtension tags: - { name: twig.extension } diff --git a/bundle/Resources/translations/locationview.en.yaml b/bundle/Resources/translations/locationview.en.yaml index 4426723..9f47b7b 100644 --- a/bundle/Resources/translations/locationview.en.yaml +++ b/bundle/Resources/translations/locationview.en.yaml @@ -1,3 +1,5 @@ content.update_always_available.title: "Make available in the main language when missing translations" content.update_always_available.success.available: "Content '%name%' marked as always available." content.update_always_available.success.not_available: "Content '%name%' unmarked as always available." +content.update_always_available.toggle_widget.label.on: "On" +content.update_always_available.toggle_widget.label.off: "Off" diff --git a/bundle/Resources/views/themes/ngadmin/content/tab/translations/tab.html.twig b/bundle/Resources/views/themes/ngadmin/content/tab/translations/tab.html.twig index 1e55ab3..7a26976 100644 --- a/bundle/Resources/views/themes/ngadmin/content/tab/translations/tab.html.twig +++ b/bundle/Resources/views/themes/ngadmin/content/tab/translations/tab.html.twig @@ -24,15 +24,15 @@ /> - {{ 'toggle_widget.label.on'|trans }} + {{ 'content.update_always_available.toggle_widget.label.on'|trans }} - {{ 'toggle_widget.label.off'|trans }} + {{ 'content.update_always_available.toggle_widget.label.off'|trans }} - {{ form_start(form_always_available_update, { action: path('netgen.better_ibexa_admin_ui.content.update_always_available', { id: content.id }) }) }} + {{ form_start(form_always_available_update, { action: path('netgen.ibexa_admin_ui_extra.content.update_always_available', { id: content.id }) }) }} {{ form_row(form_always_available_update.always_available, { label_attr: { hidden: true } }) }} {{ form_end(form_always_available_update) }} {% endif %} diff --git a/bundle/Tab/LocationView/TranslationsTab.php b/bundle/Tab/LocationView/TranslationsTab.php index f626948..15843a1 100644 --- a/bundle/Tab/LocationView/TranslationsTab.php +++ b/bundle/Tab/LocationView/TranslationsTab.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace Netgen\Bundle\BetterIbexaAdminUIBundle\Tab\LocationView; +namespace Netgen\Bundle\IbexaAdminUIExtraBundle\Tab\LocationView; use Ibexa\AdminUi\Tab\LocationView\TranslationsTab as IbexaTranslationsTab; use Ibexa\Contracts\AdminUi\Tab\AbstractEventDispatchingTab; use Ibexa\Contracts\AdminUi\Tab\OrderedTabInterface; use Ibexa\Contracts\Core\Repository\PermissionResolver; -use Netgen\Bundle\BetterIbexaAdminUIBundle\Form\FormFactory; +use Netgen\Bundle\IbexaAdminUIExtraBundle\Form\FormFactory; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\Translation\TranslatorInterface; use Twig\Environment; diff --git a/bundle/Templating/Twig/BetterIbexaAdminUIExtension.php b/bundle/Templating/Twig/IbexaAdminUIExtraExtension.php similarity index 56% rename from bundle/Templating/Twig/BetterIbexaAdminUIExtension.php rename to bundle/Templating/Twig/IbexaAdminUIExtraExtension.php index 6fbba63..8cc7029 100644 --- a/bundle/Templating/Twig/BetterIbexaAdminUIExtension.php +++ b/bundle/Templating/Twig/IbexaAdminUIExtraExtension.php @@ -2,19 +2,19 @@ declare(strict_types=1); -namespace Netgen\Bundle\BetterIbexaAdminUIBundle\Templating\Twig; +namespace Netgen\Bundle\IbexaAdminUIExtraBundle\Templating\Twig; use Twig\Extension\AbstractExtension; use Twig\TwigFunction; -final class BetterIbexaAdminUIExtension extends AbstractExtension +final class IbexaAdminUIExtraExtension extends AbstractExtension { public function getFunctions(): array { return [ new TwigFunction( 'ng_count_content_by_content_type', - [BetterIbexaAdminUIRuntime::class, 'countContentByContentType'], + [IbexaAdminUIExtraRuntime::class, 'countContentByContentType'], ), ]; } diff --git a/bundle/Templating/Twig/BetterIbexaAdminUIRuntime.php b/bundle/Templating/Twig/IbexaAdminUIExtraRuntime.php similarity index 84% rename from bundle/Templating/Twig/BetterIbexaAdminUIRuntime.php rename to bundle/Templating/Twig/IbexaAdminUIExtraRuntime.php index c6f36b8..3ea1117 100644 --- a/bundle/Templating/Twig/BetterIbexaAdminUIRuntime.php +++ b/bundle/Templating/Twig/IbexaAdminUIExtraRuntime.php @@ -2,14 +2,14 @@ declare(strict_types=1); -namespace Netgen\Bundle\BetterIbexaAdminUIBundle\Templating\Twig; +namespace Netgen\Bundle\IbexaAdminUIExtraBundle\Templating\Twig; use Ibexa\Contracts\Core\Repository\ContentService; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Filter\Filter; use Twig\Extension\RuntimeExtensionInterface; -final class BetterIbexaAdminUIRuntime implements RuntimeExtensionInterface +final class IbexaAdminUIExtraRuntime implements RuntimeExtensionInterface { private ContentService $contentService; diff --git a/composer.json b/composer.json index 2b0bc82..6e44e3b 100644 --- a/composer.json +++ b/composer.json @@ -11,15 +11,15 @@ } ], "require": { - "ibexa/admin-ui": "^4.4" + "ibexa/admin-ui": "^4.6" }, "require-dev": { - "netgen/ibexa-site-api": "^5.4", + "netgen/ibexa-site-api": "^6.1", "ibexa/graphql": "^4.5" }, "autoload": { "psr-4": { - "Netgen\\Bundle\\BetterIbexaAdminUIBundle\\": "bundle" + "Netgen\\Bundle\\IbexaAdminUIExtraBundle\\": "bundle" } }, "extra": {