'New Pull Request' button if you logined.

This commit is contained in:
nazoking
2015-01-30 00:55:02 +09:00
parent 5f5cc8d454
commit a417c373f1
2 changed files with 8 additions and 1 deletions

View File

@@ -126,6 +126,9 @@ $(function(){
$(this).hide();
$('#pull-request-form').show();
});
if(location.search.substr(1).split("&").indexOf("expand=1")!=-1){
$('#show-form').click();
}
@if(hasWritePermission){
function checkConflict(from, to, noConflictHandler, hasConflictHandler){

View File

@@ -29,7 +29,11 @@
<a href="@url(repository)/pull/@issue.issueId" title="@issue.title" class="label label-success">Open</a>
}
}.getOrElse{
<a href="@url(repository)/compare/@{encodeRefName(repository.repository.defaultBranch)}...@{encodeRefName(branch.name)}" class="btn btn-small">Compare</a>
@if(context.loginAccount.isDefined){
<a href="@url(repository)/compare/@{encodeRefName(repository.repository.defaultBranch)}...@{encodeRefName(branch.name)}?expand=1" class="btn btn-small">New Pull Request</a>
}else{
<a href="@url(repository)/compare/@{encodeRefName(repository.repository.defaultBranch)}...@{encodeRefName(branch.name)}" class="btn btn-small">Compare</a>
}
}
@if(hasWritePermission){
@if(prs.map(!_._2.closed).getOrElse(false)){