forked from goffee/core
add element paginator
This commit is contained in:
parent
5c3559c793
commit
f276f4d61d
2 changed files with 19 additions and 0 deletions
9
template/components/content_pagination.go
Normal file
9
template/components/content_pagination.go
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
package components
|
||||||
|
|
||||||
|
type ContentPagination struct {
|
||||||
|
PageStartRecord int
|
||||||
|
PageEndRecord int
|
||||||
|
TotalRecords int
|
||||||
|
PrevLink string
|
||||||
|
NextLink string
|
||||||
|
}
|
||||||
10
template/components/content_pagination.html
Normal file
10
template/components/content_pagination.html
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{{define "content_pagination"}}
|
||||||
|
<div class="pagination-container">
|
||||||
|
<ul class="pagination pagination-sm">
|
||||||
|
<li class="page-item">{{.PageStartRecord}} - {{.PageEndRecord}} of {{.TotalRecords}}</li>
|
||||||
|
<li class="page-item"> </li>
|
||||||
|
<li class="page-item"><a class="page-link{{if eq .PrevLink ""}} disabled"{{else}}" href="{{.PrevLink}}"{{end}}>«</a></li>
|
||||||
|
<li class="page-item"><a class="page-link{{if eq .NextLink ""}} disabled"{{else}}" href="{{.NextLink}}"{{end}}>»</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue