Skip to content

Commit

Permalink
Revert "Fix ellipsis display logic in pagination template"
Browse files Browse the repository at this point in the history
This reverts commit 2fa851e.
  • Loading branch information
jmooring authored and bep committed Aug 6, 2020
1 parent 12f6a1c commit bffc4e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tpl/tplimpl/embedded/templates.autogen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion tpl/tplimpl/embedded/templates/pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
{{- $shouldEllipse := false -}}
{{- range $pag.Pagers -}}
{{- $right := sub .TotalPages .PageNumber -}}
{{- $showNumber := or (eq .TotalPages 5) (le .PageNumber 3) (eq $right 0) -}}
{{- $showNumber := or (le .PageNumber 3) (eq $right 0) -}}
{{- $showNumber := or $showNumber (and (gt .PageNumber (sub $pag.PageNumber 2)) (lt .PageNumber (add $pag.PageNumber 2))) -}}
{{- if $showNumber -}}
{{- $ellipsed = false -}}
{{- $shouldEllipse = false -}}
Expand Down

0 comments on commit bffc4e1

Please sign in to comment.