You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
1.6 KiB

  1. {{$paginationLink := .Page.GetParams}}
  2. {{with .Page.Paginater}}
  3. {{if gt .TotalPages 1}}
  4. <div class="center page buttons">
  5. <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}}><i class="angle double left icon"></i><span class="navigation_label">&nbsp;{{$.i18n.Tr "admin.first_page"}}</span></a>
  7. <a class="{{if not .HasPrevious}}disabled{{end}} item navigation" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}{{if $paginationLink}}&{{$paginationLink}}{{end}}"{{end}}>
  8. <i class="left arrow icon"></i><span class="navigation_label">&nbsp;{{$.i18n.Tr "repo.issues.previous"}}</span>
  9. </a>
  10. {{range .Pages}}
  11. {{if eq .Num -1}}
  12. <a class="disabled item">...</a>
  13. {{else}}
  14. <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}{{if $paginationLink}}&{{$paginationLink}}{{end}}"{{end}}>{{.Num}}</a>
  15. {{end}}
  16. {{end}}
  17. <a class="{{if not .HasNext}}disabled{{end}} item navigation" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}{{if $paginationLink}}&{{$paginationLink}}{{end}}"{{end}}>
  18. <span class="navigation_label">{{$.i18n.Tr "repo.issues.next"}}&nbsp;</span><i class="icon right arrow"></i>
  19. </a>
  20. <a class="{{if .IsLast}}disabled{{end}} item navigation" {{if not .IsLast}}href="{{$.Link}}?page={{.TotalPages}}{{if $paginationLink}}&{{$paginationLink}}{{end}}"{{end}}><span class="navigation_label">{{$.i18n.Tr "admin.last_page"}}&nbsp;</span><i class="angle double right icon"></i></a>
  21. </div>
  22. </div>
  23. {{end}}
  24. {{end}}