usermenu: Show favorite personal account projects
@0c5443546f2a26b3f9b864421dad18b1f9b9ee54
--- app/views/index/myOrganizationList.scala.html
+++ app/views/index/myOrganizationList.scala.html
... | ... | @@ -12,7 +12,7 @@ |
12 | 12 |
<div id="@title" class="no-result tab-pane user-ul @if(isActive) {active}">@Messages("title.no.results")</div> |
13 | 13 |
} else { |
14 | 14 |
<ul class="tab-pane user-ul @if(isActive) {active}" id="@title"> |
15 |
- @defining(UserApp.currentUser().ownProjects){ ownProjects => |
|
15 |
+ @defining(currentUser.ownProjects){ ownProjects => |
|
16 | 16 |
<li class="org-li"> |
17 | 17 |
<div class="org-list project-flex-container all-orgs"> |
18 | 18 |
<div class="project-item project-item-container"> |
... | ... | @@ -20,7 +20,7 @@ |
20 | 20 |
<i class="project-avatar"></i> |
21 | 21 |
</div> |
22 | 22 |
<div class="projectName-owner all-org-names flex-item"> |
23 |
- <div class="project-name org-name flex-item">@UserApp.currentUser().loginId</div> |
|
23 |
+ <div class="project-name org-name flex-item">@currentUser.loginId</div> |
|
24 | 24 |
<div class="project-owner flex-item sub-project-counter"></div> |
25 | 25 |
</div> |
26 | 26 |
</div> |
... | ... | @@ -28,7 +28,7 @@ |
28 | 28 |
</div> |
29 | 29 |
<ul class="project-ul"> |
30 | 30 |
@for(project <- ownProjects){ |
31 |
- @allProjectList_partial(project, FavoriteProject.findByProjectId(UserApp.currentUser().id, project.id) != null) |
|
31 |
+ @allProjectList_partial(project, FavoriteProject.findByProjectId(currentUser.id, project.id) != null) |
|
32 | 32 |
} |
33 | 33 |
</ul> |
34 | 34 |
</li> |
... | ... | @@ -46,6 +46,15 @@ |
46 | 46 |
} |
47 | 47 |
} |
48 | 48 |
</ul> |
49 |
+ @defining(currentUser.favoriteProjects){ favoriteProjects => |
|
50 |
+ <ul class="etc-favorites user-ul"> |
|
51 |
+ @for(favoriteProject <- favoriteProjects){ |
|
52 |
+ @if(!favoriteProject.project.hasGroup && !favoriteProject.owner.equals(currentUser.loginId)) { |
|
53 |
+ @myProjectList_partial(favoriteProject.project, true) |
|
54 |
+ } |
|
55 |
+ } |
|
56 |
+ </ul> |
|
57 |
+ } |
|
49 | 58 |
} |
50 | 59 |
} |
51 | 60 |
|
... | ... | @@ -55,5 +64,5 @@ |
55 | 64 |
<input class="search-input org-search" type="text" autocomplete="off" placeholder="@Messages("title.type.name")"> |
56 | 65 |
<span class="bar"></span> |
57 | 66 |
</div> |
58 |
- @displayOrganizations("organizations", Organization.findAllOrganizations(UserApp.currentUser.loginId), currentUser.getFavoriteOrganizations) |
|
67 |
+ @displayOrganizations("organizations", Organization.findAllOrganizations(currentUser.loginId), currentUser.getFavoriteOrganizations) |
|
59 | 68 |
</div> |
--- app/views/index/myOwnProjectList_partial.scala.html
... | ... | @@ -1,31 +0,0 @@ |
1 | -@** | |
2 | -* Yona, 21st Century Project Hosting SW | |
3 | -* | |
4 | -* Copyright Yona & Yobi Authors & NAVER Corp. | |
5 | -* https://yona.io | |
6 | -**@ | |
7 | -@(organization: Organization, favored:Boolean, isLast:Boolean = false) | |
8 | -@import utils.TemplateHelper._ | |
9 | - | |
10 | -@defining(UserApp.currentUser().ownProjects){ ownProjects => | |
11 | -<li class="org-li @if(isLast){favored}"> | |
12 | - <div class="org-list project-flex-container all-orgs"> | |
13 | - <div class="project-item project-item-container"> | |
14 | - <div class="flex-item site-logo"> | |
15 | - <i class="project-avatar">@if(hasOrganizationLogo(organization)){<img class="logo" src="@urlToOrganizationLogo(organization)">}else{<span class="dummy-25px"> </span>}</i> | |
16 | - </div> | |
17 | - <div class="projectName-owner all-org-names flex-item"> | |
18 | - <div class="project-name org-name flex-item">@UserApp.currentUser().loginId</div> | |
19 | - <div class="project-owner flex-item sub-project-counter"></div> | |
20 | - </div> | |
21 | - </div> | |
22 | - <div class="star-org flex-item"> | |
23 | - </div> | |
24 | - </div> | |
25 | - <ul class="project-ul"> | |
26 | - @for(project <- ownProjects){ | |
27 | - @allProjectList_partial(project, UserApp.currentUser().favoriteProjects.contains(project)) | |
28 | - } | |
29 | - </ul> | |
30 | -</li> | |
31 | -} |
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?