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.

paginate.tmpl 1.7KB

1234567891011121314151617181920212223242526272829303132
  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}}>
  7. {{svg "gitea-double-chevron-left" 16 "mr-2"}}
  8. <span class="navigation_label">{{$.locale.Tr "admin.first_page"}}</span>
  9. </a>
  10. <a class="{{if not .HasPrevious}}disabled{{end}} item navigation" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}{{if $paginationLink}}&{{$paginationLink}}{{end}}"{{end}}>
  11. {{svg "octicon-chevron-left" 16 "mr-2"}}
  12. <span class="navigation_label">{{$.locale.Tr "repo.issues.previous"}}</span>
  13. </a>
  14. {{range .Pages}}
  15. {{if eq .Num -1}}
  16. <a class="disabled item">...</a>
  17. {{else}}
  18. <a class="{{if .IsCurrent}}active {{end}}item content-center" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}{{if $paginationLink}}&{{$paginationLink}}{{end}}"{{end}}>{{.Num}}</a>
  19. {{end}}
  20. {{end}}
  21. <a class="{{if not .HasNext}}disabled{{end}} item navigation" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}{{if $paginationLink}}&{{$paginationLink}}{{end}}"{{end}}>
  22. <span class="navigation_label">{{$.locale.Tr "repo.issues.next"}}</span>
  23. {{svg "octicon-chevron-right" 16 "ml-2"}}
  24. </a>
  25. <a class="{{if .IsLast}}disabled{{end}} item navigation" {{if not .IsLast}}href="{{$.Link}}?page={{.TotalPages}}{{if $paginationLink}}&{{$paginationLink}}{{end}}"{{end}}>
  26. <span class="navigation_label">{{$.locale.Tr "admin.last_page"}}</span>
  27. {{svg "gitea-double-chevron-right" 16 "ml-2"}}
  28. </a>
  29. </div>
  30. </div>
  31. {{end}}
  32. {{end}}