Skip to content

Commit f5c2d31

Browse files
committed
Forks repository list page follow other repositories page
1 parent b8c9a0c commit f5c2d31

File tree

9 files changed

+16
-24
lines changed

9 files changed

+16
-24
lines changed

routers/web/repo/view.go

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

396396
pager := context.NewPagination(int(total), pageSize, page, 5)
397+
ctx.Data["IsForksPage"] = true
397398
ctx.Data["Page"] = pager
398-
399-
ctx.Data["Forks"] = forks
399+
ctx.Data["Repos"] = forks
400400

401401
ctx.HTML(http.StatusOK, tplForks)
402402
}

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: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,8 @@
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<div class="flex-item-main">
88
<div class="flex-item-header">
99
<div class="flex-item-title">
10-
{{if and (or $.PageIsExplore $.PageIsProfileStarList) .Owner}}
10+
{{if and (or $.IsForksPage $.PageIsExplore $.PageIsProfileStarList) .Owner}}
1111
<a class="text primary name" href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a>/
1212
{{end}}
1313
<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>

0 commit comments

Comments
 (0)