mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-10 15:35:59 +01:00
'New Pull Request' button if you logined.
This commit is contained in:
@@ -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){
|
||||
|
||||
@@ -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)){
|
||||
|
||||
Reference in New Issue
Block a user