mirror of
https://github.com/gitbucket/gitbucket.git
synced 2026-05-06 17:06:28 +02:00
Fix sidebar to recent repositories
This commit is contained in:
@@ -26,7 +26,7 @@ trait DashboardControllerBase extends ControllerBase {
|
||||
|
||||
html.repos(
|
||||
getGroupNames(userName),
|
||||
Nil,
|
||||
getVisibleRepositories(None, withoutPhysicalInfo = true),
|
||||
getUserRepositories(userName, withoutPhysicalInfo = true)
|
||||
)
|
||||
})
|
||||
@@ -93,8 +93,7 @@ trait DashboardControllerBase extends ControllerBase {
|
||||
},
|
||||
filter,
|
||||
getGroupNames(userName),
|
||||
Nil,
|
||||
getUserRepositories(userName, withoutPhysicalInfo = true)
|
||||
getVisibleRepositories(None, withoutPhysicalInfo = true)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -119,8 +118,7 @@ trait DashboardControllerBase extends ControllerBase {
|
||||
},
|
||||
filter,
|
||||
getGroupNames(userName),
|
||||
Nil,
|
||||
getUserRepositories(userName, withoutPhysicalInfo = true)
|
||||
getVisibleRepositories(None, withoutPhysicalInfo = true)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -64,8 +64,7 @@ trait IndexControllerBase extends ControllerBase {
|
||||
val visibleOwnerSet: Set[String] = Set(account.userName) ++ getGroupsByUserName(account.userName)
|
||||
gitbucket.core.html.index(
|
||||
getRecentActivitiesByOwners(visibleOwnerSet),
|
||||
Nil,
|
||||
getUserRepositories(account.userName, withoutPhysicalInfo = true),
|
||||
getVisibleRepositories(None, withoutPhysicalInfo = true),
|
||||
showBannerToCreatePersonalAccessToken = hasAccountFederation(account.userName) && !hasAccessToken(
|
||||
account.userName
|
||||
)
|
||||
@@ -75,7 +74,6 @@ trait IndexControllerBase extends ControllerBase {
|
||||
gitbucket.core.html.index(
|
||||
getRecentActivities(),
|
||||
getVisibleRepositories(None, withoutPhysicalInfo = true),
|
||||
Nil,
|
||||
showBannerToCreatePersonalAccessToken = false
|
||||
)
|
||||
}
|
||||
@@ -273,18 +271,7 @@ trait IndexControllerBase extends ControllerBase {
|
||||
val repositories = visibleRepositories.filter { repository =>
|
||||
repository.name.toLowerCase.indexOf(query) >= 0 || repository.owner.toLowerCase.indexOf(query) >= 0
|
||||
}
|
||||
context.loginAccount
|
||||
.map { account =>
|
||||
gitbucket.core.search.html.repositories(
|
||||
query,
|
||||
repositories,
|
||||
Nil,
|
||||
getUserRepositories(account.userName, withoutPhysicalInfo = true)
|
||||
)
|
||||
}
|
||||
.getOrElse {
|
||||
gitbucket.core.search.html.repositories(query, repositories, visibleRepositories, Nil)
|
||||
}
|
||||
gitbucket.core.search.html.repositories(query, repositories, visibleRepositories)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,10 +5,9 @@
|
||||
condition: gitbucket.core.service.IssuesService.IssueSearchCondition,
|
||||
filter: String,
|
||||
groups: List[String],
|
||||
recentRepositories: List[gitbucket.core.service.RepositoryService.RepositoryInfo],
|
||||
userRepositories: List[gitbucket.core.service.RepositoryService.RepositoryInfo])(implicit context: gitbucket.core.controller.Context)
|
||||
recentRepositories: List[gitbucket.core.service.RepositoryService.RepositoryInfo])(implicit context: gitbucket.core.controller.Context)
|
||||
@gitbucket.core.html.main("Issues"){
|
||||
@gitbucket.core.dashboard.html.sidebar(recentRepositories, userRepositories){
|
||||
@gitbucket.core.dashboard.html.sidebar(recentRepositories){
|
||||
@gitbucket.core.dashboard.html.tab("issues")
|
||||
<div class="container">
|
||||
@gitbucket.core.dashboard.html.issuesnavi("issues", filter, openCount, closedCount, condition)
|
||||
|
||||
@@ -5,10 +5,9 @@
|
||||
condition: gitbucket.core.service.IssuesService.IssueSearchCondition,
|
||||
filter: String,
|
||||
groups: List[String],
|
||||
recentRepositories: List[gitbucket.core.service.RepositoryService.RepositoryInfo],
|
||||
userRepositories: List[gitbucket.core.service.RepositoryService.RepositoryInfo])(implicit context: gitbucket.core.controller.Context)
|
||||
recentRepositories: List[gitbucket.core.service.RepositoryService.RepositoryInfo])(implicit context: gitbucket.core.controller.Context)
|
||||
@gitbucket.core.html.main("Pull requests"){
|
||||
@gitbucket.core.dashboard.html.sidebar(recentRepositories, userRepositories){
|
||||
@gitbucket.core.dashboard.html.sidebar(recentRepositories){
|
||||
@gitbucket.core.dashboard.html.tab("pulls")
|
||||
<div class="container">
|
||||
@gitbucket.core.dashboard.html.issuesnavi("pulls", filter, openCount, closedCount, condition)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
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.sidebar(recentRepositories){
|
||||
@gitbucket.core.dashboard.html.tab("repos")
|
||||
<div class="container">
|
||||
@if(userRepositories.isEmpty){
|
||||
|
||||
@@ -1,29 +1,8 @@
|
||||
@(recentRepositories: List[gitbucket.core.service.RepositoryService.RepositoryInfo],
|
||||
userRepositories: List[gitbucket.core.service.RepositoryService.RepositoryInfo])(body: Html)(implicit context: gitbucket.core.controller.Context)
|
||||
@(recentRepositories: List[gitbucket.core.service.RepositoryService.RepositoryInfo])(body: Html)(implicit context: gitbucket.core.controller.Context)
|
||||
@import gitbucket.core.view.helpers
|
||||
<div class="main-sidebar">
|
||||
<div class="sidebar">
|
||||
<ul class="nav sidebar-menu">
|
||||
@if(context.loginAccount.isDefined){
|
||||
<li class="header">
|
||||
<span class="label label-primary pull-right">@userRepositories.size</span>
|
||||
Your repositories
|
||||
</li>
|
||||
@if(userRepositories.isEmpty){
|
||||
<li>No repositories</li>
|
||||
} else {
|
||||
<li><form class="sidebar-form"><input type="text" id="filter-box" class="form-control input-sm" placeholder="Find repository"/></form></li>
|
||||
@userRepositories.zipWithIndex.map { case (repository, i) =>
|
||||
<li class="repo-link menu-item-hover">
|
||||
@if(repository.owner == context.loginAccount.get.userName){
|
||||
<a href="@helpers.url(repository)">@gitbucket.core.helper.html.repositoryicon(repository, false) <span class="strong">@repository.name</span></a>
|
||||
} else {
|
||||
<a href="@helpers.url(repository)">@gitbucket.core.helper.html.repositoryicon(repository, false) <span>@repository.owner/<span class="strong">@repository.name</span></span></a>
|
||||
}
|
||||
</li>
|
||||
}
|
||||
}
|
||||
} else {
|
||||
<li class="header">Recent updated repositories</li>
|
||||
@if(recentRepositories.isEmpty){
|
||||
<li>No repositories</li>
|
||||
@@ -35,7 +14,6 @@
|
||||
</li>
|
||||
}
|
||||
}
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
@(activities: List[gitbucket.core.model.Activity],
|
||||
recentRepositories: List[gitbucket.core.service.RepositoryService.RepositoryInfo],
|
||||
userRepositories: List[gitbucket.core.service.RepositoryService.RepositoryInfo],
|
||||
showBannerToCreatePersonalAccessToken: Boolean)(implicit context: gitbucket.core.controller.Context)
|
||||
@import gitbucket.core.view.helpers
|
||||
@gitbucket.core.html.main("GitBucket"){
|
||||
@gitbucket.core.dashboard.html.sidebar(recentRepositories, userRepositories){
|
||||
@gitbucket.core.dashboard.html.sidebar(recentRepositories){
|
||||
@context.settings.information.map { information =>
|
||||
<div class="alert alert-info" style="background-color: white; color: #555; border-color: #4183c4; font-size: small; line-height: 120%;">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
@(query: String,
|
||||
repositories: List[gitbucket.core.service.RepositoryService.RepositoryInfo],
|
||||
recentRepositories: List[gitbucket.core.service.RepositoryService.RepositoryInfo],
|
||||
userRepositories: List[gitbucket.core.service.RepositoryService.RepositoryInfo])(implicit context: gitbucket.core.controller.Context)
|
||||
recentRepositories: List[gitbucket.core.service.RepositoryService.RepositoryInfo])(implicit context: gitbucket.core.controller.Context)
|
||||
@import gitbucket.core.view.helpers
|
||||
@gitbucket.core.html.main("GitBucket"){
|
||||
@gitbucket.core.dashboard.html.sidebar(recentRepositories, userRepositories){
|
||||
@gitbucket.core.dashboard.html.sidebar(recentRepositories){
|
||||
<form action="@context.path/search" method="GET" class="form-inline">
|
||||
<input type="text" name="query" value="@query" class="form-control" style="width: 250px; margin-bottom: 0px;"/>
|
||||
<input type="submit" value="Search" class="btn btn-default"/>
|
||||
|
||||
Reference in New Issue
Block a user