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

test
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

59 lines
2.7 KiB

@**
* Yona, 21st Century Project Hosting SW
*
* Copyright Yona & Yobi Authors & NAVER Corp. & NAVER LABS Corp.
* https://yona.io
**@
@(currentUser:User)
@import utils.TemplateHelper._
@displayOrganizations(title:String, organizations:List[Organization], favoredOrganizations:List[Organization], isActive:Boolean = false) = {
@if(organizations.isEmpty && favoredOrganizations.isEmpty && UserApp.currentUser().ownProjects.isEmpty) {
<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 =>
<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-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)
}
</ul>
</li>
}
@for(organization <- favoredOrganizations) {
@if(favoredOrganizations.last.equals(organization)){
@myOrganizationList_partial(organization, true, true)
} else {
@myOrganizationList_partial(organization, true)
}
}
@for(organization <- organizations) {
@if(!favoredOrganizations.contains(organization)) {
@myOrganizationList_partial(organization, false)
}
}
</ul>
}
}
<div class="search-result">
<div class="group">
<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)
</div>