|
1 |
| -{{$paginationLink := .Page.GetParams}} |
| 1 | +{{$paginationParams := .Page.GetParams}} |
| 2 | +{{$paginationLink := $.Link}} |
| 3 | +{{if eq $paginationLink AppSubUrl}}{{$paginationLink = print $paginationLink "/"}}{{end}} |
2 | 4 | {{with .Page.Paginater}}
|
3 | 5 | {{if gt .TotalPages 1}}
|
4 | 6 | <div class="center page buttons">
|
5 | 7 | <div class="ui borderless pagination menu">
|
6 |
| - <a class="{{if .IsFirst}}disabled{{end}} item navigation" {{if not .IsFirst}}href="{{$.Link}}{{if $paginationLink}}?{{$paginationLink}}{{end}}"{{end}}> |
| 8 | + <a class="{{if .IsFirst}}disabled{{end}} item navigation" {{if not .IsFirst}}href="{{$paginationLink}}{{if $paginationParams}}?{{$paginationParams}}{{end}}"{{end}}> |
7 | 9 | {{svg "gitea-double-chevron-left" 16 "gt-mr-2"}}
|
8 | 10 | <span class="navigation_label">{{ctx.Locale.Tr "admin.first_page"}}</span>
|
9 | 11 | </a>
|
10 |
| - <a class="{{if not .HasPrevious}}disabled{{end}} item navigation" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}{{if $paginationLink}}&{{$paginationLink}}{{end}}"{{end}}> |
| 12 | + <a class="{{if not .HasPrevious}}disabled{{end}} item navigation" {{if .HasPrevious}}href="{{$paginationLink}}?page={{.Previous}}{{if $paginationParams}}&{{$paginationParams}}{{end}}"{{end}}> |
11 | 13 | {{svg "octicon-chevron-left" 16 "gt-mr-2"}}
|
12 | 14 | <span class="navigation_label">{{ctx.Locale.Tr "repo.issues.previous"}}</span>
|
13 | 15 | </a>
|
14 | 16 | {{range .Pages}}
|
15 | 17 | {{if eq .Num -1}}
|
16 | 18 | <a class="disabled item">...</a>
|
17 | 19 | {{else}}
|
18 |
| - <a class="{{if .IsCurrent}}active {{end}}item gt-content-center" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}{{if $paginationLink}}&{{$paginationLink}}{{end}}"{{end}}>{{.Num}}</a> |
| 20 | + <a class="{{if .IsCurrent}}active {{end}}item gt-content-center" {{if not .IsCurrent}}href="{{$paginationLink}}?page={{.Num}}{{if $paginationParams}}&{{$paginationParams}}{{end}}"{{end}}>{{.Num}}</a> |
19 | 21 | {{end}}
|
20 | 22 | {{end}}
|
21 |
| - <a class="{{if not .HasNext}}disabled{{end}} item navigation" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}{{if $paginationLink}}&{{$paginationLink}}{{end}}"{{end}}> |
| 23 | + <a class="{{if not .HasNext}}disabled{{end}} item navigation" {{if .HasNext}}href="{{$paginationLink}}?page={{.Next}}{{if $paginationParams}}&{{$paginationParams}}{{end}}"{{end}}> |
22 | 24 | <span class="navigation_label">{{ctx.Locale.Tr "repo.issues.next"}}</span>
|
23 | 25 | {{svg "octicon-chevron-right" 16 "gt-ml-2"}}
|
24 | 26 | </a>
|
25 |
| - <a class="{{if .IsLast}}disabled{{end}} item navigation" {{if not .IsLast}}href="{{$.Link}}?page={{.TotalPages}}{{if $paginationLink}}&{{$paginationLink}}{{end}}"{{end}}> |
| 27 | + <a class="{{if .IsLast}}disabled{{end}} item navigation" {{if not .IsLast}}href="{{$paginationLink}}?page={{.TotalPages}}{{if $paginationParams}}&{{$paginationParams}}{{end}}"{{end}}> |
26 | 28 | <span class="navigation_label">{{ctx.Locale.Tr "admin.last_page"}}</span>
|
27 | 29 | {{svg "gitea-double-chevron-right" 16 "gt-ml-2"}}
|
28 | 30 | </a>
|
|
0 commit comments