diff --git a/src/main/twirl/gitbucket/core/repo/blob.scala.html b/src/main/twirl/gitbucket/core/repo/blob.scala.html index 5e53568..bbe002a 100644 --- a/src/main/twirl/gitbucket/core/repo/blob.scala.html +++ b/src/main/twirl/gitbucket/core/repo/blob.scala.html @@ -7,11 +7,11 @@ isBlame: Boolean, isLfsFile: Boolean)(implicit context: gitbucket.core.controller.Context) @import gitbucket.core.view.helpers -@gitbucket.core.html.main(s"${(repository.name :: pathList).mkString("/")} at ${helpers.encodeRefName(branch)} - ${repository.owner}/${repository.name}", Some(repository)) { +@gitbucket.core.html.main(s"${(repository.name :: pathList).mkString("/")} at ${branch} - ${repository.owner}/${repository.name}", Some(repository)) { @gitbucket.core.html.menu("files", repository){
@@ -31,13 +31,9 @@ Older
- @gitbucket.core.helper.html.branchcontrol( - branch, - repository, - hasWritePermission - ){ + @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
  • } }
    @@ -46,7 +42,7 @@ @if(i == pathList.length - 1){ @section } else { - @section / + @section / } } @if(isLfsFile){ @@ -61,15 +57,16 @@ @helpers.link(latestCommit.summary, repository)
    @if(hasWritePermission && content.viewType == "text" && repository.branchList.contains(branch)){ - Edit + Edit } - Raw + Raw @if(content.viewType == "text"){ - Blame + Blame } - History + History @if(hasWritePermission && repository.branchList.contains(branch)){ - Delete + Delete }
    @@ -88,12 +85,12 @@ } @if(content.viewType == "image"){
    - +
    } @if(content.viewType == "large" || content.viewType == "binary"){
    - View Raw
    + View Raw

    (Sorry about that, but we can't show files that are this big right now)
    @@ -133,7 +130,7 @@ } var line = pos[i].id.replace(/^L/,''); var hash = location.hash; - var commitUrl = '@helpers.url(repository)/blob/@latestCommit.id/@pathList.mkString("/")'; + var commitUrl = '@helpers.url(repository)/blob/@helpers.encodeRefName((latestCommit.id :: pathList).mkString("/"))'; if(e.shiftKey == true && hash.match(/#L\d+(-L\d+)?/)){ var lines = hash.split('-'); window.history.pushState('', '', commitUrl + lines[0] + '-L' + line); @@ -170,7 +167,7 @@ updateSourceLineNum(); return; } - $(document.body).toggleClass('no-box-shadow', document.body.style.boxShadow===undefined); + $(document.body).toggleClass('no-box-shadow', document.body.style.boxShadow === undefined); $('.blame-action').addClass("active"); var base = $('
    ').css({height: pre.height()}).prependTo(pre.parents("div.box-content-bottom")); base.parent().addClass("blame-container"); diff --git a/src/main/twirl/gitbucket/core/repo/commits.scala.html b/src/main/twirl/gitbucket/core/repo/commits.scala.html index 63b272c..387f3d9 100644 --- a/src/main/twirl/gitbucket/core/repo/commits.scala.html +++ b/src/main/twirl/gitbucket/core/repo/commits.scala.html @@ -12,11 +12,7 @@ @gitbucket.core.html.menu("files", repository){
    @if(pathList.isEmpty){ - @gitbucket.core.helper.html.branchcontrol( - branch, - repository, - hasWritePermission - ){ + @gitbucket.core.helper.html.branchcontrol(branch, repository, hasWritePermission){ @repository.branchList.map { x =>
  • @gitbucket.core.helper.html.checkicon(x == branch) @x
  • } @@ -29,7 +25,7 @@ @if(i == pathList.length - 1){ @section } else { - @section / + @section / } } } diff --git a/src/main/twirl/gitbucket/core/repo/delete.scala.html b/src/main/twirl/gitbucket/core/repo/delete.scala.html index 7e32325..2243f61 100644 --- a/src/main/twirl/gitbucket/core/repo/delete.scala.html +++ b/src/main/twirl/gitbucket/core/repo/delete.scala.html @@ -12,7 +12,7 @@
    @repository.name / @pathList.zipWithIndex.map { case (section, i) => - @section / + @section / } @fileName @@ -25,7 +25,7 @@ @fileName
    - View + View
    @@ -46,7 +46,7 @@
    - Cancel + Cancel
    diff --git a/src/main/twirl/gitbucket/core/repo/editor.scala.html b/src/main/twirl/gitbucket/core/repo/editor.scala.html index 039ac0d..7a9d281 100644 --- a/src/main/twirl/gitbucket/core/repo/editor.scala.html +++ b/src/main/twirl/gitbucket/core/repo/editor.scala.html @@ -17,7 +17,7 @@
    @repository.name / @pathList.zipWithIndex.map { case (section, i) => - @section / + @section / } @@ -58,9 +58,9 @@
    @if(fileName.isEmpty){ - Cancel + Cancel } else { - Cancel + Cancel } diff --git a/src/main/twirl/gitbucket/core/repo/files.scala.html b/src/main/twirl/gitbucket/core/repo/files.scala.html index a35342f..442ee8b 100644 --- a/src/main/twirl/gitbucket/core/repo/files.scala.html +++ b/src/main/twirl/gitbucket/core/repo/files.scala.html @@ -16,10 +16,10 @@ if(branch == repository.repository.defaultBranch){ s"${repository.owner}/${repository.name}" } else { - s"${repository.owner}/${repository.name} at ${helpers.encodeRefName(branch)}" + s"${repository.owner}/${repository.name} at ${branch}" } } else { - s"${(repository.name :: pathList).mkString("/")} at ${helpers.encodeRefName(branch)} - ${repository.owner}/${repository.name}" + s"${(repository.name :: pathList).mkString("/")} at ${branch} - ${repository.owner}/${repository.name}" }, Some(repository)) { @gitbucket.core.html.menu("files", repository, Some(branch), info, error){ @if(pathList.isEmpty) { @@ -32,9 +32,9 @@ @if(hasWritePermission){
    - - + +
    }
    @@ -133,7 +133,7 @@ @if(pathList.size > 0){ - .. + .. @@ -173,7 +173,7 @@ } case None => { - + {file.name.split("/").toList.init match { case Nil => "" case list => list.mkString("", "/", "/") @@ -183,7 +183,7 @@ } }} } else { - @file.name + @file.name } diff --git a/src/main/twirl/gitbucket/core/repo/find.scala.html b/src/main/twirl/gitbucket/core/repo/find.scala.html index 1cf149c..a5de59d 100644 --- a/src/main/twirl/gitbucket/core/repo/find.scala.html +++ b/src/main/twirl/gitbucket/core/repo/find.scala.html @@ -59,19 +59,19 @@ if(e.keyCode == 40){ // DOWN e.preventDefault(); e.stopPropagation(); - changeCursor(cursor+1); - }else if(e.keyCode==38){ // UP + changeCursor(cursor + 1); + }else if(e.keyCode == 38){ // UP e.preventDefault(); e.stopPropagation(); - changeCursor(cursor-1); - }else if(e.keyCode==13){ // ENTER + changeCursor(cursor - 1); + }else if(e.keyCode == 13){ // ENTER e.preventDefault(); e.stopPropagation(); target = $(".tree-browser-result.navigation-focus a"); if(target[0]){ target[0].click(); } - }else if(e.keyCode==27){ // ESC + }else if(e.keyCode == 27){ // ESC e.preventDefault(); e.stopPropagation(); history.back(); @@ -90,23 +90,23 @@ } function filter(){ var v = $('#tree-finder-field').val(); - if(v==preKeyword || paths.length==0){ + if(v == preKeyword || paths.length == 0){ return; } scrollIntoView('#tree-finder-field'); - preKeyword=v; - cursor=0; + preKeyword = v; + cursor = 0; var p = string_score_sort(v, paths, 50); res.html(""); - if(p.length==0){ + if(p.length == 0){ $(".no-results").show(); return; }else{ $(".no-results").hide(); - for(var i=0;i < p.length;i++){ + for(var i = 0; i < p.length; i++){ var row = template.clone(); - row.find("a").attr("href",pathBase+"/"+p[i].string).html(string_score_highlight(p[i], '')); - if(cursor==i){ + row.find("a").attr("href", pathBase + "/" + p[i].string).html(string_score_highlight(p[i], '')); + if(cursor == i){ row.addClass("navigation-focus"); } row.appendTo(res); @@ -116,4 +116,4 @@ }); } -} \ No newline at end of file +} diff --git a/src/main/twirl/gitbucket/core/repo/upload.scala.html b/src/main/twirl/gitbucket/core/repo/upload.scala.html index e2ee77e..8221359 100644 --- a/src/main/twirl/gitbucket/core/repo/upload.scala.html +++ b/src/main/twirl/gitbucket/core/repo/upload.scala.html @@ -13,7 +13,7 @@
    @repository.name / @pathList.zipWithIndex.map { case (section, i) => - @section / + @section / } @@ -38,7 +38,7 @@
    - Cancel + Cancel