jlchassaing / gie_eztoolbar
允许从前端创建、编辑、删除内容,登录后无需再次登录后台
v1.0
2020-08-17 15:12 UTC
Requires
- php: ^7.1.3
- ezsystems/doctrine-dbal-schema: ~0.1.2
- ezsystems/ez-support-tools: ~1.0.3
- ezsystems/ezplatform-admin-ui: ~1.5.2
- ezsystems/ezplatform-core: ~1.0.2
- ezsystems/ezplatform-design-engine: ~2.0.0
- ezsystems/ezplatform-standard-design: ~0.2.1
- ezsystems/ezplatform-user: ~1.0.3
- ezsystems/ezpublish-kernel: ~7.5.2
- ezsystems/repository-forms: ~2.5.1
This package is auto-updated.
Last update: 2024-09-29 05:02:41 UTC
README
GieEzToolbarBundle
Ez Platform 2 工具栏包
安装
使用 composer 安装
composer require jlchassaing/gie_eztoolbar dev-master
添加到内核
在 app/AppKernel.php 的 registerBundles 函数末尾加载这个包
new Gie\EzToolbarBundle\GieEzToolbarBundle(),
添加路由
将路由文件加载到 app/config/routing.yml 文件中
_gieeztoolbarRoutes: resource: "@GieEzToolbarBundle/Resources/config/routing.yml"
构建 scss
使用命令构建 scss
yarn encore dev
显示工具栏
将工具栏编辑添加到 pagelayout.html.twig。将此代码放置在您想要显示工具栏的位置。推荐放在页面顶部,其他位置尚未测试。
{{ ezToolbar(location is defined ? location : null) }}
设置用户权限
如果您使用特定用户而不是管理员,您需要设置用户策略。
将工具栏角色策略分配给用户或无限制的组。登录到前端页面后,使用匹配的用户,工具栏应该会显示。
工具栏将根据特定内容类型创建限制进行调整。
您应该添加版本查看权限而不受任何限制,因为工具栏实际上并不处理版本冲突。
功能
您应该能够创建、编辑和取消(创建和编辑)。有许多事情要做
-
用于编辑内容的创建新草稿代码不满意。需要进行一些重构。
-
编写特性和 phpunit 测试