diff --git a/README.md b/README.md index d7dc176..42150b4 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ ### 3.10 - 30 Dec 2015 - Move to Bootstrap3 - New URL for raw contents (`raw/master/doc/activity.md` instead of `blob/master/doc/activity.md?raw=true`) -- Update xsbt-web-pligin +- Update xsbt-web-plugin - Update H2 database ### 3.9 - 5 Dec 2015 diff --git a/doc/auto_update.md b/doc/auto_update.md index 220a884..992672f 100644 --- a/doc/auto_update.md +++ b/doc/auto_update.md @@ -8,7 +8,7 @@ object AutoUpdate { ... /** - * The history of versions. A head of this sequence is the current BitBucket version. + * The history of versions. A head of this sequence is the current GitBucket version. */ val versions = Seq( Version(1, 0) @@ -20,7 +20,7 @@ GitBucket stores the current version to ```GITBUCKET_HOME/version``` and checks it at start-up. If the stored version differs from the actual version, it executes differences of SQL files between the stored version and the actual version. And ```GITBUCKET_HOME/version``` is updated by the actual version. -We can also add any Scala code for upgrade GitBucket which modifies ď˝’esources other than database. Override ```Version.update``` like below: +We can also add any Scala code for upgrade GitBucket which modifies resources other than database. Override ```Version.update``` like below: ```scala val versions = Seq( diff --git a/doc/directory.md b/doc/directory.md index de73fe9..b016698 100644 --- a/doc/directory.md +++ b/doc/directory.md @@ -8,10 +8,10 @@ * /HOME/gitbucket * /repositories * /USER_NAME - * / REPO_NAME.git (substance of repository. GitServlet sees this directory) - * / REPO_NAME + * /REPO_NAME.git (substance of repository. GitServlet sees this directory) + * /REPO_NAME * /issues (files which are attached to issue) - * / REPO_NAME.wiki.git (wiki repository) + * /REPO_NAME.wiki.git (wiki repository) * /data * /USER_NAME * /files diff --git a/doc/release.md b/doc/release.md index b515c80..7c97c39 100644 --- a/doc/release.md +++ b/doc/release.md @@ -23,7 +23,7 @@ object AutoUpdate { /** - * The history of versions. A head of this sequence is the current BitBucket version. + * The history of versions. A head of this sequence is the current GitBucket version. */ val versions = Seq( new Version(3, 3), // <---- add this line!! diff --git a/src/main/scala/gitbucket/core/controller/ControllerBase.scala b/src/main/scala/gitbucket/core/controller/ControllerBase.scala index f98e9cb..5d449ba 100644 --- a/src/main/scala/gitbucket/core/controller/ControllerBase.scala +++ b/src/main/scala/gitbucket/core/controller/ControllerBase.scala @@ -30,6 +30,10 @@ implicit val jsonFormats = gitbucket.core.api.JsonFormat.jsonFormats + before("/api/v3/*") { + contentType = formats("json") + } + // TODO Scala 2.11 // // Don't set content type via Accept header. // override def format(implicit request: HttpServletRequest) = "" diff --git a/src/main/scala/gitbucket/core/controller/RepositoryViewerController.scala b/src/main/scala/gitbucket/core/controller/RepositoryViewerController.scala index da9b2d9..4abf09c 100644 --- a/src/main/scala/gitbucket/core/controller/RepositoryViewerController.scala +++ b/src/main/scala/gitbucket/core/controller/RepositoryViewerController.scala @@ -634,7 +634,7 @@ val parentPath = if (path == ".") Nil else path.split("/").toList // process README.md or README.markdown val readme = files.find { file => - readmeFiles.contains(file.name.toLowerCase) + !file.isDirectory && readmeFiles.contains(file.name.toLowerCase) }.map { file => val path = (file.name :: parentPath.reverse).reverse path -> StringUtil.convertFromByteArray(JGitUtil.getContentFromId( diff --git a/src/main/twirl/gitbucket/core/index.scala.html b/src/main/twirl/gitbucket/core/index.scala.html index f209fb5..035dde6 100644 --- a/src/main/twirl/gitbucket/core/index.scala.html +++ b/src/main/twirl/gitbucket/core/index.scala.html @@ -48,7 +48,7 @@ } @if(userRepositories.size > max){
  • - Show more @{userRepositories.size - max} pages... + Show @{userRepositories.size - max} more repositories...
  • } } @@ -62,12 +62,19 @@ @if(recentRepositories.isEmpty){
  • No repositories
  • } else { - @recentRepositories.map { repository => - } + @if(recentRepositories.size > max){ +
  • + Show @{recentRepositories.size - max} more repositories... +
  • + } + } } @@ -77,7 +84,7 @@ }