diff --git a/src/main/scala/gitbucket/core/controller/DashboardController.scala b/src/main/scala/gitbucket/core/controller/DashboardController.scala index 1516c0f..f2a0f11 100644 --- a/src/main/scala/gitbucket/core/controller/DashboardController.scala +++ b/src/main/scala/gitbucket/core/controller/DashboardController.scala @@ -108,7 +108,9 @@ case _ => condition.copy(author = Some(userName)) }, filter, - getGroupNames(userName)) + getGroupNames(userName), + getVisibleRepositories(context.loginAccount, withoutPhysicalInfo = true), + getUserRepositories(userName, withoutPhysicalInfo = true)) } private def searchPullRequests(filter: String) = { @@ -131,7 +133,9 @@ case _ => condition.copy(author = Some(userName)) }, filter, - getGroupNames(userName)) + getGroupNames(userName), + getVisibleRepositories(context.loginAccount, withoutPhysicalInfo = true), + getUserRepositories(userName, withoutPhysicalInfo = true)) } diff --git a/src/main/twirl/gitbucket/core/dashboard/issues.scala.html b/src/main/twirl/gitbucket/core/dashboard/issues.scala.html index 1249950..ca35f25 100644 --- a/src/main/twirl/gitbucket/core/dashboard/issues.scala.html +++ b/src/main/twirl/gitbucket/core/dashboard/issues.scala.html @@ -4,15 +4,19 @@ closedCount: Int, condition: gitbucket.core.service.IssuesService.IssueSearchCondition, filter: String, - groups: List[String])(implicit context: gitbucket.core.controller.Context) + groups: List[String], + recentRepositories: List[gitbucket.core.service.RepositoryService.RepositoryInfo], + userRepositories: List[gitbucket.core.service.RepositoryService.RepositoryInfo])(implicit context: gitbucket.core.controller.Context) @import context._ @import gitbucket.core.view.helpers._ @html.main("Issues"){ -
- @dashboard.html.tab("issues") -
- @issuesnavi(filter, openCount, closedCount, condition) - @issueslist(issues, page, openCount, closedCount, condition, filter, groups) + @sidebar(recentRepositories, userRepositories){ +
+ @dashboard.html.tab("issues") +
+ @issuesnavi(filter, openCount, closedCount, condition) + @issueslist(issues, page, openCount, closedCount, condition, filter, groups) +
-
+ } } diff --git a/src/main/twirl/gitbucket/core/dashboard/issuesnavi.scala.html b/src/main/twirl/gitbucket/core/dashboard/issuesnavi.scala.html index bfefa3a..fd066f7 100644 --- a/src/main/twirl/gitbucket/core/dashboard/issuesnavi.scala.html +++ b/src/main/twirl/gitbucket/core/dashboard/issuesnavi.scala.html @@ -8,7 +8,7 @@
  • Open @openCount
  • -
  • +
  • Closed @closedCount
  • @* diff --git a/src/main/twirl/gitbucket/core/dashboard/pulls.scala.html b/src/main/twirl/gitbucket/core/dashboard/pulls.scala.html index c20d57a..e4fff23 100644 --- a/src/main/twirl/gitbucket/core/dashboard/pulls.scala.html +++ b/src/main/twirl/gitbucket/core/dashboard/pulls.scala.html @@ -4,15 +4,19 @@ closedCount: Int, condition: gitbucket.core.service.IssuesService.IssueSearchCondition, filter: String, - groups: List[String])(implicit context: gitbucket.core.controller.Context) + groups: List[String], + recentRepositories: List[gitbucket.core.service.RepositoryService.RepositoryInfo], + userRepositories: List[gitbucket.core.service.RepositoryService.RepositoryInfo])(implicit context: gitbucket.core.controller.Context) @import context._ @import gitbucket.core.view.helpers._ @html.main("Pull Requests"){ -
    - @dashboard.html.tab("pulls") -
    - @issuesnavi(filter, openCount, closedCount, condition) - @issueslist(issues, page, openCount, closedCount, condition, filter, groups) + @sidebar(recentRepositories, userRepositories){ +
    + @dashboard.html.tab("pulls") +
    + @issuesnavi(filter, openCount, closedCount, condition) + @issueslist(issues, page, openCount, closedCount, condition, filter, groups) +
    -
    + } } diff --git a/src/main/twirl/gitbucket/core/dashboard/sidebar.scala.html b/src/main/twirl/gitbucket/core/dashboard/sidebar.scala.html new file mode 100644 index 0000000..19a0ffe --- /dev/null +++ b/src/main/twirl/gitbucket/core/dashboard/sidebar.scala.html @@ -0,0 +1,65 @@ +@(recentRepositories: List[gitbucket.core.service.RepositoryService.RepositoryInfo], + userRepositories: List[gitbucket.core.service.RepositoryService.RepositoryInfo])(body: Html)(implicit context: gitbucket.core.controller.Context) +@import context._ +@import gitbucket.core.view.helpers._ +
    +
    + @if(loginAccount.isEmpty){ +
    @html.signinform(settings)
    + } else { +
    +
    + Your repositories @userRepositories.size +
    + +
    + } +
    +
    Recent updated repositories
    + +
    +
    +
    + @body +
    +
    \ No newline at end of file diff --git a/src/main/twirl/gitbucket/core/dashboard/tab.scala.html b/src/main/twirl/gitbucket/core/dashboard/tab.scala.html index 0137466..1094044 100644 --- a/src/main/twirl/gitbucket/core/dashboard/tab.scala.html +++ b/src/main/twirl/gitbucket/core/dashboard/tab.scala.html @@ -1,12 +1,10 @@ @(active: String = "")(implicit context: gitbucket.core.controller.Context) @import context._ @import gitbucket.core.view.helpers._ -
    - -
    + diff --git a/src/main/twirl/gitbucket/core/index.scala.html b/src/main/twirl/gitbucket/core/index.scala.html index 160f2a0..5e55a4b 100644 --- a/src/main/twirl/gitbucket/core/index.scala.html +++ b/src/main/twirl/gitbucket/core/index.scala.html @@ -4,82 +4,23 @@ @import context._ @import gitbucket.core.view.helpers._ @main("GitBucket"){ -
    - @dashboard.html.tab() -
    -
    -
    -
    - activities -
    - @helper.html.activities(activities) + @dashboard.html.sidebar(recentRepositories, userRepositories){ + @settings.information.map { information => +
    + + @Html(information) +
    + } +
    + @dashboard.html.tab() +
    +
    + activities
    - -
    - @settings.information.map { information => -
    - - @Html(information) -
    - } - @if(loginAccount.isEmpty){ -
    @signinform(settings)
    - } else { -
    -
    - Your repositories @userRepositories.size -
    - -
    - } -
    -
    Recent updated repositories
    - -
    -
    + @helper.html.activities(activities)
    -
    + } }