Pagination.PaginationHelper (simple_pagination v0.1.0)

This module contains helper functions to create the following components:

  • order_by buttons
  • page links
  • filters

Check Pagination.Paginator for a complete example.

Link to this section Summary

Functions

Provides a link to order following a given field

Provides links for pages 1...N and a select box for number of items per page.any() if delta is provided as an argument, it'll modify the boundaries around the current page. Default value for delta is 1.

Generates inclusive filters (filter1 and filter2 and ...)

Link to this section Functions

Link to this function

order_tag(assigns)

@spec order_tag(any()) :: any()

Provides a link to order following a given field

<.order_tag label="id" order_by={:id} paginator={@things} />
Link to this function

page_tag(assigns)

@spec page_tag(any()) :: any()

Provides links for pages 1...N and a select box for number of items per page.any() if delta is provided as an argument, it'll modify the boundaries around the current page. Default value for delta is 1.

Link to this function

search_filter_tag(assigns)

@spec search_filter_tag(any()) :: any()

Generates inclusive filters (filter1 and filter2 and ...)