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

Merge remote-tracking branch 'insanehong/issue-1148' into feature/organization-on-master
@74e953e40da4bf7deb570edfc04c3b3b5b5e6b22
--- app/assets/stylesheets/less/_yobiUI.less
+++ app/assets/stylesheets/less/_yobiUI.less
... | ... | @@ -463,6 +463,65 @@ |
463 | 463 |
} |
464 | 464 |
} |
465 | 465 |
|
466 |
+.tab-box { |
|
467 |
+ border:1px solid #ececec; |
|
468 |
+ border-top:none; |
|
469 |
+ .border-radius(0 0 4px 4px); |
|
470 |
+} |
|
471 |
+ |
|
472 |
+.tab-box-content { |
|
473 |
+ display:none; |
|
474 |
+ |
|
475 |
+ &.active { |
|
476 |
+ display:block; |
|
477 |
+ } |
|
478 |
+} |
|
479 |
+ |
|
480 |
+.tab-searchbox { |
|
481 |
+ padding:5px 15px; |
|
482 |
+} |
|
483 |
+ |
|
484 |
+.subtab-wrap { |
|
485 |
+ padding:5px 15px; |
|
486 |
+} |
|
487 |
+ |
|
488 |
+.nav-subtab { |
|
489 |
+ li { |
|
490 |
+ display: inline-block; |
|
491 |
+ margin-left:10px; |
|
492 |
+ |
|
493 |
+ &:first-child { |
|
494 |
+ margin-left:0; |
|
495 |
+ } |
|
496 |
+ |
|
497 |
+ a { |
|
498 |
+ display: block; |
|
499 |
+ padding:3px; |
|
500 |
+ |
|
501 |
+ &:hover { |
|
502 |
+ text-decoration: none; |
|
503 |
+ border-bottom:2px solid @primary; |
|
504 |
+ } |
|
505 |
+ } |
|
506 |
+ |
|
507 |
+ &.active { |
|
508 |
+ a { |
|
509 |
+ border-bottom:2px solid @primary; |
|
510 |
+ font-weight: bold; |
|
511 |
+ } |
|
512 |
+ } |
|
513 |
+ } |
|
514 |
+} |
|
515 |
+ |
|
516 |
+.my-project-item { |
|
517 |
+ li { |
|
518 |
+ padding:5px 15px; |
|
519 |
+ border-top : 1px solid #ececec; |
|
520 |
+ font-size: 14px; |
|
521 |
+ } |
|
522 |
+} |
|
523 |
+ |
|
524 |
+ |
|
466 | 525 |
/** alert **/ |
467 | 526 |
.yobiDialog { |
468 | 527 |
.border-radius(none); |
--- app/models/Organization.java
+++ app/models/Organization.java
... | ... | @@ -108,6 +108,18 @@ |
108 | 108 |
} |
109 | 109 |
|
110 | 110 |
/** |
111 |
+ * Find organizations which contains {@code userLoginId} as member. |
|
112 |
+ * |
|
113 |
+ * @param userLoginId |
|
114 |
+ * @return |
|
115 |
+ */ |
|
116 |
+ public static List<Organization> findOrganizationsByUserLoginId(String userLoginId) { |
|
117 |
+ return find.where().eq("users.user.loginId", userLoginId) |
|
118 |
+ .orderBy("created DESC") |
|
119 |
+ .findList(); |
|
120 |
+ } |
|
121 |
+ |
|
122 |
+ /** |
|
111 | 123 |
* As resource. |
112 | 124 |
* |
113 | 125 |
* @return the resource |
--- app/views/index/index.scala.html
+++ app/views/index/index.scala.html
... | ... | @@ -47,26 +47,108 @@ |
47 | 47 |
</ul> |
48 | 48 |
<div class="page on-fold-intro"> |
49 | 49 |
<div class="row-fluid content-container"> |
50 |
- <div class="span9 main-stream"> |
|
50 |
+ <div class="span8 main-stream"> |
|
51 | 51 |
<ul class="activity-streams notification-wrap unstyled"> |
52 | 52 |
@partial_notifications(0, 20) |
53 | 53 |
</ul> |
54 | 54 |
</div> |
55 |
- |
|
56 |
- <div class="span3"> |
|
57 |
- <div class="projects-wrap"> |
|
58 |
- @myProjectList(currentUser) |
|
59 |
- </div> |
|
55 |
+ <div class="span4"> |
|
56 |
+ <ul class="nav nav-tabs nm"> |
|
57 |
+ <li class="active"> |
|
58 |
+ <a href="#myPorjectList" data-toggle="tab"> |
|
59 |
+ @Messages("title.project") |
|
60 |
+ </a> |
|
61 |
+ </li> |
|
62 |
+ <li> |
|
63 |
+ <a href="#myOrganizationList" data-toggle="tab"> |
|
64 |
+ @Messages("title.organization") |
|
65 |
+ </a> |
|
66 |
+ </li> |
|
67 |
+ </ul> |
|
68 |
+ <div class="tab-content tab-box"> |
|
69 |
+ <div class="tab-searchbox"> |
|
70 |
+ <div class="search-bar"> |
|
71 |
+ <input name="mylist-filter" id="mylist-filter" class="textbox full" type="text" value=""> |
|
72 |
+ <button type="button" class="search-btn"><i class="yobicon-search"></i></button> |
|
73 |
+ </div> |
|
74 |
+ </div> |
|
75 |
+ <div class="tab-content"> |
|
76 |
+ <div class="tab-pane myproject-list-wrap active" id="myPorjectList"> |
|
77 |
+ <div class="subtab-wrap"> |
|
78 |
+ <ul class="nav-subtab unstyled"> |
|
79 |
+ <li class="active"> |
|
80 |
+ <a href="#recentlyVisited" data-toggle="tab"> |
|
81 |
+ @Messages("title.recently.visited") |
|
82 |
+ </a> |
|
83 |
+ </li> |
|
84 |
+ <li> |
|
85 |
+ <a href="#createdByMe" data-toggle="tab"> |
|
86 |
+ @Messages("title.createdByMe") |
|
87 |
+ </a> |
|
88 |
+ </li> |
|
89 |
+ <li> |
|
90 |
+ <a href="#watching" data-toggle="tab"> |
|
91 |
+ @Messages("title.watching") |
|
92 |
+ </a> |
|
93 |
+ </li> |
|
94 |
+ <li> |
|
95 |
+ <a href="#joinmember" data-toggle="tab"> |
|
96 |
+ @Messages("title.joinmember") |
|
97 |
+ </a> |
|
98 |
+ </li> |
|
99 |
+ </ul> |
|
100 |
+ </div> |
|
101 |
+ <div class="tab-content"> |
|
102 |
+ @myProjectList(currentUser) |
|
103 |
+ </div> |
|
104 |
+ </div> |
|
105 |
+ <div class="tab-pane myorganization-list-wrap" id="myOrganizationList"> |
|
106 |
+ @myOrganizationList(currentUser) |
|
107 |
+ </div> |
|
108 |
+ </div> |
|
109 |
+ </div> |
|
60 | 110 |
</div> |
61 |
- |
|
62 | 111 |
</div> |
63 |
- |
|
64 | 112 |
</div> |
65 | 113 |
</div> |
66 | 114 |
</div> |
67 | 115 |
} |
68 | 116 |
<script type="text/javascript"> |
69 | 117 |
$(document).ready(function(){ |
118 |
+ var oSearchTimer; |
|
119 |
+ |
|
120 |
+ $('#mylist-filter') |
|
121 |
+ .on('keyup.myList-search', function() { |
|
122 |
+ oSearchTimer = setTimeout(_searchWithFileter, 150, $(this).val(), $('.my-list-item')); |
|
123 |
+ }) |
|
124 |
+ .on('keydown.myList-search-stop',function() { |
|
125 |
+ clearTimeout(oSearchTimer); |
|
126 |
+ }); |
|
127 |
+ |
|
128 |
+ function _searchWithFileter(sFilter, oItems) { |
|
129 |
+ if(_isEmptyString(sFilter)) { |
|
130 |
+ oItems.show(); |
|
131 |
+ return ; |
|
132 |
+ } |
|
133 |
+ |
|
134 |
+ oItems.each(function(i, oItem) { |
|
135 |
+ if( _containsFilterString(sFilter, oItem)) { |
|
136 |
+ $(oItem).show(); |
|
137 |
+ } else { |
|
138 |
+ $(oItem).hide(); |
|
139 |
+ } |
|
140 |
+ }); |
|
141 |
+ } |
|
142 |
+ |
|
143 |
+ function _containsFilterString(sFilter, oItem) { |
|
144 |
+ var sTarget= $(oItem).data('value'); |
|
145 |
+ return (sTarget.indexOf(sFilter) !== -1); |
|
146 |
+ } |
|
147 |
+ |
|
148 |
+ function _isEmptyString(sValue) { |
|
149 |
+ return !($.trim(sValue)); |
|
150 |
+ } |
|
151 |
+ |
|
70 | 152 |
$("#toggleIntro").click(function(){ |
71 | 153 |
$(".site-guide-outer").toggleClass("hide"); |
72 | 154 |
localStorage.setItem("yobi-intro", !$(".site-guide-outer").hasClass("hide")); |
+++ app/views/index/myOrganizationList.scala.html
... | ... | @@ -0,0 +1,14 @@ |
1 | +@(currentUser:models.User) | |
2 | +@import utils.TemplateHelper._ | |
3 | + | |
4 | +<ul class="unstyled my-project-item"> | |
5 | +@defining(Organization.findOrganizationsByUserLoginId(UserApp.currentUser.loginId)) { organizations => | |
6 | + @for(organization <- organizations){ | |
7 | + <li class="my-list-item" data-value="@organization.name"> | |
8 | + <a href="@routes.OrganizationApp.organization(organization.name)"> | |
9 | + <span class="bold">@organization.name</span> | |
10 | + </a> | |
11 | + </li> | |
12 | + } | |
13 | +} | |
14 | +</ul> |
--- app/views/index/myProjectList.scala.html
+++ app/views/index/myProjectList.scala.html
... | ... | @@ -2,49 +2,35 @@ |
2 | 2 |
@import utils.TemplateHelper._ |
3 | 3 |
|
4 | 4 |
@displayProjects(title:String, projects:List[Project]) = { |
5 |
- |
|
6 |
- <div class="my-projects"> |
|
7 |
- <div class="title">@title (@projects.size())</div> |
|
8 |
- <ul class="unstyled"> |
|
9 |
- @for(project <- projects){ |
|
10 |
- <li class="my-project"> |
|
11 |
- <div class="my-project-header"> |
|
12 |
- <div class="name-wrap"> |
|
13 |
- @if(project.owner != currentUser.loginId) { |
|
14 |
- <a href="@routes.UserApp.userInfo(project.owner)">@project.owner</a> / |
|
15 |
- } |
|
16 |
- <a href="@routes.ProjectApp.project(project.owner, project.name)" class="project-name"> |
|
17 |
- <strong>@project.name @if(!project.isPublic){ <i class="yobicon-lock yobicon-small"></i> }</strong> |
|
18 |
- </a> |
|
19 |
- </div> |
|
20 |
- </div> |
|
21 |
- </li> |
|
5 |
+<ul class="tab-pane unstyled my-project-item" id="@title"> |
|
6 |
+@for(project <- projects){ |
|
7 |
+ <li class="my-list-item" data-value="@if(project.owner != currentUser.loginId) {@project.owner / }@project.name"> |
|
8 |
+ @if(project.owner != currentUser.loginId) { |
|
9 |
+ <a href="@routes.UserApp.userInfo(project.owner)">@project.owner</a> / |
|
22 | 10 |
} |
23 |
- </ul> |
|
24 |
- </div> |
|
11 |
+ <a href="@routes.ProjectApp.project(project.owner, project.name)" class="project-name"> |
|
12 |
+ <strong>@project.name @if(!project.isPublic){ <i class="yobicon-lock yobicon-small"></i> }</strong> |
|
13 |
+ </a> |
|
14 |
+ </li> |
|
15 |
+} |
|
16 |
+</ul> |
|
25 | 17 |
} |
26 | 18 |
@defining(currentUser.getVisitedProjects(10)){ visitedProjects => |
27 |
- <div class="my-projects"> |
|
28 |
- <div class="title">@Messages("project.recently.visited") (@visitedProjects.size())</div> |
|
29 |
- <ul class="unstyled"> |
|
30 |
- @for(pv <- visitedProjects){ |
|
31 |
- <li class="my-project"> |
|
32 |
- <div class="my-project-header"> |
|
33 |
- <div class="name-wrap"> |
|
34 |
- @if(pv.project.owner != currentUser.loginId) { |
|
35 |
- <a href="@routes.UserApp.userInfo(pv.project.owner)">@pv.project.owner</a> / |
|
36 |
- } |
|
37 |
- <a href="@routes.ProjectApp.project(pv.project.owner, pv.project.name)" class="project-name"> |
|
38 |
- <strong>@pv.project.name @if(!pv.project.isPublic){ <i class="yobicon-lock yobicon-small"></i> }</strong> |
|
39 |
- </a> |
|
40 |
- </div> |
|
41 |
- </div> |
|
42 |
- </li> |
|
19 |
+<ul class="tab-pane unstyled my-project-item active" id="recentlyVisited"> |
|
20 |
+@for(pv <- visitedProjects){ |
|
21 |
+ <li class="my-list-item" data-value="@if(pv.project.owner != currentUser.loginId) {@pv.project.owner / }@pv.project.name"> |
|
22 |
+ @if(pv.project.owner != currentUser.loginId) { |
|
23 |
+ <a href="@routes.UserApp.userInfo(pv.project.owner)">@pv.project.owner</a> / |
|
43 | 24 |
} |
44 |
- </ul> |
|
45 |
- </div> |
|
25 |
+ <a href="@routes.ProjectApp.project(pv.project.owner, pv.project.name)" class="project-name"> |
|
26 |
+ <strong>@pv.project.name @if(!pv.project.isPublic){ <i class="yobicon-lock yobicon-small"></i> }</strong> |
|
27 |
+ </a> |
|
28 |
+ </li> |
|
46 | 29 |
} |
30 |
+</ul> |
|
31 |
+} |
|
32 |
+ |
|
47 | 33 |
@orderString = @{"createdDate DESC"} |
48 |
-@displayProjects(Messages("project.default.group.watching"), currentUser.getWatchingProjects(orderString)) |
|
49 |
-@displayProjects(Messages("project.createdByMe"), Project.findProjectsCreatedByUser(currentUser.loginId, orderString)) |
|
50 |
-@displayProjects(Messages("project.default.group.member"), Project.findProjectsJustMemberAndNotOwner(currentUser, orderString)) |
|
34 |
+@displayProjects("watching", currentUser.getWatchingProjects(orderString)) |
|
35 |
+@displayProjects("createdByMe", Project.findProjectsCreatedByUser(currentUser.loginId, orderString)) |
|
36 |
+@displayProjects("joinmember", Project.findProjectsJustMemberAndNotOwner(currentUser, orderString)) |
--- conf/initial-data.yml
+++ conf/initial-data.yml
... | ... | @@ -23,18 +23,6 @@ |
23 | 23 |
id: 2 |
24 | 24 |
name: member |
25 | 25 |
active: true |
26 |
- - !!models.Role |
|
27 |
- id: 3 |
|
28 |
- name: sitemanager |
|
29 |
- active: true |
|
30 |
- - !!models.Role |
|
31 |
- id: 4 |
|
32 |
- name: anonymous |
|
33 |
- active: true |
|
34 |
- - !!models.Role |
|
35 |
- id: 5 |
|
36 |
- name: guest |
|
37 |
- active: true |
|
38 | 26 |
|
39 | 27 |
# Labels |
40 | 28 |
labels: |
--- conf/messages
+++ conf/messages
... | ... | @@ -355,7 +355,7 @@ |
355 | 355 |
organization.member.atLeastOneAdmin = A group have to have at least one admin |
356 | 356 |
organization.member.isNotAMember = The user is not a group member |
357 | 357 |
organization.member.needManagerRole = To delete member from group, you need group manager role |
358 |
-organization.setting = Organization Setting |
|
358 |
+organization.setting = Group Setting |
|
359 | 359 |
organization.settingFrom = Setting |
360 | 360 |
post.author = Author |
361 | 361 |
post.comment.empty = you have to write contents. |
... | ... | @@ -634,6 +634,8 @@ |
634 | 634 |
title.codeManagement = Code Management |
635 | 635 |
title.codeReview = Code Review |
636 | 636 |
title.commitHistory = Commit History |
637 |
+title.contentSearchResult = Content Search Result |
|
638 |
+title.createdByMe = Create |
|
637 | 639 |
title.editIssue = Edit Issue |
638 | 640 |
title.editMilestone = Edit Milestone |
639 | 641 |
title.editPullRequest = Edit Pull Request |
... | ... | @@ -644,6 +646,7 @@ |
644 | 646 |
title.issueDetail = Issue |
645 | 647 |
title.issueList = Issue List |
646 | 648 |
title.issueTracker = Issue Tracker |
649 |
+title.joinmember = Member |
|
647 | 650 |
title.keymap = Keyboard shortcuts |
648 | 651 |
title.login = Log in |
649 | 652 |
title.loginFor = Log in for <span class="highlight">{0}</span> |
... | ... | @@ -661,12 +664,14 @@ |
661 | 664 |
title.post.notExistingPage = Page not found |
662 | 665 |
title.privateProject = Private Repositories |
663 | 666 |
title.projectDashboard = Project Dashboard |
667 |
+title.project = Project |
|
664 | 668 |
title.projectDelete = Delete Project |
665 | 669 |
title.projectHome = Project Home |
666 | 670 |
title.projectList = Project List |
667 | 671 |
title.projectMembers = Member List |
668 | 672 |
title.projectSetting = Project Settings |
669 | 673 |
title.projectTransfer = Project Transfer |
674 |
+title.recently.visited = Recently visited |
|
670 | 675 |
title.rememberMe = Remember Me |
671 | 676 |
title.resetPassword = Reset Password |
672 | 677 |
title.resetPasswordFor = Reset Password for <span class="highlight">{0}</span> |
... | ... | @@ -677,6 +682,7 @@ |
677 | 682 |
title.siteSetting = Site Setting |
678 | 683 |
title.text = Title |
679 | 684 |
title.unlimitedProjects = Unlimited Project Creation |
685 |
+title.watching = Watching |
|
680 | 686 |
title.workTeam = Team Play |
681 | 687 |
title.yobi.feedback = Feedback |
682 | 688 |
title.zenmode = zen mode |
--- conf/messages.ko
+++ conf/messages.ko
... | ... | @@ -635,6 +635,8 @@ |
635 | 635 |
title.codeManagement = 코드 관리 |
636 | 636 |
title.codeReview = 코드 리뷰 |
637 | 637 |
title.commitHistory = 커밋 히스토리 |
638 |
+title.contentSearchResult = 컨텐츠 검색 결과 |
|
639 |
+title.createdByMe = 내가 만든 |
|
638 | 640 |
title.editIssue = 이슈 수정 |
639 | 641 |
title.editMilestone = 마일스톤 수정 |
640 | 642 |
title.editPullRequest = 코드 보내기 수정 |
... | ... | @@ -645,6 +647,7 @@ |
645 | 647 |
title.issueDetail = 이슈 상세보기 |
646 | 648 |
title.issueList = 이슈 목록 |
647 | 649 |
title.issueTracker = 이슈 트래커 |
650 |
+title.joinmember = 멤버로 참여중인 |
|
648 | 651 |
title.keymap = 단축키 안내 |
649 | 652 |
title.login = 로그인 |
650 | 653 |
title.loginFor = <span class="highlight">{0}</span> 로그인 |
... | ... | @@ -660,6 +663,7 @@ |
660 | 663 |
title.organizationHome = 홈 |
661 | 664 |
title.organization = 그룹 |
662 | 665 |
title.post.notExistingPage = 페이지를 찾지 못했습니다. |
666 |
+title.project = 프로젝트 |
|
663 | 667 |
title.privateProject = 비공개 프로젝트 |
664 | 668 |
title.projectDashboard = 프로젝트 대시보드 |
665 | 669 |
title.projectDelete = 프로젝트 삭제 |
... | ... | @@ -668,6 +672,7 @@ |
668 | 672 |
title.projectMembers = 프로젝트 멤버 |
669 | 673 |
title.projectSetting = 프로젝트 설정 |
670 | 674 |
title.projectTransfer = 프로젝트 이관 |
675 |
+title.recently.visited = 최근 방문 |
|
671 | 676 |
title.rememberMe = 로그인 유지하기 |
672 | 677 |
title.resetPassword = 비밀번호 재설정 |
673 | 678 |
title.resetPasswordFor = <span class="highlight">{0}</span> 비밀번호 재설정 |
... | ... | @@ -678,6 +683,7 @@ |
678 | 683 |
title.siteSetting = 사이트 설정 |
679 | 684 |
title.text = 제목 |
680 | 685 |
title.unlimitedProjects = 제한 없는 프로젝트 생성 |
686 |
+title.watching = 지켜보는 |
|
681 | 687 |
title.workTeam = 팀 구성 |
682 | 688 |
title.yobi.feedback = 개발팀에게 문의하기 |
683 | 689 |
title.zenmode = 집중 모드 |
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?