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.
 
 
 
 
 
 

81 lines
2.8 KiB

@**
* Yobi, Project Hosting SW
*
* Copyright 2012 NAVER Corp.
* http://yobi.io
*
* @Author Yi EungJun
*
* 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.
**@
@(project: Project)
@getCodeURL(project: Project) = @{
if(requestHeader.session == null){
CodeApp.getURL(project.owner, project.name)
} else {
defining(ProjectUser.roleOf(UserApp.currentUser.loginId, project)) { role =>
if(role == "manager" || role == "member"){
CodeApp.getURL(project.owner, project.name).replace("://", "://" + UserApp.currentUser.loginId + "@")
} else {
CodeApp.getURL(project.owner, project.name)
}
}
}
}
@import utils.AccessControl._
@projectLayout(Messages("title.commitHistory"), project, utils.MenuType.CODE) {
@projectMenu(project, utils.MenuType.CODE, "main-menu-only")
<div class="page-wrap-outer">
<div class="project-page-wrap">
<div class="row-fluid">
<div class="span12">
@Html(Messages("code.nohead"))
@if(isAllowed(UserApp.currentUser(), project.asResource(), Operation.UPDATE)) {
<h5>@Messages("code.nohead.clone", utils.Config.getSiteName)</h5>
<pre><code>git clone @getCodeURL(project)
cd @project.name/
echo "# @project.name" > README.md
git add README.md
git commit -m "Hello @utils.Config.getSiteName"
git push origin master</code></pre>
<h5>@Messages("code.nohead.init", utils.Config.getSiteName)</h5>
<pre><code>mkdir @project.name
cd @project.name/
echo "# @project.name" > README.md
git init
git add README.md
git commit -m "Hello @utils.Config.getSiteName"
git remote add origin @getCodeURL(project)
git push origin master</code></pre>
<h5>@Messages("code.nohead.remote", utils.Config.getSiteName)</h5>
<pre><code>git remote add origin @getCodeURL(project)
git push origin master</code></pre>
<h5>@Messages("code.nohead.pull.push")</h5>
<pre><code>git pull origin master
git push origin master</code></pre>
}
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
$yobi.loadModule("code.Nohead", {
"sProjectName": "@project.name"
});
});
</script>
}