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.
 
 
 
 
 
 

60 lines
2.7 KiB

  1. @**
  2. * Yona, 21st Century Project Hosting SW
  3. *
  4. * Copyright Yona & Yobi Authors & NAVER Corp. & NAVER LABS Corp.
  5. * https://yona.io
  6. **@
  7. @(currentUser:User)
  8. @import utils.TemplateHelper._
  9. @displayOrganizations(title:String, organizations:List[Organization], favoredOrganizations:List[Organization], isActive:Boolean = false) = {
  10. @if(organizations.isEmpty && favoredOrganizations.isEmpty && UserApp.currentUser().ownProjects.isEmpty) {
  11. <div id="@title" class="no-result tab-pane user-ul @if(isActive) {active}">@Messages("title.no.results")</div>
  12. } else {
  13. <ul class="tab-pane user-ul @if(isActive) {active}" id="@title">
  14. @defining(UserApp.currentUser().ownProjects){ ownProjects =>
  15. <li class="org-li">
  16. <div class="org-list project-flex-container all-orgs">
  17. <div class="project-item project-item-container">
  18. <div class="flex-item site-logo">
  19. <i class="project-avatar"></i>
  20. </div>
  21. <div class="projectName-owner all-org-names flex-item">
  22. <div class="project-name org-name flex-item">@UserApp.currentUser().loginId</div>
  23. <div class="project-owner flex-item sub-project-counter"></div>
  24. </div>
  25. </div>
  26. <div class="star-org flex-item"></div>
  27. </div>
  28. <ul class="project-ul">
  29. @for(project <- ownProjects){
  30. @allProjectList_partial(project, FavoriteProject.findByProjectId(UserApp.currentUser().id, project.id) != null)
  31. }
  32. </ul>
  33. </li>
  34. }
  35. @for(organization <- favoredOrganizations) {
  36. @if(favoredOrganizations.last.equals(organization)){
  37. @myOrganizationList_partial(organization, true, true)
  38. } else {
  39. @myOrganizationList_partial(organization, true)
  40. }
  41. }
  42. @for(organization <- organizations) {
  43. @if(!favoredOrganizations.contains(organization)) {
  44. @myOrganizationList_partial(organization, false)
  45. }
  46. }
  47. </ul>
  48. }
  49. }
  50. <div class="search-result">
  51. <div class="group">
  52. <input class="search-input org-search" type="text" autocomplete="off" placeholder="@Messages("title.type.name")">
  53. <span class="bar"></span>
  54. </div>
  55. @displayOrganizations("organizations", Organization.findAllOrganizations(UserApp.currentUser.loginId), currentUser.getFavoriteOrganizations)
  56. </div>