diff --git a/src/main/twirl/gitbucket/core/pulls/compare.scala.html b/src/main/twirl/gitbucket/core/pulls/compare.scala.html
index 928596f..94effec 100644
--- a/src/main/twirl/gitbucket/core/pulls/compare.scala.html
+++ b/src/main/twirl/gitbucket/core/pulls/compare.scala.html
@@ -28,6 +28,9 @@
}
}
@gitbucket.core.helper.html.dropdown(originId, "base", filter=("origin_branch", "Find Branch...")) {
+ @if(!originRepository.branchList.contains(originId)){
+
@gitbucket.core.helper.html.checkicon(true) @originId
+ }
@originRepository.branchList.map { branch =>
@gitbucket.core.helper.html.checkicon(branch == originId) @branch
}
@@ -39,16 +42,21 @@
}
}
@gitbucket.core.helper.html.dropdown(forkedId, "compare", filter=("forked_branch", "Find Branch...")) {
+ @if(!forkedRepository.branchList.contains(forkedId)){
+ @gitbucket.core.helper.html.checkicon(true) @forkedId
+ }
@forkedRepository.branchList.map { branch =>
@gitbucket.core.helper.html.checkicon(branch == forkedId) @branch
}
}
-
-

Checking...
-
+ @if(originRepository.branchList.contains(originId) && forkedRepository.branchList.contains(forkedId)){
+
+

Checking...
+
+ }
- @if(commits.nonEmpty && context.loginAccount.isDefined){
+ @if(commits.nonEmpty && context.loginAccount.isDefined && originRepository.branchList.contains(originId) && forkedRepository.branchList.contains(forkedId)){
Create pull request
@@ -94,16 +102,6 @@
There isn't anything to compare.
@originRepository.owner:@originId and
@forkedRepository.owner:@forkedId are identical.
- @*
-
-
-
- There isn't anything to compare.
- @originRepository.owner:@originId and @forkedRepository.owner:@forkedId are identical.
- |
-
-
- *@
} else {
@@ -147,14 +145,6 @@
@helpers.user(commit.authorName, commit.authorEmailAddress, "username strong")
@commit.shortMessage |
- @*
- @if(comments.isDefined){
- @comments.get.flatMap @{
- case comment: CommitComment => Some(comment)
- case other => None
- }.count(t => t.commitId == commit.id && !t.pullRequest)
- }
- *@
@commit.id.substring(0, 7)
|
@@ -164,7 +154,6 @@
}
@gitbucket.core.helper.html.diff(diffs, repository, Some(commitId), Some(sourceId), true, None, false, false)
- Showing you all comments on commits in this comparison.
@gitbucket.core.issues.html.commentlist(None, comments, false, repository, None)
}
}
@@ -221,7 +210,7 @@
$('#show-form').click();
}
- @if(context.loginAccount.isDefined){
+ @if(context.loginAccount.isDefined && originRepository.branchList.contains(originId) && forkedRepository.branchList.contains(forkedId)){
function checkConflict(from, to){
$('.check-conflict').show();
$.get('@helpers.url(forkedRepository)/compare/' + from + '...' + to + '/mergecheck',