File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 22{{$paginationLink := $.Link}}
33{{if eq $paginationLink AppSubUrl}}{{$paginationLink = print $paginationLink "/"}}{{end}}
44{{with .Page.Paginater}}
5- {{if .TotalPages}}
6- {{$showFirstLast := gt .TotalPages 0 }}
5+ {{if or (eq .TotalPages -1) (gt .TotalPages 1) }}
6+ {{$showFirstLast := gt .TotalPages 1 }}
77 <div class="center page buttons">
88 <div class="ui borderless pagination menu">
99 {{if $showFirstLast}}
1717 {{svg "octicon-chevron-left" 16 "tw-mr-1"}}
1818 <span class="navigation_label">{{ctx.Locale.Tr "repo.issues.previous"}}</span>
1919 </a>
20- {{range .Pages}}
20+ {{$pages := .Pages}}
21+ {{$pagesLen := len $pages}}
22+ {{range $pages}}
2123 {{if eq .Num -1}}
2224 <a class="disabled item">...</a>
2325 {{else}}
24- <a class="{{if .IsCurrent}}active {{end}}item" {{if not .IsCurrent}}href="{{$paginationLink}}?page={{.Num}}{{if $paginationParams}}&{{$paginationParams}}{{end}}"{{end}}>{{.Num}}</a>
26+ {{/* do not highlight the current page if there is only one page */}}
27+ <a class="{{if and .IsCurrent (gt $pagesLen 1)}}active {{end}}item" {{if not .IsCurrent}}href="{{$paginationLink}}?page={{.Num}}{{if $paginationParams}}&{{$paginationParams}}{{end}}"{{end}}>{{.Num}}</a>
2528 {{end}}
2629 {{end}}
2730 <a class="{{if not .HasNext}}disabled{{end}} item navigation" {{if .HasNext}}href="{{$paginationLink}}?page={{.Next}}{{if $paginationParams}}&{{$paginationParams}}{{end}}"{{end}}>
You can’t perform that action at this time.
0 commit comments