jelix / adminui-module
这是一个为 jelix 应用提供 AdminLte 主题管理界面的模块。其他主题也可以创建。
v1.0.2
2024-05-01 12:35 UTC
Requires
- php: >=7.4
- almasaeed2010/adminlte: ~3.2.0
README
这是一个为 Jelix 提供管理界面接口的模块。它使用 AdminLTE 主题 3.2.0,并且可以通过 API 完全自定义。
您可以通过不操作 HTML 来轻松地将内容添加到侧边栏、导航栏或仪表板。
该模块还提供 jForms 的小部件,用于生成 Bootstrap 的 HTML 和 AdminLTE 的 CSS。
此模块适用于 Jelix 1.7.10 及更高版本。
设置模块
最佳方法是使用 Composer。
在项目内的命令行中执行
composer require "jelix/adminui-module"
启动您的应用配置器以启用模块
php dev.php module:configure adminui
它将询问您如何安装网络资产(JS 和 CSS 文件)
- 通过将它们复制到应用程序的 www 目录中
- 或者如果您在 Web 服务器配置中定义了别名,则无需操作
- 名为
adminui-assets
的别名指向vendor/jelix/adminui-module/modules/adminui/www/adminui-assets/
- 名为
adminlte-assets
的别名指向vendor/vendor/almasaeed2010/adminlte/
- 名为
配置器还会在您的应用程序配置中创建一些参数
- 它将 jelix 主题定义为
adminlte
- 它重新定义了默认的 html 和 htmlerror 响应
- 它配置了网络资产
您可以在 app/system/mainconfig.ini.php
中更改一些配置参数
[adminui] ; the version of your application, appearing at the bottom bar appVersion=1.2.3 ; the logo of your application htmlLogo="<b>Admin</b>UI" ; the logo of your application when the left sidebar is minimized htmlLogoMini="<b>A</b>UI" ; the copyright informations, appearing at the bottom bar htmlCopyright="<strong>Copyright © 2024 <a href="https://jelix.org">Jelix</a>.</strong> MIT licence." ; the template used to display the dashboard. If empty, the dashboard may be empty dashboardTemplate="test~dashboard"
您还应在 yourapp/app/system/urls.xml
中设置仪表板的 URL,如下所示
<url pathinfo="/" module="adminui" action="default:index"/>
在这里,仪表板位于网站的根目录,但您也可以设置任何 URL。
配置模块后,您应启动安装程序以激活模块
php install/installer.php
用法
查看 doc/
目录
测试
测试目录中已创建一个应用程序。查看其 README.md 文件以启动它。
它包含许多示例。请勿犹豫阅读代码。