[Notice] Announcing the End of Demo Server [Read me]

display selected menu
@e907d6f3ffb7c5d84a59996c9cd0aee493531269
+++ app/utils/MenuType.java
... | ... | @@ -0,0 +1,12 @@ |
1 | +package utils; | |
2 | + | |
3 | +public enum MenuType { | |
4 | + SITE_HOME(1), NEW_PROJECT(2), PROJECTS(3), HELP(4), SITE_SETTING(5), USER(6), | |
5 | + PROJECT_HOME(100), BOARD(101), CODE(102), ISSUE(103), TASK(104), PROJECT_SETTING(105), NONE(0); | |
6 | + | |
7 | + private int type; | |
8 | + | |
9 | + private MenuType(int type) { | |
10 | + this.type = type; | |
11 | + } | |
12 | +} |
--- app/views/board/editPost.scala.html
+++ app/views/board/editPost.scala.html
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 |
@import models.enumeration.Resource |
5 | 5 |
@implicitField = @{ helper.FieldConstructor(simpleForm) } |
6 | 6 |
|
7 |
-@main(title, project) { |
|
7 |
+@main(title, project, utils.MenuType.BOARD) { |
|
8 | 8 |
@pageTitle(project,"Board") |
9 | 9 |
<div class="content-wrap"> |
10 | 10 |
|
--- app/views/board/newPost.scala.html
+++ app/views/board/newPost.scala.html
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 |
@import utils.TemplateHelper._ |
4 | 4 |
@implicitField = @{ helper.FieldConstructor(simpleForm) } |
5 | 5 |
|
6 |
-@main(title, project) { |
|
6 |
+@main(title, project, utils.MenuType.BOARD) { |
|
7 | 7 |
@pageTitle(project,"Board") |
8 | 8 |
<div class="content-wrap"> |
9 | 9 |
|
--- app/views/board/post.scala.html
+++ app/views/board/post.scala.html
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 |
@import models.enumeration.Resource |
5 | 5 |
@implicitField = @{ helper.FieldConstructor(simpleForm) } |
6 | 6 |
|
7 |
-@main("상세보기", project){ |
|
7 |
+@main("상세보기", project, utils.MenuType.BOARD){ |
|
8 | 8 |
@pageTitle(project,"Board") |
9 | 9 |
<div class="board-header"> |
10 | 10 |
<div class="board-id div">@post.id</div> |
--- app/views/board/postList.scala.html
+++ app/views/board/postList.scala.html
... | ... | @@ -15,7 +15,7 @@ |
15 | 15 |
</th> |
16 | 16 |
} |
17 | 17 |
|
18 |
-@main(title, project) { |
|
18 |
+@main(title, project, utils.MenuType.BOARD) { |
|
19 | 19 |
@pageTitle(project,"Board") |
20 | 20 |
<div class="header-wrap"> |
21 | 21 |
<div class="search-wrap board"> |
--- app/views/code/codeView.scala.html
+++ app/views/code/codeView.scala.html
... | ... | @@ -1,6 +1,6 @@ |
1 | 1 |
@(msg : String, project:Project, branches:List[String]) |
2 | 2 |
|
3 |
-@main("코드", project){ |
|
3 |
+@main("코드", project, utils.MenuType.CODE){ |
|
4 | 4 |
<ul class="nav nav-tabs"> |
5 | 5 |
<a href="@routes.CodeApp.codeBrowser(project.owner, project.name)">@Messages("Files")</a></li> |
6 | 6 |
<a href="@routes.CodeHistoryApp.historyUntilHead(project.owner, project.name)">@Messages("Commits")</a></li> |
--- app/views/code/diff.scala.html
+++ app/views/code/diff.scala.html
... | ... | @@ -1,6 +1,6 @@ |
1 | 1 |
@(project: Project, patch: String) |
2 | 2 |
|
3 |
-@main(Messages("Commit"), project) { |
|
3 |
+@main(Messages("Commit"), project, utils.MenuType.CODE) { |
|
4 | 4 |
<script type="text/javascript" src="/assets/javascripts/hljs.js"></script> |
5 | 5 |
<script type="text/javascript" src="/assets/javascripts/hljs.jquery.js"></script> |
6 | 6 |
<script type="text/javascript" src="/assets/javascripts/languages/allinone.js"></script> |
--- app/views/code/gitView.scala.html
+++ app/views/code/gitView.scala.html
... | ... | @@ -1,4 +1,5 @@ |
1 |
-@(url : String, project:Project) @main("코드", project){ |
|
1 |
+@(url : String, project:Project) |
|
2 |
+@main("코드", project, utils.MenuType.CODE){ |
|
2 | 3 |
<ul class="nav nav-tabs"> |
3 | 4 |
<a href="@routes.CodeApp.codeBrowser(project.owner, project.name)">@Messages("Files")</a> |
4 | 5 |
</li> |
--- app/views/code/history.scala.html
+++ app/views/code/history.scala.html
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 |
@import playRepository.RepositoryService |
4 | 4 |
@import java.net.URLEncoder |
5 | 5 |
|
6 |
-@main(Messages("title.commitHistory"), project) { |
|
6 |
+@main(Messages("title.commitHistory"), project, utils.MenuType.CODE) { |
|
7 | 7 |
|
8 | 8 |
@defining(RepositoryService.getRepository(project).getBranches()) { branches => |
9 | 9 |
@if(branches.length > 0) { |
--- app/views/code/nohead.scala.html
+++ app/views/code/nohead.scala.html
... | ... | @@ -1,6 +1,6 @@ |
1 | 1 |
@(url: String, project: Project) |
2 | 2 |
|
3 |
-@main(Messages("Commit History"), project) { |
|
3 |
+@main(Messages("Commit History"), project, utils.MenuType.CODE) { |
|
4 | 4 |
<ul class="nav nav-tabs"> |
5 | 5 |
<a href="@routes.CodeApp.codeBrowser(project.owner, project.name)">@Messages("code.files")</a></li> |
6 | 6 |
<a href="@routes.CodeHistoryApp.historyUntilHead(project.owner, project.name)">@Messages("code.commits")</a></li> |
--- app/views/code/svnView.scala.html
+++ app/views/code/svnView.scala.html
... | ... | @@ -1,4 +1,6 @@ |
1 |
-@(url : String, project:Project) @main("코드", project){ |
|
1 |
+@(url : String, project:Project) |
|
2 |
+ |
|
3 |
+@main("코드", project, utils.MenuType.CODE){ |
|
2 | 4 |
<ul class="nav nav-tabs"> |
3 | 5 |
<a href="@routes.CodeApp.codeBrowser(project.owner, project.name)">@Messages("Files")</a></li> |
4 | 6 |
<a href="@routes.CodeHistoryApp.historyUntilHead(project.owner, project.name)">@Messages("Commits")</a></li> |
--- app/views/help/toc.scala.html
+++ app/views/help/toc.scala.html
... | ... | @@ -1,6 +1,6 @@ |
1 | 1 |
@(message: String) |
2 | 2 |
|
3 |
-@home(message) { |
|
3 |
+@home(message, utils.MenuType.HELP) { |
|
4 | 4 |
<div class="container page-wrap"> |
5 | 5 |
<div class="page" markdown> |
6 | 6 |
Help |
--- app/views/home.scala.html
+++ app/views/home.scala.html
... | ... | @@ -1,7 +1,7 @@ |
1 |
-@(title: String)(content: Html) |
|
1 |
+@(title: String, menuType:utils.MenuType)(content: Html) |
|
2 | 2 |
|
3 | 3 |
@layout(Messages(title))("orange") { |
4 |
- @views.html.navbar() |
|
4 |
+ @views.html.navbar(menuType) |
|
5 | 5 |
<div class="container page-wrap"> |
6 | 6 |
@views.html.alert() |
7 | 7 |
@content |
--- app/views/index.scala.html
+++ app/views/index.scala.html
... | ... | @@ -1,6 +1,6 @@ |
1 | 1 |
@(projects:List[Project]) |
2 | 2 |
|
3 |
-@home("Welcome to nForge") { |
|
3 |
+@home("Welcome to nForge", utils.MenuType.SITE_HOME) { |
|
4 | 4 |
<div class="page@if(!session.contains("userId")){ full}"> |
5 | 5 |
<div class="center-wrap tag-line-wrap"> |
6 | 6 |
<h1 class="title"><span class="high-light">Open Source</span> N4</h1> |
--- app/views/issue/editIssue.scala.html
+++ app/views/issue/editIssue.scala.html
... | ... | @@ -10,7 +10,7 @@ |
10 | 10 |
} |
11 | 11 |
} |
12 | 12 |
|
13 |
-@main(Messages(title), project) { |
|
13 |
+@main(Messages(title), project, utils.MenuType.ISSUE) { |
|
14 | 14 |
<style> |
15 | 15 |
@@IMPORT url("/assets/stylesheets/issue.css"); |
16 | 16 |
</style> |
--- app/views/issue/issue.scala.html
+++ app/views/issue/issue.scala.html
... | ... | @@ -14,7 +14,7 @@ |
14 | 14 |
content |
15 | 15 |
} |
16 | 16 |
} |
17 |
-@main(Messages(title),project) { |
|
17 |
+@main(Messages(title),project, utils.MenuType.ISSUE) { |
|
18 | 18 |
<style> |
19 | 19 |
@@IMPORT url("/assets/stylesheets/issue.css"); |
20 | 20 |
</style> |
--- app/views/issue/issueError.scala.html
+++ app/views/issue/issueError.scala.html
... | ... | @@ -1,6 +1,6 @@ |
1 | 1 |
@(message:String, returnURL:Call, project:Project) |
2 | 2 |
|
3 |
-@main("Warnning!", project){ |
|
3 |
+@main("Warnning!", project, utils.MenuType.ISSUE){ |
|
4 | 4 |
<div class="alert alert-error"> |
5 | 5 |
@Messages(message) |
6 | 6 |
</div> |
--- app/views/issue/issueList.scala.html
+++ app/views/issue/issueList.scala.html
... | ... | @@ -35,7 +35,7 @@ |
35 | 35 |
|
36 | 36 |
} |
37 | 37 |
|
38 |
-@main(Messages(title), project){ |
|
38 |
+@main(Messages(title), project, utils.MenuType.ISSUE){ |
|
39 | 39 |
<style> |
40 | 40 |
@@IMPORT url("/assets/stylesheets/issue.css"); |
41 | 41 |
</style> |
--- app/views/issue/newIssue.scala.html
+++ app/views/issue/newIssue.scala.html
... | ... | @@ -10,7 +10,7 @@ |
10 | 10 |
} |
11 | 11 |
} |
12 | 12 |
|
13 |
-@main(Messages(title), project) { |
|
13 |
+@main(Messages(title), project, utils.MenuType.ISSUE) { |
|
14 | 14 |
<style> |
15 | 15 |
@@IMPORT url("/assets/stylesheets/issue.css"); |
16 | 16 |
</style> |
--- app/views/issue/notExistingPage.scala.html
+++ app/views/issue/notExistingPage.scala.html
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 |
|
3 | 3 |
@import helper.twitterBootstrap._ |
4 | 4 |
|
5 |
-@main(title, project) { |
|
5 |
+@main(title, project, utils.MenuType.NONE) { |
|
6 | 6 |
<h1>존재하지 않는 게시물 입니다.</h1> |
7 | 7 |
<a href="@routes.IssueApp.issues(project.owner, project.name, "all")" class="btn">목록으로 가기</a> |
8 | 8 |
} |
--- app/views/login.scala.html
+++ app/views/login.scala.html
... | ... | @@ -1,6 +1,6 @@ |
1 | 1 |
@(message:String, userForm:Form[User]) |
2 | 2 |
|
3 |
-@home(message) { |
|
3 |
+@home(message, utils.MenuType.NONE) { |
|
4 | 4 |
<div class="page full"> |
5 | 5 |
<div class="center-wrap tag-line-wrap login"> |
6 | 6 |
<h1 class="title"><span class="high-light">Open Source</span> N4</h1> |
--- app/views/main.scala.html
+++ app/views/main.scala.html
... | ... | @@ -1,14 +1,16 @@ |
1 |
-@(title:String, project:Project)(content: Html) |
|
1 |
+@(title:String, project:Project, menuType:utils.MenuType)(content: Html) |
|
2 |
+ |
|
3 |
+@import utils._ |
|
2 | 4 |
|
3 | 5 |
@layout(Messages(title))("") { |
4 | 6 |
<header class="gnb-outer"> |
5 |
- @topmenu(project) |
|
7 |
+ @topmenu(project, menuType) |
|
6 | 8 |
<div class="sub-menu-sp"></div> |
7 | 9 |
@sidemenu(project) |
8 | 10 |
</header> |
9 | 11 |
<div class="container page-wrap"> |
10 | 12 |
<div class="page"> |
11 |
- @views.html.alert() |
|
13 |
+ @views.html.alert() |
|
12 | 14 |
@content |
13 | 15 |
</div> |
14 | 16 |
</div> |
--- app/views/project/newProject.scala.html
+++ app/views/project/newProject.scala.html
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 |
|
3 | 3 |
@import playRepository.RepositoryService |
4 | 4 |
|
5 |
-@home(title){ |
|
5 |
+@home(title, utils.MenuType.NEW_PROJECT){ |
|
6 | 6 |
<div class="page"> |
7 | 7 |
<div class="form-wrap new-project"> |
8 | 8 |
<div class="bread-crumb-wrap"> |
--- app/views/project/projectHome.scala.html
+++ app/views/project/projectHome.scala.html
... | ... | @@ -1,6 +1,6 @@ |
1 | 1 |
@(message: String, project: Project) |
2 | 2 |
|
3 |
-@main(message, project) { |
|
3 |
+@main(message, project, utils.MenuType.PROJECT_HOME) { |
|
4 | 4 |
@pageTitle(project,"Project Home") |
5 | 5 |
<div class="bubble-wrap dark-gray project-home"> |
6 | 6 |
<div class="inner logo"> |
--- app/views/project/projectMngMain.scala.html
+++ app/views/project/projectMngMain.scala.html
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 |
|
3 | 3 |
@layout(Messages(title))("") { |
4 | 4 |
<header class="gnb-outer"> |
5 |
- @topmenu(project) |
|
5 |
+ @topmenu(project, utils.MenuType.PROJECT_SETTING) |
|
6 | 6 |
<div class="sub-menu-sp"></div> |
7 | 7 |
@submenu(title, project) |
8 | 8 |
@sidemenu(project) |
--- app/views/project/statistics.scala.html
+++ app/views/project/statistics.scala.html
... | ... | @@ -1,5 +1,5 @@ |
1 | 1 |
@(message: String)(project:Project) |
2 | 2 |
|
3 |
-@main(message, project) { |
|
3 |
+@main(message, project, utils.MenuType.ISSUE) { |
|
4 | 4 |
<h1>underconstruction.html</h1> |
5 | 5 |
}(No newline at end of file) |
--- app/views/projectList.scala.html
+++ app/views/projectList.scala.html
... | ... | @@ -1,6 +1,6 @@ |
1 | 1 |
@(message: String, currentPage: Page[Project], filter:String, allNum:Int, openNum:Int) |
2 | 2 |
|
3 |
-@home(message) { |
|
3 |
+@home(message, utils.MenuType.PROJECTS) { |
|
4 | 4 |
<div class="page"> |
5 | 5 |
<div class="header-wrap"> |
6 | 6 |
<div class="stats-wrap"> |
--- app/views/search/contentsSearch.scala.html
+++ app/views/search/contentsSearch.scala.html
... | ... | @@ -1,7 +1,7 @@ |
1 | 1 |
@(title: String, project: Project, filter: String, resultIssues: Page[Issue], resultPosts: Page[Post]) |
2 | 2 |
@import utils.TemplateHelper._ |
3 | 3 |
|
4 |
-@main(title, project) { |
|
4 |
+@main(title, project, utils.MenuType.NONE) { |
|
5 | 5 |
<input class="filter" type="hidden" value="@filter" /> |
6 | 6 |
<div class="row"> |
7 | 7 |
<div class="span12"> |
--- app/views/site/siteMngMain.scala.html
+++ app/views/site/siteMngMain.scala.html
... | ... | @@ -1,6 +1,6 @@ |
1 | 1 |
@(title: String)(content: Html) |
2 | 2 |
|
3 |
-@home(Messages(title)) { |
|
3 |
+@home(Messages(title), utils.MenuType.SITE_SETTING) { |
|
4 | 4 |
<div class="page full"> |
5 | 5 |
<div class="row-fluid"> |
6 | 6 |
<div class="span2"> |
--- app/views/task/taskView.scala.html
+++ app/views/task/taskView.scala.html
... | ... | @@ -1,6 +1,6 @@ |
1 | 1 |
@(project:Project) |
2 | 2 |
@import utils.TemplateHelper._ |
3 |
-@main("TaskManager", project){ |
|
3 |
+@main("TaskManager", project, utils.MenuType.TASK){ |
|
4 | 4 |
<style> |
5 | 5 |
@@IMPORT url(@getCSSLink("taskboard")); |
6 | 6 |
</style> |
--- app/views/underconstruction.scala.html
+++ app/views/underconstruction.scala.html
... | ... | @@ -1,5 +1,5 @@ |
1 | 1 |
@(title:String) |
2 | 2 |
|
3 |
-@home(title){ |
|
3 |
+@home(title, utils.MenuType.NONE){ |
|
4 | 4 |
<h1>underconstruction.html</h1> |
5 | 5 |
}(No newline at end of file) |
--- app/views/user/edit.scala.html
+++ app/views/user/edit.scala.html
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 |
|
6 | 6 |
@implicitFieldConstructor = @{ FieldConstructor(twitterBootstrapInput.render) } |
7 | 7 |
|
8 |
-@home("Users Info") { |
|
8 |
+@home("Users Info", utils.MenuType.USER) { |
|
9 | 9 |
@helper.form(action=routes.UserApp.save()){ |
10 | 10 |
@helper.inputText(userForm("email")) |
11 | 11 |
<div id="picPath">업로드된 파일이 없습니다.</div> |
--- app/views/user/info.scala.html
+++ app/views/user/info.scala.html
... | ... | @@ -1,6 +1,6 @@ |
1 | 1 |
@(user:User) |
2 | 2 |
|
3 |
-@home("Users Info") { |
|
3 |
+@home("Users Info", utils.MenuType.USER) { |
|
4 | 4 |
<div class="page"> |
5 | 5 |
<div>name : @user.name</div> |
6 | 6 |
<div> |
--- app/views/user/memberInfo.scala.html
+++ app/views/user/memberInfo.scala.html
... | ... | @@ -1,6 +1,6 @@ |
1 | 1 |
@(user:User) |
2 | 2 |
|
3 |
-@home("Users Info") { |
|
3 |
+@home("Users Info", utils.MenuType.USER) { |
|
4 | 4 |
<div class="page"> |
5 | 5 |
<div>name : @user.name</div> |
6 | 6 |
<div> |
--- app/views/user/signup.scala.html
+++ app/views/user/signup.scala.html
... | ... | @@ -1,6 +1,6 @@ |
1 | 1 |
@(message: String, newUserForm: Form[User]) |
2 | 2 |
|
3 |
-@home(message) { |
|
3 |
+@home(message, utils.MenuType.NONE) { |
|
4 | 4 |
<div class="page full"> |
5 | 5 |
<div class="center-wrap tag-line-wrap signup"> |
6 | 6 |
<h1 class="title"><span class="high-light">Sign Up For</span> N4</h1> |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?