diff --git a/src/main/scala/gitbucket/core/view/helpers.scala b/src/main/scala/gitbucket/core/view/helpers.scala
index a28a1c8..6284248 100644
--- a/src/main/scala/gitbucket/core/view/helpers.scala
+++ b/src/main/scala/gitbucket/core/view/helpers.scala
@@ -4,8 +4,8 @@
import java.util.{Date, Locale, TimeZone}
import gitbucket.core.controller.Context
-import gitbucket.core.model.{CommitState, Repository}
-import gitbucket.core.plugin.{RenderRequest, PluginRegistry, Renderer}
+import gitbucket.core.model.CommitState
+import gitbucket.core.plugin.{RenderRequest, PluginRegistry}
import gitbucket.core.service.{RepositoryService, RequestCache}
import gitbucket.core.util.{FileUtil, JGitUtil, StringUtil}
@@ -165,29 +165,11 @@
*/
def encodeRefName(value: String): String = StringUtil.urlEncode(value).replace("%2F", "/")
- /**
- * Url encode except '/' and ':'
- */
- def encodeCompareBranch(value: String) =
- StringUtil.urlEncode(value).replace("%2F", "/").replace("%3A", ":")
-
def urlEncode(value: String): String = StringUtil.urlEncode(value)
def urlEncode(value: Option[String]): String = value.map(urlEncode).getOrElse("")
/**
- * The default origin (branch or remote:branch pair) branches are compared to.
- *
- * There are two cases: when the repo is a fork and when the repo is not a
- * fork.
- *
- * For a fork, the default ref is parentUserName:defaultBranch.
- * For a non fork, the default ref is defaultBranch.
- */
- def repositoryDefaultCompareOrigin(repo: Repository): String =
- repo.parentUserName.map(n => s"$n:${repo.defaultBranch}").getOrElse(repo.defaultBranch)
-
- /**
* Generates the url to the repository.
*/
def url(repository: RepositoryService.RepositoryInfo)(implicit context: Context): String =
diff --git a/src/main/twirl/gitbucket/core/helper/checkicon.scala.html b/src/main/twirl/gitbucket/core/helper/checkicon.scala.html
index 32a0c5a..b9726a7 100644
--- a/src/main/twirl/gitbucket/core/helper/checkicon.scala.html
+++ b/src/main/twirl/gitbucket/core/helper/checkicon.scala.html
@@ -1,6 +1,6 @@
@(condition: => Boolean)
@if(condition){
-
+
} else {
-
+
}
\ No newline at end of file
diff --git a/src/main/twirl/gitbucket/core/pulls/compare.scala.html b/src/main/twirl/gitbucket/core/pulls/compare.scala.html
index bf00b94..2b728fd 100644
--- a/src/main/twirl/gitbucket/core/pulls/compare.scala.html
+++ b/src/main/twirl/gitbucket/core/pulls/compare.scala.html
@@ -139,7 +139,7 @@
}
@if(hasWritePermission){
- function checkConflict(from, to, noConflictHandler, hasConflictHandler){
+ function checkConflict(from, to){
$('.check-conflict').show();
$.get('@url(repository)/compare/' + from + '...' + to + '/mergecheck',
function(data){ $('.check-conflict').html(data); });
diff --git a/src/main/twirl/gitbucket/core/repo/branches.scala.html b/src/main/twirl/gitbucket/core/repo/branches.scala.html
index e79105f..7b4eded 100644
--- a/src/main/twirl/gitbucket/core/repo/branches.scala.html
+++ b/src/main/twirl/gitbucket/core/repo/branches.scala.html
@@ -30,9 +30,17 @@
}
}.getOrElse{
@if(context.loginAccount.isDefined){
- New Pull Request
+ New Pull Request
}else{
- Compare
+ Compare
}
}
@if(hasWritePermission){