View Source Exzeitable.HTML.Pagination (Exzeitable v0.6.8)

For building out the pagination buttons above and below the table

Summary

Functions

Builds the pagination selector with page numbers, next and back etc.

Selects the page buttons we need for pagination

A partial page is still a page.

Types

name()

@type name() :: :next | :previous | :dots | pos_integer()

page()

@type page() :: pos_integer()

pages()

@type pages() :: pos_integer()

Functions

build(params)

@spec build(Exzeitable.Params.t()) :: {:safe, iolist()}

Builds the pagination selector with page numbers, next and back etc.

filter_pages(pages, page)

@spec filter_pages(pos_integer(), pos_integer()) :: [pos_integer() | :dots]

Selects the page buttons we need for pagination

page_count(params)

@spec page_count(Exzeitable.Params.t()) :: pages()

A partial page is still a page.