diff --git a/src/main/scala/gitbucket/core/controller/RepositoryViewerController.scala b/src/main/scala/gitbucket/core/controller/RepositoryViewerController.scala index 372e002..1007cf9 100644 --- a/src/main/scala/gitbucket/core/controller/RepositoryViewerController.scala +++ b/src/main/scala/gitbucket/core/controller/RepositoryViewerController.scala @@ -758,8 +758,6 @@ .setTree(revCommit.getTree) .setOutputStream(response.getOutputStream) .call() - - Unit } } diff --git a/src/main/twirl/gitbucket/core/menu.scala.html b/src/main/twirl/gitbucket/core/menu.scala.html index 390f459..d418328 100644 --- a/src/main/twirl/gitbucket/core/menu.scala.html +++ b/src/main/twirl/gitbucket/core/menu.scala.html @@ -1,15 +1,14 @@ @(active: String, repository: gitbucket.core.service.RepositoryService.RepositoryInfo, id: Option[String] = None, - expand: Boolean = false, + isRepoTop: Boolean = false, isNoGroup: Boolean = true, info: Option[Any] = None, error: Option[Any] = None)(body: Html)(implicit context: gitbucket.core.controller.Context) @import context._ @import gitbucket.core.view.helpers._ -@import gitbucket.core.service.RepositoryService._ -@sidemenu(path: String, name: String, icon: String, label: String, count: Int = 0) = { +@menuitem(path: String, name: String, icon: String, label: String, count: Int = 0) = {
  • @label @@ -19,6 +18,7 @@
  • } +
    @helper.html.information(info) @@ -59,12 +59,12 @@ }
    @@ -99,7 +99,7 @@ } *@ @*
    *@ - @if(expand){ + @if(isRepoTop){ @repository.repository.description.map { description =>

    @detectAndRenderLinks(description)

    } @@ -173,7 +173,7 @@ $('#fork-form').submit(); }); } - +@* @repository.sshUrl.map { sshUrl => $('#repository-url-http').click(function(){ $('#repository-url-proto').text('HTTP'); @@ -189,5 +189,6 @@ $('#repository-url-copy').attr('data-clipboard-text', $('#repository-url').val()); }); } +*@ }); diff --git a/src/main/twirl/gitbucket/core/repo/files.scala.html b/src/main/twirl/gitbucket/core/repo/files.scala.html index b272a3b..0a0f181 100644 --- a/src/main/twirl/gitbucket/core/repo/files.scala.html +++ b/src/main/twirl/gitbucket/core/repo/files.scala.html @@ -11,6 +11,7 @@ error: Option[Any] = None)(implicit context: gitbucket.core.controller.Context) @import context._ @import gitbucket.core.view.helpers._ +@import gitbucket.core.service.RepositoryService._ @html.main( if(pathList.isEmpty){ if(branch == repository.repository.defaultBranch){ @@ -23,12 +24,32 @@ }, Some(repository)) { @html.menu("code", repository, Some(branch), pathList.isEmpty, groupNames.isEmpty, info, error){
    -
    - - @if(pathList.nonEmpty){ - - } -
    + @if(pathList.isEmpty){ +
    + @if(platform != "linux" && platform != null){ + + } + Download ZIP +
    +
    +
    + @helper.html.copy("repository-url-copy", repository.httpUrl){ + + } +
    +
    +
    +
    + Find file + @* + @if(pathList.nonEmpty){ + History + } + *@ +
    +
    + } + @branchPullRequest.map{ case (pullRequest, issue) => #@pullRequest.issueId }.getOrElse{