Skip to content

Commit

Permalink
usermenu: Show favorite personal account projects
Browse files Browse the repository at this point in the history
  • Loading branch information
doortts committed Oct 26, 2018
1 parent 4dea4fe commit 0c54435
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 36 deletions.
9 changes: 8 additions & 1 deletion app/assets/stylesheets/less/_usermenu.less
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
margin: 10px 0;
padding: 0;
list-style-type: none;

.favored {
border-bottom: 1px dashed #7b1fa2;
}
Expand All @@ -90,11 +91,17 @@
border-left: 1px solid #fff;
border-top: 1px solid #fff;
border-right: 1px solid #fff;
cursor: pointer;

&:hover {
color: #3592B5;
border: 1px solid #3592B5 !important;
}
cursor: pointer;

}

.etc-favorites {
border-top: 1px dashed #7b1fa2;
}

.user-search-form{
Expand Down
17 changes: 13 additions & 4 deletions app/views/index/myOrganizationList.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@
<div id="@title" class="no-result tab-pane user-ul @if(isActive) {active}">@Messages("title.no.results")</div>
} else {
<ul class="tab-pane user-ul @if(isActive) {active}" id="@title">
@defining(UserApp.currentUser().ownProjects){ ownProjects =>
@defining(currentUser.ownProjects){ ownProjects =>
<li class="org-li">
<div class="org-list project-flex-container all-orgs">
<div class="project-item project-item-container">
<div class="flex-item site-logo">
<i class="project-avatar"></i>
</div>
<div class="projectName-owner all-org-names flex-item">
<div class="project-name org-name flex-item">@UserApp.currentUser().loginId</div>
<div class="project-name org-name flex-item">@currentUser.loginId</div>
<div class="project-owner flex-item sub-project-counter"></div>
</div>
</div>
<div class="star-org flex-item"></div>
</div>
<ul class="project-ul">
@for(project <- ownProjects){
@allProjectList_partial(project, FavoriteProject.findByProjectId(UserApp.currentUser().id, project.id) != null)
@allProjectList_partial(project, FavoriteProject.findByProjectId(currentUser.id, project.id) != null)
}
</ul>
</li>
Expand All @@ -46,6 +46,15 @@
}
}
</ul>
@defining(currentUser.favoriteProjects){ favoriteProjects =>
<ul class="etc-favorites user-ul">
@for(favoriteProject <- favoriteProjects){
@if(!favoriteProject.project.hasGroup && !favoriteProject.owner.equals(currentUser.loginId)) {
@myProjectList_partial(favoriteProject.project, true)
}
}
</ul>
}
}
}

Expand All @@ -55,5 +64,5 @@
<input class="search-input org-search" type="text" autocomplete="off" placeholder="@Messages("title.type.name")">
<span class="bar"></span>
</div>
@displayOrganizations("organizations", Organization.findAllOrganizations(UserApp.currentUser.loginId), currentUser.getFavoriteOrganizations)
@displayOrganizations("organizations", Organization.findAllOrganizations(currentUser.loginId), currentUser.getFavoriteOrganizations)
</div>
31 changes: 0 additions & 31 deletions app/views/index/myOwnProjectList_partial.scala.html

This file was deleted.

0 comments on commit 0c54435

Please sign in to comment.