@** * Yobi, Project Hosting SW * * Copyright 2014 NAVER Corp. * http://yobi.io * * @author Keesun * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. **@ @(org:Organization) @import utils.TemplateHelper._ @import utils.JodaDateUtil @import utils.AccessControl._ @import models._ @makeLeaveBtn(org: Organization, isShow: Boolean) = { @if(!OrganizationApp.validateForLeave(org.name).hasError() && isShow) { } } @makeUser(organizationUser: OrganizationUser, isShow: Boolean) = { @if(isShow) {
  • @organizationUser.user.getDisplayName
  • } } @amIWatching(project:Project) = { @if(User.isWatching(project)) { "watch-on" } } @organizationLayout(org.name, utils.MenuType.NONE, org) { @header(org) @menu(org)

    @org.descr

    @if(OrganizationUser.isAdmin(org, UserApp.currentUser) || UserApp.currentUser().isSiteManager) { }
      @for(project <- org.getVisibleProjects(UserApp.currentUser())) {
    • @project.name @if(project.isForkedFromOrigin()){ @project.originalProject.owner / @project.originalProject.name } @if(project.isPrivate){ } @if(project.isProtected){ G } @for(label <- project.labels) { @label.name }
      @project.overview

      by @project.owner at @agoOrDateString(project.createdDate) @if(project.lastPushedDateAgo() != null) {, @Messages("project.codeUpdate") @agoOrDateString(project.lastPushedDate)}

        @for(member <- User.findUsersByProject(project.id)){ @if(member.loginId != project.owner){
      • @member.name
      • } }

      @Html(Messages("project.onmember", User.findUsersByProject(project.id).size)) @Html(Messages("project.onwatching", project.getWatchingCount)) @if(User.isWatching(project)) { } else { }

    • }
    @if(UserApp.currentUser().isSiteManager() || UserApp.currentUser().isMemberOf(org) || OrganizationUser.isAdmin(org.id, UserApp.currentUser().id) ) {

    @Messages("user.role.org_admin")

    @makeLeaveBtn(org, OrganizationUser.isAdmin(org.id, UserApp.currentUser().id))
      @for(organizationUser <- org.users) { @makeUser(organizationUser, OrganizationUser.isAdmin(org.id, organizationUser.user.id)) }

    @Messages("user.role.org_member")

    @makeLeaveBtn(org, OrganizationUser.isMember(org.id, UserApp.currentUser().id))
      @for(organizationUser <- org.users) { @makeUser(organizationUser, OrganizationUser.isMember(org.id, organizationUser.user.id)) }
    }
    @** Confirm to leave the project **@ }