Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
semour
/
semour_admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
89836def
authored
Oct 24, 2022
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修整
parent
db4f1823
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
105 additions
and
43 deletions
app/Admin/Controllers/UserAddressController.php
app/Admin/Forms/AdminSetting.php
app/Admin/bootstrap.php
resources/lang/en/global.php
resources/lang/en/menu.php
resources/lang/en/user-address.php
resources/lang/zh_CN/global.php
resources/lang/zh_CN/menu.php
app/Admin/Controllers/UserAddressController.php
View file @
89836def
...
...
@@ -19,7 +19,7 @@ class UserAddressController extends AdminController
{
return
Grid
::
make
(
new
UserAddress
(),
function
(
Grid
$grid
)
{
$grid
->
column
(
'id'
)
->
sortable
();
$grid
->
column
(
'user_id'
)
->
width
(
70
);
$grid
->
user_id
(
)
->
width
(
70
);
$grid
->
column
(
'country'
);
$grid
->
column
(
'first_name'
);
$grid
->
column
(
'last_name'
);
...
...
@@ -30,8 +30,10 @@ class UserAddressController extends AdminController
$grid
->
column
(
'created_at'
);
$grid
->
column
(
'updated_at'
)
->
sortable
();
$grid
->
filter
(
function
(
Grid\Filter
$filter
)
{
$filter
->
equal
(
'id'
);
$filter
->
equal
(
'id'
)
->
width
(
3
);
$filter
->
equal
(
'user_id'
)
->
width
(
3
);
$filter
->
equal
(
'first_name'
)
->
width
(
3
);
$filter
->
equal
(
'last_name'
)
->
width
(
3
);
});
});
}
...
...
app/Admin/Forms/AdminSetting.php
View file @
89836def
...
...
@@ -20,6 +20,7 @@ class AdminSetting extends Form implements LazyRenderable
'default'
=>
'Default'
,
'blue'
=>
'Blue'
,
'blue-light'
=>
'Blue Light'
,
'layui-green'
=>
'Layui Green'
,
// 'blue-dark' => 'Blue Dark',
'green'
=>
'Green'
,
];
...
...
@@ -69,6 +70,7 @@ class AdminSetting extends Form implements LazyRenderable
'bg-success'
=>
'Success'
,
'bg-danger'
=>
'Danger'
,
'bg-dark'
=>
'Dark'
,
''
=>
'None'
,
]);
$this
->
checkbox
(
'layout.body_class'
,
trans
(
'admin.layout.sidebar_style'
))
...
...
app/Admin/bootstrap.php
View file @
89836def
...
...
@@ -31,6 +31,7 @@ config(['admin' => user_admin_config()]);
config
([
'app.locale'
=>
config
(
'admin.lang'
)
?:
config
(
'app.locale'
)]);
$primaryColor
=
Admin
::
color
()
->
primary
();
$primaryColor
=
'#009688'
;
Admin
::
style
(
<<<CSS
...
...
@@ -91,20 +92,24 @@ body.dark-mode .table-collapse table.custom-data-table.data-table tbody td {
z-index: 0;
}
.table-main table.custom-data-table thead,
.table-fixed table.custom-data-table thead tr th{
body:not(.dark-mode)
.table-main table.custom-data-table thead,
body:not(.dark-mode)
.table-fixed table.custom-data-table thead tr th{
position: sticky;
top: 0;
background-color: #ececf1;
}
.table-fixed table.custom-data-table thead tr th {
body:not(.dark-mode)
.table-fixed table.custom-data-table thead tr th {
z-index: 99;
}
CSS
);
Dcat\Admin\Color
::
extend
(
'layui-green'
,
[
'primary'
=>
'#009688'
,
'primary-darker'
=>
'#009688'
,
'link'
=>
'#009688'
,
]);
// 追加菜单
Admin
::
menu
()
->
add
(
include
__DIR__
.
'/menu.php'
,
0
);
...
...
@@ -135,8 +140,15 @@ HTML
Grid
::
resolving
(
function
(
Grid
$grid
)
{
$grid
->
tableCollapse
(
true
);
// $grid->withBorder();
$grid
->
disableViewButton
();
$grid
->
disableEditButton
();
$grid
->
toolsWithOutline
(
false
);
$grid
->
paginate
(
20
);
$grid
->
fixColumns
(
2
);
$grid
->
setDialogFormDimensions
(
'80%'
,
'90%'
);
$grid
->
showQuickEditButton
();
$grid
->
fixColumns
(
1
);
$grid
->
filter
(
function
(
Grid\Filter
$filter
)
{
$filter
->
panel
();
});
});
resources/lang/en/global.php
0 → 100644
View file @
89836def
<?php
return
[
'fields'
=>
[
'id'
=>
'ID'
,
'name'
=>
'name'
,
'username'
=>
'username'
,
'email'
=>
'email'
,
'http_path'
=>
'http_path'
,
'password'
=>
'password'
,
'password_confirmation'
=>
'password_confirmation'
,
'created_at'
=>
'created_at'
,
'updated_at'
=>
'updated_at'
,
'permissions'
=>
'permissions'
,
'slug'
=>
'slug'
,
'user'
=>
'user'
,
'order'
=>
'order'
,
'ip'
=>
'IP'
,
'method'
=>
'method'
,
'uri'
=>
'URI'
,
'roles'
=>
'roles'
,
'path'
=>
'path'
,
'input'
=>
'input'
,
'type'
=>
'type'
,
'user_id'
=>
'User Id'
,
'city'
=>
'City'
,
],
'labels'
=>
[
'list'
=>
'list'
,
'edit'
=>
'edit'
,
'detail'
=>
'detail'
,
'create'
=>
'create'
,
'root'
=>
'root'
,
'scaffold'
=>
'scaffold'
,
],
'options'
=>
[
//
],
];
resources/lang/en/menu.php
0 → 100644
View file @
89836def
<?php
return
[
'titles'
=>
[
'userAddress'
=>
'UserAddress'
,
],
];
resources/lang/en/user-address.php
View file @
89836def
<?php
<?php
return
[
'labels'
=>
[
'UserAddress'
=>
'UserAddress'
,
'user-address'
=>
'UserAddress'
,
],
'fields'
=>
[
'user_id'
=>
'用户ID'
,
'country'
=>
'国家'
,
'first_name'
=>
'名字'
,
'last_name'
=>
'姓氏'
,
'address_line1'
=>
'地址'
,
'address_line2'
=>
'地址'
,
'city'
=>
'城市'
,
'postal_code'
=>
'邮政编码'
,
],
'options'
=>
[
],
...
...
resources/lang/zh_CN/global.php
View file @
89836def
...
...
@@ -2,34 +2,41 @@
return
[
'fields'
=>
[
'id'
=>
'ID'
,
'name'
=>
'名称'
,
'username'
=>
'用户名'
,
'email'
=>
'邮箱'
,
'http_path'
=>
'HTTP路径'
,
'password'
=>
'密码'
,
'id'
=>
'ID'
,
'name'
=>
'名称'
,
'username'
=>
'用户名'
,
'email'
=>
'邮箱'
,
'http_path'
=>
'HTTP路径'
,
'password'
=>
'密码'
,
'password_confirmation'
=>
'确认密码'
,
'created_at'
=>
'创建时间'
,
'updated_at'
=>
'更新时间'
,
'permissions'
=>
'权限'
,
'slug'
=>
'标识'
,
'user'
=>
'用户'
,
'order'
=>
'排序'
,
'ip'
=>
'IP'
,
'method'
=>
'方法'
,
'uri'
=>
'URI'
,
'roles'
=>
'角色'
,
'path'
=>
'路径'
,
'input'
=>
'输入'
,
'type'
=>
'类型'
,
'created_at'
=>
'创建时间'
,
'updated_at'
=>
'更新时间'
,
'permissions'
=>
'权限'
,
'slug'
=>
'标识'
,
'user'
=>
'用户'
,
'order'
=>
'排序'
,
'ip'
=>
'IP'
,
'method'
=>
'方法'
,
'uri'
=>
'URI'
,
'roles'
=>
'角色'
,
'path'
=>
'路径'
,
'input'
=>
'输入'
,
'type'
=>
'类型'
,
'user_id'
=>
'用户ID'
,
'first_name'
=>
'名字'
,
'last_name'
=>
'姓'
,
'city'
=>
'城市'
,
'postal_code'
=>
'邮编'
,
'country'
=>
'国家'
,
],
'labels'
=>
[
'list'
=>
'列表'
,
'edit'
=>
'编辑'
,
'detail'
=>
'详细'
,
'create'
=>
'创建'
,
'root'
=>
'顶级'
,
'list'
=>
'列表'
,
'edit'
=>
'编辑'
,
'detail'
=>
'详细'
,
'create'
=>
'创建'
,
'root'
=>
'顶级'
,
'scaffold'
=>
'代码生成器'
,
'UserAddress'
=>
'用户地址管理'
,
],
'options'
=>
[
//
...
...
resources/lang/zh_CN/menu.php
View file @
89836def
...
...
@@ -13,6 +13,6 @@ return [
'extensions'
=>
'扩展'
,
'scaffold'
=>
'代码生成器'
,
'icons'
=>
'图标'
,
'
u
serAddress'
=>
'用户地址'
,
'
U
serAddress'
=>
'用户地址'
,
],
];
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment