diff --git a/config/pimcore/config.yaml b/config/pimcore/config.yaml index 0e19325..1fced03 100644 --- a/config/pimcore/config.yaml +++ b/config/pimcore/config.yaml @@ -1,3 +1,7 @@ +doctrine_migrations: + migrations_paths: + Neusta\Pimcore\AreabrickConfigBundle\Migrations: '@NeustaPimcoreAreabrickConfigBundle/migrations' + neusta_converter: converter: neusta_pimcore_areabrick_config.brick.converter: diff --git a/migrations/Version20241001090000.php b/migrations/Version20241001090000.php new file mode 100644 index 0000000..f08fee9 --- /dev/null +++ b/migrations/Version20241001090000.php @@ -0,0 +1,27 @@ +addSql("INSERT IGNORE INTO users_permission_definitions (`key`, `category`) VALUES(" . self::PERMISSION_KEY_AREABRICKS . ", 'Neusta Areabrick Config Bundle');"); + } + + public function down(Schema $schema): void + { + $this->addSql("DELETE FROM users_permission_definitions WHERE `key` = " . self::PERMISSION_KEY_AREABRICKS . ";"); + } + + protected function getBundleName(): string + { + return 'NeustaPimcoreAreabrickConfigBundle'; + } +} diff --git a/public/js/areabrick-overview.js b/public/js/areabrick-overview.js index 0b84ad0..d32207e 100644 --- a/public/js/areabrick-overview.js +++ b/public/js/areabrick-overview.js @@ -13,7 +13,7 @@ neusta.areabrick_config.areabrick_overview = Class.create({ if (!this.panel) { this.panel = Ext.create('Ext.panel.Panel', { id: this.tabId, - title: t('neusta_pimcore_areabrick_config.areabricks.overview.title'), + title: t('neusta_areabrick_config.areabrick_overview'), iconCls: 'pimcore_icon_areabrick', border: false, layout: 'fit', diff --git a/public/js/startup.js b/public/js/startup.js index b342981..01bdb1e 100644 --- a/public/js/startup.js +++ b/public/js/startup.js @@ -16,12 +16,12 @@ neusta.areabrick_config.startup = Class.create({ return; } - if (!pimcore.globalmanager.get('user').isAllowed('areabricks')) { + if (!pimcore.globalmanager.get('user').isAllowed('neusta_areabrick_config.areabrick_overview')) { return; } const items = { - text: t('neusta_pimcore_areabrick_config.areabricks.overview.title'), + text: t('neusta_areabrick_config.areabrick_overview'), iconCls: 'pimcore_nav_icon_objectbricks', priority: 31, itemId: 'pimcore_menu_tools_areabricks', diff --git a/src/Migrations/Version20241001090000.php b/src/Migrations/Version20241001090000.php deleted file mode 100644 index 486433c..0000000 --- a/src/Migrations/Version20241001090000.php +++ /dev/null @@ -1,35 +0,0 @@ -addSql("INSERT IGNORE INTO users_permission_definitions (`key`) VALUES(" . self::PERMISSION_KEY_AREABRICKS . ");"); - } - - public function down(Schema $schema): void - { - $this->addSql("DELETE FROM users_permission_definitions WHERE `key` = " . self::PERMISSION_KEY_AREABRICKS . ";"); - } -} diff --git a/translations/admin.de.yaml b/translations/admin.de.yaml index 380daaf..a6371ea 100644 --- a/translations/admin.de.yaml +++ b/translations/admin.de.yaml @@ -1,4 +1,2 @@ -neusta_pimcore_areabrick_config: - areabricks: - overview: - title: Areabrick-Übersicht +neusta_areabrick_config: + areabrick_overview: Areabrick-Übersicht diff --git a/translations/admin.en.yaml b/translations/admin.en.yaml index 8699503..b9f5a76 100644 --- a/translations/admin.en.yaml +++ b/translations/admin.en.yaml @@ -1,4 +1,2 @@ -neusta_pimcore_areabrick_config: - areabricks: - overview: - title: Areabrick Overview +neusta_areabrick_config: + areabrick_overview: Areabrick Overview