Torch v1.0.0-rc.3 Torch.PaginationView
Phoenix.View
to render pagination controls for Torch-generated index templates.
Summary
Functions
Returns true whenever the list of templates changes in the filesystem
The resource name, as an atom, for this view
Returns the template root alongside all templates
Generates a “Next >” link to the next page of results
Generates a “< Prev” link to the previous page of results
Renders the given template locally
Callback invoked when no template is found. By default it raises but can be customized to render a particular template
Functions
Generates a “Next >” link to the next page of results.
The link is only returned if there is another page.
Example
next_link(1, 2)
# => returns link
next_link(2, 2)
# => returns nil
Generates a “< Prev” link to the previous page of results.
The link is only returned if there is a previous page.
Example
prev_link(2, 2)
# => returns link
prev_link(1, 1)
# => returns nil