Revert "Fix ellipsis display logic in pagination template"

This reverts commit 2fa851e650.
This commit is contained in:
Joe Mooring 2020-08-05 12:36:48 -04:00 committed by Bjørn Erik Pedersen
parent 12f6a1cdc0
commit bffc4e12fe
2 changed files with 4 additions and 2 deletions

View file

@ -260,7 +260,8 @@ if (!doNotTrack) {
{{- $shouldEllipse := false -}} {{- $shouldEllipse := false -}}
{{- range $pag.Pagers -}} {{- range $pag.Pagers -}}
{{- $right := sub .TotalPages .PageNumber -}} {{- $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 -}} {{- if $showNumber -}}
{{- $ellipsed = false -}} {{- $ellipsed = false -}}
{{- $shouldEllipse = false -}} {{- $shouldEllipse = false -}}

View file

@ -13,7 +13,8 @@
{{- $shouldEllipse := false -}} {{- $shouldEllipse := false -}}
{{- range $pag.Pagers -}} {{- range $pag.Pagers -}}
{{- $right := sub .TotalPages .PageNumber -}} {{- $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 -}} {{- if $showNumber -}}
{{- $ellipsed = false -}} {{- $ellipsed = false -}}
{{- $shouldEllipse = false -}} {{- $shouldEllipse = false -}}