Permalink
Browse files

(refs #1398)Fix commit layout overlapping

  • Loading branch information...
1 parent 0c3cf5b commit e021868a9698b28ec4882b1e00439dd545827d36 @takezoe takezoe committed Jan 12, 2017
Showing with 19 additions and 17 deletions.
  1. +19 −17 src/main/twirl/gitbucket/core/repo/files.scala.html
@@ -147,25 +147,27 @@
}
</td>
<td class="ellipsis-cell" style="width: 20%; min-width: 160px;">
- @if(file.isDirectory){
- @if(file.linkUrl.isDefined){
- <a href="@file.linkUrl">
- <span class="simplified-path">@file.name.split("/").toList.init match {
- case Nil => {}
- case list => {@list.mkString("", "/", "/")}
- }</span>@file.name.split("/").toList.last
- </a>
+ <span>
+ @if(file.isDirectory){
+ @if(file.linkUrl.isDefined){
+ <a href="@file.linkUrl">
+ <span class="simplified-path">@file.name.split("/").toList.init match {
+ case Nil => {}
+ case list => {@list.mkString("", "/", "/")}
+ }</span>@file.name.split("/").toList.last
+ </a>
+ } else {
+ <a href="@helpers.url(repository)/tree@{(branch :: pathList).map(helpers.encodeRefName).mkString("/", "/", "/")}@{helpers.encodeRefName(file.name)}">
+ <span class="simplified-path">@file.name.split("/").toList.init match {
+ case Nil => {}
+ case list => {@list.mkString("", "/", "/")}
+ }</span>@file.name.split("/").toList.last
+ </a>
+ }
} else {
- <a href="@helpers.url(repository)/tree@{(branch :: pathList).map(helpers.encodeRefName).mkString("/", "/", "/")}@{helpers.encodeRefName(file.name)}">
- <span class="simplified-path">@file.name.split("/").toList.init match {
- case Nil => {}
- case list => {@list.mkString("", "/", "/")}
- }</span>@file.name.split("/").toList.last
- </a>
+ <a href="@helpers.url(repository)/blob@{(branch :: pathList).map(helpers.encodeRefName).mkString("/", "/", "/")}@{helpers.encodeRefName(file.name)}">@file.name</a>
}
- } else {
- <a href="@helpers.url(repository)/blob@{(branch :: pathList).map(helpers.encodeRefName).mkString("/", "/", "/")}@{helpers.encodeRefName(file.name)}">@file.name</a>
- }
+ </span>
</td>
<td class="ellipsis-cell" style="width: 70%;">
<a href="@helpers.url(repository)/commit/@file.commitId" class="commit-message" title="@file.message">@helpers.link(file.message, repository)</a>

0 comments on commit e021868

Please sign in to comment.