diff options
author | Bo-Yi Wu <appleboy.tw@gmail.com> | 2017-02-07 19:54:16 +0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-02-07 19:54:16 +0800 |
commit | b13232f52454b72c414e8bf686daccee712346e1 (patch) | |
tree | d83cba64b231aa17853cf9c135760847cb5b072f /templates | |
parent | ceae143e78dabe9c5ef6bafff739aa487f79ca70 (diff) | |
download | gitea-b13232f52454b72c414e8bf686daccee712346e1.tar.gz gitea-b13232f52454b72c414e8bf686daccee712346e1.zip |
feat: support paginater on star tab of user profile. (#845)
Diffstat (limited to 'templates')
-rw-r--r-- | templates/base/paginate.tmpl | 8 | ||||
-rw-r--r-- | templates/user/profile.tmpl | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/templates/base/paginate.tmpl b/templates/base/paginate.tmpl index afe34c632f..427a4b0953 100644 --- a/templates/base/paginate.tmpl +++ b/templates/base/paginate.tmpl @@ -3,20 +3,20 @@ <div class="center page buttons"> <div class="ui borderless pagination menu"> <a class="{{if .IsFirst}}disabled{{end}} item" href="{{$.Link}}?q={{$.Keyword}}"><i class="angle double left icon"></i> {{$.i18n.Tr "admin.first_page"}}</a> - <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}&q={{$.Keyword}}"{{end}}> + <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}&q={{$.Keyword}}&tab={{$.Tabs}}"{{end}}> <i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}} </a> {{range .Pages}} {{if eq .Num -1}} <a class="disabled item">...</a> {{else}} - <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}&q={{$.Keyword}}"{{end}}>{{.Num}}</a> + <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}&q={{$.Keyword}}&tab={{$.Tabs}}"{{end}}>{{.Num}}</a> {{end}} {{end}} - <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}&q={{$.Keyword}}"{{end}}> + <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}&q={{$.Keyword}}&tab={{$.Tabs}}"{{end}}> {{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i> </a> - <a class="{{if .IsLast}}disabled{{end}} item" href="{{$.Link}}?page={{.TotalPages}}&q={{$.Keyword}}">{{$.i18n.Tr "admin.last_page"}} <i class="angle double right icon"></i></a> + <a class="{{if .IsLast}}disabled{{end}} item" href="{{$.Link}}?page={{.TotalPages}}&q={{$.Keyword}}&tab={{$.Tabs}}">{{$.i18n.Tr "admin.last_page"}} <i class="angle double right icon"></i></a> </div> </div> {{end}} diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl index d93ceb8274..e1a8ca1ea7 100644 --- a/templates/user/profile.tmpl +++ b/templates/user/profile.tmpl @@ -93,6 +93,7 @@ {{else if eq .TabName "stars"}} <div class="stars"> {{template "explore/repo_list" .}} + {{template "base/paginate" .}} </div> {{else}} {{template "explore/search" .}} |