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.
 
 
 
 
 
 

115 lines
6.2 KiB

@**
* Yobi, Project Hosting SW
*
* Copyright 2013 NAVER Corp.
* http://yobi.io
*
* @Author Keesun Baik
*
* 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.
**@
@(title:String, project: Project, forkProject: Project, forkedProjects: List[Project], form: play.data.Form[Project], orgUserList:List[OrganizationUser])
@import utils.TemplateHelper._
@import controllers.UserApp
@import models.Organization
@implicitField = @{ helper.FieldConstructor(simpleForm) }
@projectLayout(title, project, utils.MenuType.PULL_REQUEST) {
@projectMenu(project, utils.MenuType.PULL_REQUEST, "main-menu-only")
<div class="page-wrap-outer">
<div class="project-page-wrap">
<div class="content-wrap frm-wrap">
<form action="@routes.PullRequestApp.fork(project.owner, project.name)" method="post" class="form-horizontal nm">
<input type="hidden" name="owner" value="@forkProject.owner" />
<fieldset>
<legend>
<h4 style="padding-top:10px;">
@project.owner / @project.name @Messages("fork")
</h4>
</legend>
<div id="helpMessage" class="well">
<div class="row-fluid">
@if(forkedProjects.isEmpty){
<div class="pull-left">
<img class="img-polaroid" src="@routes.Assets.at("images/fork-pull/fork.jpg")"><br>
</div>
<div class="pull-left help-messages">
<p class="lead">@Messages("fork.help.title")</p>
<p>@Messages("fork.help.message.1")</p>
<p>@Messages("fork.help.message.2")</p>
</div>
} else {
<div class="help-messages center-txt">
<i class="ico ico-err2"></i>
<p>@Messages("fork.already.exist")</p>
@for(forkedProject <- forkedProjects) {
<p>
<strong class="vmiddle">@project.owner / @project.name</strong>
<i class="yobicon-right vmiddle"></i>
<a href="@routes.ProjectApp.project(forkedProject.owner, forkedProject.name)" class="vmiddle primary-txt">@forkedProject.owner / @forkedProject.name</a>
</p>
}
</div>
}
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputOwner">@Messages("project.owner")</label>
<div class="controls">
<select id="project-owner" name="owner">
<option data-url="@routes.PullRequestApp.newFork(project.owner, project.name, UserApp.currentUser.loginId)" value="@UserApp.currentUser.loginId">@UserApp.currentUser.loginId</option>
@for(orgUser <- orgUserList) {
<option data-url="@routes.PullRequestApp.newFork(project.owner, project.name, orgUser.organization.name)" value="@orgUser.organization.name" @if(forkProject.owner == orgUser.organization.name) { selected }>@orgUser.organization.name</option>
}
</select>
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputName">@Messages("project.name")</label>
<div class="controls">
<input type="text" id="inputName" name="name" value="@forkProject.name" />
<span class="help-inline">@Messages("project.name.alert")</span>
</div>
</div>
<div class="control-group">
<label class="control-label">@Messages("project.shareOption")</label>
<div class="controls">
<input name="projectScope" type="radio" id="public" value="PUBLIC" class="radio-btn" checked="checked">
<label for="public" class="bg-radiobtn label-public">@Messages("project.public")</label>
@if(Organization.findByName(forkProject.owner) != null){
<input name="projectScope" type="radio" id="protected" value="PROTECTED" class="radio-btn">
<label for="protected" class="bg-radiobtn label-protected">@Messages("project.protected")</label>
}
<input name="projectScope" type="radio" id="private" value="PRIVATE" class="radio-btn">
<label for="private" class="bg-radiobtn label-private">@Messages("project.private")</label>
</div>
</div>
<div class="control-group">
<div class="controls">
<button type="submit" class="ybtn ybtn-info">@Messages("fork")</button>
<a href="@routes.PullRequestApp.pullRequests(project.owner, project.name)" class="ybtn">@Messages("button.cancel")</a>
</div>
</div>
</fieldset>
</form>
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
$yobi.loadModule("project.Fork");
});
</script>
}