THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

Browse Source

usermenu: Show favorite personal account projects

tags/v1.11.0
Suwon Chae 1 year ago
parent
commit
0c5443546f
3 changed files with 21 additions and 36 deletions
  1. +8
    -1
      app/assets/stylesheets/less/_usermenu.less
  2. +13
    -4
      app/views/index/myOrganizationList.scala.html
  3. +0
    -31
      app/views/index/myOwnProjectList_partial.scala.html

+ 8
- 1
app/assets/stylesheets/less/_usermenu.less View File

@@ -80,6 +80,7 @@
margin: 10px 0;
padding: 0;
list-style-type: none;

.favored {
border-bottom: 1px dashed #7b1fa2;
}
@@ -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{


+ 13
- 4
app/views/index/myOrganizationList.scala.html View File

@@ -12,7 +12,7 @@
<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">
@@ -20,7 +20,7 @@
<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>
@@ -28,7 +28,7 @@
</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>
@@ -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>
}
}
}

@@ -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>

+ 0
- 31
app/views/index/myOwnProjectList_partial.scala.html View File

@@ -1,31 +0,0 @@
@**
* Yona, 21st Century Project Hosting SW
*
* Copyright Yona & Yobi Authors & NAVER Corp.
* https://yona.io
**@
@(organization: Organization, favored:Boolean, isLast:Boolean = false)
@import utils.TemplateHelper._

@defining(UserApp.currentUser().ownProjects){ ownProjects =>
<li class="org-li @if(isLast){favored}">
<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">@if(hasOrganizationLogo(organization)){<img class="logo" src="@urlToOrganizationLogo(organization)">}else{<span class="dummy-25px"> </span>}</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-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, UserApp.currentUser().favoriteProjects.contains(project))
}
</ul>
</li>
}

Loading…
Cancel
Save