Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
guns-vip
Commits
0fb05506
Commit
0fb05506
authored
Oct 30, 2018
by
fengshuonan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
整理左侧菜单
parent
39556526
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
11 deletions
+20
-11
src/main/java/cn/stylefeng/guns/modular/system/controller/DashboardController.java
+7
-5
src/main/webapp/WEB-INF/common/_container.html
+8
-1
src/main/webapp/WEB-INF/common/_sidebar.html
+1
-1
src/main/webapp/WEB-INF/common/_top_header.html
+4
-4
No files found.
src/main/java/cn/stylefeng/guns/modular/system/controller/DashboardController.java
View file @
0fb05506
...
@@ -54,14 +54,16 @@ public class DashboardController extends BaseController {
...
@@ -54,14 +54,16 @@ public class DashboardController extends BaseController {
model
.
addAttribute
(
"noticeList"
,
notices
);
model
.
addAttribute
(
"noticeList"
,
notices
);
//获取菜单列表
//获取菜单列表
List
<
MenuNode
>
m
enus
=
menuService
.
getMenusByRoleIds
(
CollectionUtil
.
newArrayList
(
1
));
List
<
MenuNode
>
tempM
enus
=
menuService
.
getMenusByRoleIds
(
CollectionUtil
.
newArrayList
(
1
));
List
<
MenuNode
>
titles
=
MenuNode
.
buildTitle
(
m
enus
);
List
<
MenuNode
>
menus
=
MenuNode
.
buildTitle
(
tempM
enus
);
titles
=
ApiMenuFilter
.
build
(
title
s
);
menus
=
ApiMenuFilter
.
build
(
menu
s
);
model
.
addAttribute
(
"
titles"
,
title
s
);
model
.
addAttribute
(
"
menus"
,
menu
s
);
//获取用户头像
//获取用户头像
model
.
addAttribute
(
"avatar"
,
"12.jpg"
);
model
.
addAttribute
(
"name"
,
"stylefeng"
);
model
.
addAttribute
(
"avatar"
,
"/assets/images/users/1.jpg"
);
model
.
addAttribute
(
"email"
,
"sn93@qq.com"
);
return
"/dashboard.html"
;
return
"/dashboard.html"
;
}
}
...
...
src/main/webapp/WEB-INF/common/_container.html
View file @
0fb05506
...
@@ -8,6 +8,13 @@
...
@@ -8,6 +8,13 @@
@ * otherJs : 引用这个layout的其他加载js
@ * otherJs : 引用这个layout的其他加载js
@ * title : 页面的标题
@ * title : 页面的标题
@ * layoutContent : 主页面的html内容
@ * layoutContent : 主页面的html内容
@ *
@ * 下面的需要从后台返回
@ *
@ * menus : 菜单列表的集合
@ * name : 姓名
@ * avatar : 头像
@ * email : 邮箱
@ **/
@ **/
<head>
<head>
<meta
charset=
"utf-8"
>
<meta
charset=
"utf-8"
>
...
@@ -67,7 +74,7 @@
...
@@ -67,7 +74,7 @@
@include("/common/_sidebar.html"){}
@include("/common/_sidebar.html"){}
<!-- 主页正式内容开始 -->
<!-- 主页正式内容开始 -->
@include("/common/_content.html"
,{layoutContent:layoutContent}
){}
@include("/common/_content.html"){}
</div>
</div>
<!-- jquery -->
<!-- jquery -->
...
...
src/main/webapp/WEB-INF/common/_sidebar.html
View file @
0fb05506
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div
class=
"scroll-sidebar"
>
<div
class=
"scroll-sidebar"
>
<nav
class=
"sidebar-nav"
>
<nav
class=
"sidebar-nav"
>
<ul
id=
"sidebarnav"
>
<ul
id=
"sidebarnav"
>
@for(title in
title
s){
@for(title in
menu
s){
@if(tool.isEmpty(title.children)){
@if(tool.isEmpty(title.children)){
<li>
<li>
<a
href=
"${ctxPath}${title.url}"
><i
class=
"mdi ${title.icon}"
></i>
${title.name}
</a>
<a
href=
"${ctxPath}${title.url}"
><i
class=
"mdi ${title.icon}"
></i>
${title.name}
</a>
...
...
src/main/webapp/WEB-INF/common/_top_header.html
View file @
0fb05506
...
@@ -48,15 +48,15 @@
...
@@ -48,15 +48,15 @@
<ul
class=
"navbar-nav my-lg-0"
>
<ul
class=
"navbar-nav my-lg-0"
>
<li
class=
"nav-item dropdown"
>
<li
class=
"nav-item dropdown"
>
<a
class=
"nav-link dropdown-toggle text-muted waves-effect waves-dark"
href=
""
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
><img
<a
class=
"nav-link dropdown-toggle text-muted waves-effect waves-dark"
href=
""
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
><img
src=
"
../assets/images/users/1.jpg
"
alt=
"user"
class=
"profile-pic"
/></a>
src=
"
${avatar}
"
alt=
"user"
class=
"profile-pic"
/></a>
<div
class=
"dropdown-menu dropdown-menu-right animated flipInY"
>
<div
class=
"dropdown-menu dropdown-menu-right animated flipInY"
>
<ul
class=
"dropdown-user"
>
<ul
class=
"dropdown-user"
>
<li>
<li>
<div
class=
"dw-user-box"
>
<div
class=
"dw-user-box"
>
<div
class=
"u-img"
><img
src=
"
../assets/images/users/1.jpg
"
alt=
"user"
></div>
<div
class=
"u-img"
><img
src=
"
${avatar}
"
alt=
"user"
></div>
<div
class=
"u-text"
>
<div
class=
"u-text"
>
<h4>
stylefeng
</h4>
<h4>
${name!}
</h4>
<p
class=
"text-muted"
>
sn93\@qq.com
</p><a
href=
"profile.html"
class=
"btn btn-rounded btn-danger btn-sm"
>
个人信息
</a></div>
<p
class=
"text-muted"
>
${email!}
</p><a
href=
"profile.html"
class=
"btn btn-rounded btn-danger btn-sm"
>
个人信息
</a></div>
</div>
</div>
</li>
</li>
<li
role=
"separator"
class=
"divider"
></li>
<li
role=
"separator"
class=
"divider"
></li>
...
...
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