diff --git a/src/main/scala/gitbucket/core/controller/DashboardController.scala b/src/main/scala/gitbucket/core/controller/DashboardController.scala index 2c8a982..cb01a25 100644 --- a/src/main/scala/gitbucket/core/controller/DashboardController.scala +++ b/src/main/scala/gitbucket/core/controller/DashboardController.scala @@ -21,6 +21,16 @@ trait DashboardControllerBase extends ControllerBase { self: IssuesService with PullRequestService with RepositoryService with AccountService with UsersAuthenticator => + get("/dashboard/repos")(usersOnly { + val userName = context.loginAccount.get.userName + + html.repos( + getGroupNames(userName), + Nil, + getUserRepositories(userName, withoutPhysicalInfo = true) + ) + }) + get("/dashboard/issues")(usersOnly { searchIssues("created_by") }) diff --git a/src/main/twirl/gitbucket/core/dashboard/repos.scala.html b/src/main/twirl/gitbucket/core/dashboard/repos.scala.html new file mode 100644 index 0000000..c5aa4c6 --- /dev/null +++ b/src/main/twirl/gitbucket/core/dashboard/repos.scala.html @@ -0,0 +1,37 @@ +@(groups: List[String], + recentRepositories: List[gitbucket.core.service.RepositoryService.RepositoryInfo], + userRepositories: List[gitbucket.core.service.RepositoryService.RepositoryInfo])(implicit context: gitbucket.core.controller.Context) +@import gitbucket.core.view.helpers +@gitbucket.core.html.main("Repositories"){ + @gitbucket.core.dashboard.html.sidebar(recentRepositories, userRepositories){ + @gitbucket.core.dashboard.html.tab("repos") +
+ @if(userRepositories.isEmpty){ + No repositories + } else { + @userRepositories.map { repository => +
+
+ @gitbucket.core.helper.html.repositoryicon(repository, true) +
+
+
+ @repository.owner/@repository.name + @if(repository.repository.isPrivate){ + + } +
+ @if(repository.repository.originUserName.isDefined){ + + } + @if(repository.repository.description.isDefined){ +
@repository.repository.description
+ } +
Updated @gitbucket.core.helper.html.datetimeago(repository.repository.lastActivityDate)
+
+
+ } + } +
+ } +} diff --git a/src/main/twirl/gitbucket/core/dashboard/tab.scala.html b/src/main/twirl/gitbucket/core/dashboard/tab.scala.html index 597509f..ee2c17d 100644 --- a/src/main/twirl/gitbucket/core/dashboard/tab.scala.html +++ b/src/main/twirl/gitbucket/core/dashboard/tab.scala.html @@ -2,6 +2,7 @@