| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Yesod.Paginator.Widget
- getCurrentPage :: Yesod m => HandlerT m IO Int
- paginationWidget :: Yesod m => PageWidgetConfig -> PageWidget m
- defaultWidget :: Yesod m => PageWidget m
- defaultPageWidgetConfig :: PageWidgetConfig
- simplePaginationWidget :: Yesod m => PageWidgetConfig -> PageWidget m
- type PageWidget m = Int -> Int -> Int -> WidgetT m IO ()
- data PageWidgetConfig = PageWidgetConfig {}
- data PageLink
- showLink :: [(Text, Text)] -> PageLink -> WidgetT m IO ()
Documentation
getCurrentPage :: Yesod m => HandlerT m IO Int #
looks up the "p" GET param and converts it to an Int. returns a default of 1 when conversion fails.
paginationWidget :: Yesod m => PageWidgetConfig -> PageWidget m #
A widget showing pagination links. Follows bootstrap principles. Utilizes a "p" GET param but leaves all other GET params intact.
defaultWidget :: Yesod m => PageWidget m #
defaultPageWidgetConfig :: PageWidgetConfig #
Default widget config provided for easy overriding of only some fields.
simplePaginationWidget :: Yesod m => PageWidgetConfig -> PageWidget m #
A simple widget that only shows next and previous links. Follows bootstrap principles. Utilizes a "p" GET param but leaves all other GET params intact. Uses the same config data type as the main pagination widget, but ignores all of the values with the exception of the text for the next and previous links.
type PageWidget m = Int -> Int -> Int -> WidgetT m IO () #
currentPage, itemsPerPage, totalItems -> widget
data PageWidgetConfig #
Constructors
| PageWidgetConfig | |
Fields
| |
Individual links to pages need to follow strict (but sane) markup to be styled correctly by bootstrap. This type allows construction of such links in both enabled and disabled states.