Skip to content

Commit ddd1e6c

Browse files
authored
1 parent 0548c10 commit ddd1e6c

File tree

12 files changed

+26
-27
lines changed

12 files changed

+26
-27
lines changed

routers/web/explore/repo.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ func Repos(ctx *context.Context) {
151151
ctx.Data["CodePageIsDisabled"] = setting.Service.Explore.DisableCodePage
152152
ctx.Data["Title"] = ctx.Tr("explore")
153153
ctx.Data["PageIsExplore"] = true
154+
ctx.Data["ShowRepoOwnerOnList"] = true
154155
ctx.Data["PageIsExploreRepositories"] = true
155156
ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled
156157

routers/web/repo/view.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,10 @@ func Forks(ctx *context.Context) {
394394
}
395395

396396
pager := context.NewPagination(int(total), pageSize, page, 5)
397+
ctx.Data["ShowRepoOwnerAvatar"] = true
398+
ctx.Data["ShowRepoOwnerOnList"] = true
397399
ctx.Data["Page"] = pager
398-
399-
ctx.Data["Forks"] = forks
400+
ctx.Data["Repos"] = forks
400401

401402
ctx.HTML(http.StatusOK, tplForks)
402403
}

routers/web/user/profile.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ func prepareUserProfileTabData(ctx *context.Context, profileDbRepo *repo_model.R
197197
total = int(count)
198198
case "stars":
199199
ctx.Data["PageIsProfileStarList"] = true
200+
ctx.Data["ShowRepoOwnerOnList"] = true
200201
repos, count, err = repo_model.SearchRepository(ctx, repo_model.SearchRepoOptions{
201202
ListOptions: db.ListOptions{
202203
PageSize: pagingNum,

templates/admin/user/view.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
{{ctx.Locale.Tr "admin.repositories"}} ({{ctx.Locale.Tr "admin.total" .ReposTotal}})
2727
</h4>
2828
<div class="ui attached segment">
29-
{{template "explore/repo_list" .}}
29+
{{template "shared/repo/list" .}}
3030
</div>
3131
<h4 class="ui top attached header">
3232
{{ctx.Locale.Tr "settings.organization"}} ({{ctx.Locale.Tr "admin.total" .OrgsTotal}})

templates/explore/repos.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<div role="main" aria-label="{{.Title}}" class="page-content explore repositories">
33
{{template "explore/navbar" .}}
44
<div class="ui container">
5-
{{template "shared/repo_search" .}}
6-
{{template "explore/repo_list" .}}
5+
{{template "shared/repo/search" .}}
6+
{{template "shared/repo/list" .}}
77
{{template "base/paginate" .}}
88
</div>
99
</div>

templates/org/home.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
{{if .ProfileReadmeContent}}
99
<div id="readme_profile" class="render-content markup" data-profile-view-as-member="{{.IsViewingOrgAsMember}}">{{.ProfileReadmeContent}}</div>
1010
{{end}}
11-
{{template "shared/repo_search" .}}
12-
{{template "explore/repo_list" .}}
11+
{{template "shared/repo/search" .}}
12+
{{template "shared/repo/list" .}}
1313
{{template "base/paginate" .}}
1414
</div>
1515

templates/repo/forks.tmpl

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,12 @@
11
{{template "base/head" .}}
22
<div role="main" aria-label="{{.Title}}" class="page-content repository forks">
33
{{template "repo/header" .}}
4-
<div class="ui container">
4+
<div class="ui container fork-list">
55
<h2 class="ui dividing header">
66
{{ctx.Locale.Tr "repo.forks"}}
77
</h2>
8-
<div class="flex-list">
9-
{{range .Forks}}
10-
<div class="flex-item tw-border-0 repo-fork-item">
11-
<span>{{ctx.AvatarUtils.Avatar .Owner}}</span>
12-
<span><a href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a> / <a href="{{.Link}}">{{.Name}}</a></span>
13-
</div>
14-
{{end}}
15-
</div>
8+
{{template "shared/repo/list" .}}
9+
{{template "base/paginate" .}}
1610
</div>
17-
18-
{{template "base/paginate" .}}
1911
</div>
2012
{{template "base/footer" .}}

templates/explore/repo_list.tmpl renamed to templates/shared/repo/list.tmpl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22
{{range .Repos}}
33
<div class="flex-item">
44
<div class="flex-item-leading">
5-
{{template "repo/icon" .}}
5+
{{if $.ShowRepoOwnerAvatar}}
6+
{{ctx.AvatarUtils.Avatar .Owner 24}}
7+
{{else}}
8+
{{template "repo/icon" .}}
9+
{{end}}
610
</div>
711
<div class="flex-item-main">
812
<div class="flex-item-header">
913
<div class="flex-item-title">
10-
{{if and (or $.PageIsExplore $.PageIsProfileStarList) .Owner}}
14+
{{if and $.ShowRepoOwnerOnList .Owner}}
1115
<a class="text primary name" href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a>/
1216
{{end}}
1317
<a class="text primary name" href="{{.Link}}">{{.Name}}</a>
File renamed without changes.

templates/user/notification/notification_subscriptions.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@
6969
{{template "shared/issuelist" dict "." . "listType" "dashboard"}}
7070
{{end}}
7171
{{else}}
72-
{{template "shared/repo_search" .}}
73-
{{template "explore/repo_list" .}}
72+
{{template "shared/repo/search" .}}
73+
{{template "shared/repo/list" .}}
7474
{{template "base/paginate" .}}
7575
{{end}}
7676
</div>

templates/user/profile.tmpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
{{template "user/dashboard/feeds" .}}
1818
{{else if eq .TabName "stars"}}
1919
<div class="stars">
20-
{{template "shared/repo_search" .}}
21-
{{template "explore/repo_list" .}}
20+
{{template "shared/repo/search" .}}
21+
{{template "shared/repo/list" .}}
2222
{{template "base/paginate" .}}
2323
</div>
2424
{{else if eq .TabName "following"}}
@@ -30,8 +30,8 @@
3030
{{else if eq .TabName "organizations"}}
3131
{{template "repo/user_cards" .}}
3232
{{else}}
33-
{{template "shared/repo_search" .}}
34-
{{template "explore/repo_list" .}}
33+
{{template "shared/repo/search" .}}
34+
{{template "shared/repo/list" .}}
3535
{{template "base/paginate" .}}
3636
{{end}}
3737
</div>

tests/integration/repo_fork_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func TestRepoForkToOrg(t *testing.T) {
8484

8585
func TestForkListLimitedAndPrivateRepos(t *testing.T) {
8686
defer tests.PrepareTestEnv(t)()
87-
forkItemSelector := ".repo-fork-item"
87+
forkItemSelector := ".fork-list .flex-item"
8888

8989
user1Sess := loginUser(t, "user1")
9090
user1 := unittest.AssertExistsAndLoadBean(t, &user_model.User{Name: "user1"})

0 commit comments

Comments
 (0)