From bf0ee2495d006b79b121b07bec5eac707cd7e353 Mon Sep 17 00:00:00 2001 From: teebbstudios Date: Thu, 10 Dec 2020 09:57:08 +0800 Subject: [PATCH] config split and from_email --- CHANGELOG.md | 6 +- config/packages/teebb_core.yaml | 191 ++---------------- .../teebb_core/teebb_dashboard_blocks.yaml | 98 +++++++++ .../packages/teebb_core/teebb_side_menu.yaml | 80 ++++++++ 4 files changed, 196 insertions(+), 179 deletions(-) create mode 100644 config/packages/teebb_core/teebb_dashboard_blocks.yaml create mode 100644 config/packages/teebb_core/teebb_side_menu.yaml diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a3e707..e2cccb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,4 +3,8 @@ 0.1.1: 1. fosckeditorbundle 添加文件图片拖拽上传和图片上传功能 2. 用户组权限调整,不同用户组可设置不同的ckeditor工具栏配置 -3. 文本、长文本字段默认过滤所有HTML标签 \ No newline at end of file +3. 文本、长文本字段默认过滤所有HTML标签 + +0.1.2: +1. 邮件发送fromAddress去除硬编码,改为在teebb_core.yaml文件中手动配置且必须配置 +2. Dashboard控制台首页blocks、侧边栏菜单使用单独yaml文件配置 \ No newline at end of file diff --git a/config/packages/teebb_core.yaml b/config/packages/teebb_core.yaml index a4f05b5..91e6fc7 100644 --- a/config/packages/teebb_core.yaml +++ b/config/packages/teebb_core.yaml @@ -1,190 +1,20 @@ teebb_core: - #Dashboard 侧边栏菜单 - side_menu: - content: - content: - label: Content - icon: fa-file-alt - items: - - label: Add Content - route: teebb_content_create_index - #route_params: {typeAlias: content} - groups: [] - - label: Manage Content - route: teebb_content_index - groups: [] - groups: [] - type: - label: Type - icon: fa-boxes - items: - - label: Add Type - route: content_create - groups: [] - - label: Manage Type - route: content_index - groups: [] - groups: [] - taxonomy: - label: Taxonomy - icon: fa-tags - items: - - label: Add Taxonomy - route: taxonomy_create - groups: [] - - label: Manage Taxonomy - route: taxonomy_index - groups: [] - groups: [] - other: - menu: - label: Menu - icon: fa-list - items: - - label: Add Menu - route: teebb_menu_create - groups: [] - - label: Manage Menu - route: teebb_menu_index - groups: [] - groups: [] - comment: - label: Comment - icon: fa-comment - items: - - label: Manage Comment - route: comment_index - groups: [] - groups: [] - user: - label: User - icon: fa-user - items: - - label: Manage User - route: user_people_index - groups: [] - - label: User Group - route: user_group_index - groups: [] - settings: - system: - label: System - icon: fa-tools - items: - - label: Settings - route: teebb_system_option - groups: [] - - label: Text Formatter - route: teebb_formatter_index - groups: [] - groups: [] - - #dashboard index blocks - blocks: - - position: top - type: teebb.core.block.count #block service type - class: col-xl-3 col-md-6 mb-4 #block class - groups: [] #block show user groups - settings: - entity_class: Teebb\CoreBundle\Entity\Content #block admin. admin 对应的entity 应含有 createAt 和 updateAt 两个时间属性。 - label: contents(last month) #block label - #translation_domain: #default: messages - icon: fas fa-file-alt #block icon - border: border-left-primary #block border - #property: createdAt #query object property. 要查询的Entity的属性以此属性统计数量 - duration: -1 month #The count of content in a duration, must earlier than now. see php strtotime. default: -1 month - #template: #default template @TeebbCore/Block/count_block.html.twig - - - position: top - type: teebb.core.block.count #block service type - class: col-xl-3 col-md-6 mb-4 #block class - groups: [] #block show user groups - settings: - entity_class: Teebb\CoreBundle\Entity\Types\Types #block admin. admin 对应的entity 应含有 createAt 和 updateAt 两个时间属性。 - bundle: content - label: content_types #block label - #translation_domain: #default: messages - icon: fas fa-boxes #block icon - border: border-left-success #block border - #property: createdAt #query object property. 要查询的Entity的属性以此属性统计数量 - duration: -1 month #The count of content in a duration, must earlier than now. see php strtotime. default: -1 month - #template: #default template @TeebbCore/Block/count_block.html.twig - - - position: top - type: teebb.core.block.count #block service type - class: col-xl-3 col-md-6 mb-4 #block class - groups: [] #block show user groups - settings: - entity_class: Teebb\CoreBundle\Entity\User #block admin. admin 对应的entity 应含有 createAt 和 updateAt 两个时间属性。 - label: users(last month) #block label - #translation_domain: #default: messages - icon: fas fa-user #block icon - border: border-left-info #block border - #property: createdAt #query object property. 要查询的Entity的属性以此属性统计数量 - duration: -1 month #The count of content in a duration, must earlier than now. see php strtotime. default: -1 month - #template: #default template @TeebbCore/Block/count_block.html.twig - - - position: top - type: teebb.core.block.count #block service type - class: col-xl-3 col-md-6 mb-4 #block class - groups: [] #block show user groups - settings: - entity_class: Teebb\CoreBundle\Entity\Comment #block admin. admin 对应的entity 应含有 createAt 和 updateAt 两个时间属性。 - label: comments(last month) #block label - #translation_domain: #default: messages - icon: fas fa-comments #block icon - border: border-left-warning #block border - #property: createdAt #query object property. 要查询的Entity的属性以此属性统计数量 - duration: -1 month #The count of content in a duration, must earlier than now. see php strtotime. default: -1 month - #template: #default template @TeebbCore/Block/count_block.html.twig - - - position: left - type: teebb.core.block.text - settings: - label: Welcome to Teebb - content: Teebb Information - template: '@TeebbCore\blocks\dashboard_base_block.html.twig' - - - position: left - type: teebb.core.block.types - settings: - label: Content Types - bundle: content - - - position: left - type: teebb.core.block.contents - settings: - label: New users - entity_class: Teebb\CoreBundle\Entity\User - property: createdAt - order: DESC - template: '@TeebbCore\blocks\new_users.html.twig' - - - position: right - type: teebb.core.block.contents - settings: - label: Last contents - entity_class: Teebb\CoreBundle\Entity\Content - property: createdAt - order: DESC - - - position: right - type: teebb.core.block.contents - settings: - label: Last comments - entity_class: Teebb\CoreBundle\Entity\Comment - property: createdAt - order: DESC - template: '@TeebbCore\blocks\last_comments.html.twig' - + #用于自动检测并获取teebb中的注解配置 mapping: directories: ['%kernel.project_dir%/src'] + #邮件发送人配置此项必须配置,请修改为您的配置 + from_email: + address: sender@quanweiwei.cn + address_name: TEEBB.COM管理员 + + fly_system: service: '%fly_system_service%' #此变量用于生成上传文件的链接 root_host_url: '%fly_system_host%/uploads' + #文本过滤器用于 文本已格式化字段,长文本已格式化字段,长文本已格式化字段带摘要 filter_settings: strip_tags: filter_class: Teebb\CoreBundle\TextFilter\StripTagsFilter @@ -201,6 +31,7 @@ teebb_core: filter_class: Teebb\CoreBundle\TextFilter\EscapeHtmlFilter filter_label: teebb.core.form.escape_html_filter + #配置页面中额外的assets库,使用TemplateRegister将对应库加入页面 assets: extra: transliteration: @@ -325,3 +156,7 @@ doctrine: dir: "%kernel.project_dir%/vendor/gedmo/doctrine-extensions/src/Tree/Entity" alias: GedmoTree # (optional) it will default to the name set for the mapping is_bundle: false + +#加入额外配置:控制台首页blocks和边栏菜单 +imports: + - { resource: teebb_core/ } \ No newline at end of file diff --git a/config/packages/teebb_core/teebb_dashboard_blocks.yaml b/config/packages/teebb_core/teebb_dashboard_blocks.yaml new file mode 100644 index 0000000..0465dad --- /dev/null +++ b/config/packages/teebb_core/teebb_dashboard_blocks.yaml @@ -0,0 +1,98 @@ +teebb_core: + #dashboard index blocks + blocks: + - position: top + type: teebb.core.block.count #block service type + class: col-xl-3 col-md-6 mb-4 #block class + groups: [] #block show user groups + settings: + entity_class: Teebb\CoreBundle\Entity\Content #block admin. admin 对应的entity 应含有 createAt 和 updateAt 两个时间属性。 + label: contents(last month) #block label + #translation_domain: #default: messages + icon: fas fa-file-alt #block icon + border: border-left-primary #block border + #property: createdAt #query object property. 要查询的Entity的属性以此属性统计数量 + duration: -1 month #The count of content in a duration, must earlier than now. see php strtotime. default: -1 month + #template: #default template @TeebbCore/Block/count_block.html.twig + + - position: top + type: teebb.core.block.count #block service type + class: col-xl-3 col-md-6 mb-4 #block class + groups: [] #block show user groups + settings: + entity_class: Teebb\CoreBundle\Entity\Types\Types #block admin. admin 对应的entity 应含有 createAt 和 updateAt 两个时间属性。 + bundle: content + label: content_types #block label + #translation_domain: #default: messages + icon: fas fa-boxes #block icon + border: border-left-success #block border + #property: createdAt #query object property. 要查询的Entity的属性以此属性统计数量 + duration: -1 month #The count of content in a duration, must earlier than now. see php strtotime. default: -1 month + #template: #default template @TeebbCore/Block/count_block.html.twig + + - position: top + type: teebb.core.block.count #block service type + class: col-xl-3 col-md-6 mb-4 #block class + groups: [] #block show user groups + settings: + entity_class: Teebb\CoreBundle\Entity\User #block admin. admin 对应的entity 应含有 createAt 和 updateAt 两个时间属性。 + label: users(last month) #block label + #translation_domain: #default: messages + icon: fas fa-user #block icon + border: border-left-info #block border + #property: createdAt #query object property. 要查询的Entity的属性以此属性统计数量 + duration: -1 month #The count of content in a duration, must earlier than now. see php strtotime. default: -1 month + #template: #default template @TeebbCore/Block/count_block.html.twig + + - position: top + type: teebb.core.block.count #block service type + class: col-xl-3 col-md-6 mb-4 #block class + groups: [] #block show user groups + settings: + entity_class: Teebb\CoreBundle\Entity\Comment #block admin. admin 对应的entity 应含有 createAt 和 updateAt 两个时间属性。 + label: comments(last month) #block label + #translation_domain: #default: messages + icon: fas fa-comments #block icon + border: border-left-warning #block border + #property: createdAt #query object property. 要查询的Entity的属性以此属性统计数量 + duration: -1 month #The count of content in a duration, must earlier than now. see php strtotime. default: -1 month + #template: #default template @TeebbCore/Block/count_block.html.twig + + - position: left + type: teebb.core.block.text + settings: + label: Welcome to Teebb + content: Teebb Information + template: '@TeebbCore\blocks\dashboard_base_block.html.twig' + + - position: left + type: teebb.core.block.types + settings: + label: Content Types + bundle: content + + - position: left + type: teebb.core.block.contents + settings: + label: New users + entity_class: Teebb\CoreBundle\Entity\User + property: createdAt + order: DESC + template: '@TeebbCore\blocks\new_users.html.twig' + + - position: right + type: teebb.core.block.contents + settings: + label: Last contents + entity_class: Teebb\CoreBundle\Entity\Content + property: createdAt + order: DESC + + - position: right + type: teebb.core.block.contents + settings: + label: Last comments + entity_class: Teebb\CoreBundle\Entity\Comment + property: createdAt + order: DESC + template: '@TeebbCore\blocks\last_comments.html.twig' diff --git a/config/packages/teebb_core/teebb_side_menu.yaml b/config/packages/teebb_core/teebb_side_menu.yaml new file mode 100644 index 0000000..c6fbab5 --- /dev/null +++ b/config/packages/teebb_core/teebb_side_menu.yaml @@ -0,0 +1,80 @@ +teebb_core: + #Dashboard 侧边栏菜单 + side_menu: + content: + content: + label: Content + icon: fa-file-alt + items: + - label: Add Content + route: teebb_content_create_index + #route_params: {typeAlias: content} + groups: [] + - label: Manage Content + route: teebb_content_index + groups: [] + groups: [] + type: + label: Type + icon: fa-boxes + items: + - label: Add Type + route: content_create + groups: [] + - label: Manage Type + route: content_index + groups: [] + groups: [] + taxonomy: + label: Taxonomy + icon: fa-tags + items: + - label: Add Taxonomy + route: taxonomy_create + groups: [] + - label: Manage Taxonomy + route: taxonomy_index + groups: [] + groups: [] + other: + menu: + label: Menu + icon: fa-list + items: + - label: Add Menu + route: teebb_menu_create + groups: [] + - label: Manage Menu + route: teebb_menu_index + groups: [] + groups: [] + comment: + label: Comment + icon: fa-comment + items: + - label: Manage Comment + route: comment_index + groups: [] + groups: [] + user: + label: User + icon: fa-user + items: + - label: Manage User + route: user_people_index + groups: [] + - label: User Group + route: user_group_index + groups: [] + settings: + system: + label: System + icon: fa-tools + items: + - label: Settings + route: teebb_system_option + groups: [] + - label: Text Formatter + route: teebb_formatter_index + groups: [] + groups: [] \ No newline at end of file -- GitLab