diff --git a/src/main/twirl/gitbucket/core/helper/branchcontrol.scala.html b/src/main/twirl/gitbucket/core/helper/branchcontrol.scala.html index 6d36048..3ab4b67 100644 --- a/src/main/twirl/gitbucket/core/helper/branchcontrol.scala.html +++ b/src/main/twirl/gitbucket/core/helper/branchcontrol.scala.html @@ -4,58 +4,119 @@ @import gitbucket.core.view.helpers @gitbucket.core.helper.html.dropdown( value = if(branch.length == 40) branch.substring(0, 10) else branch, - prefix = if(branch.length == 40) "tree" else if(repository.branchList.contains(branch)) "branch" else "tree", + prefix = if(repository.branchList.contains(branch)) "branch" else if (repository.tags.map(_.name).contains(branch)) "tag" else "tree", + style = "min-width: 200px;", maxValueWidth = "200px" ) { -
  • Switch branches
  • -
  • - @body - @if(hasWritePermission) { -
  • + +
  • +
  • - } + @body + @if(hasWritePermission) { + + } + } diff --git a/src/main/twirl/gitbucket/core/repo/files.scala.html b/src/main/twirl/gitbucket/core/repo/files.scala.html index a52804a..6e3b128 100644 --- a/src/main/twirl/gitbucket/core/repo/files.scala.html +++ b/src/main/twirl/gitbucket/core/repo/files.scala.html @@ -80,7 +80,10 @@
    @gitbucket.core.helper.html.branchcontrol(branch, repository, hasWritePermission){ @repository.branchList.map { x => -
  • @gitbucket.core.helper.html.checkicon(x == branch) @x
  • +
  • @gitbucket.core.helper.html.checkicon(x == branch) @x
  • + } + @repository.tags.map { x => +
  • @gitbucket.core.helper.html.checkicon(x.name == branch) @x.name
  • } } @if(pathList.nonEmpty){