yesod-tableview-0.2.1: Table view for Yesod applications

Stabilityexperimental
MaintainerErtugrul Soeylemez <es@ertes.de>

Yesod.TableView

Contents

Description

Table-like view for tabular data.

Synopsis

Table view

data TableView val Source

Table view settings. Defaults are given in parentheses.

Constructors

TableView 

Fields

tableFilter :: [Filter val]

Table filter.

tableId :: Maybe String

HTML table id.

tableOrder :: [Order val]

Table sorting order.

tableRoute :: Int -> Int -> Route (TableSite val)

Table route.

tableShowHead :: Bool

Show table header?

tableStyled :: Bool

Add CSS styles?

tableCurrentLimit :: Int

Current pager limit.

tableCurrentOffset :: Int

Current offset.

tableLimitPrompt :: String

Prompt in limit form.

tableLimits :: [Int]

Selectable limits ([10, 20, 50, 100]).

tableMinLimit :: Maybe Int

Minimum pager limit (Just 10).

tableMaxLimit :: Maybe Int

Maximum pager limit (Just 100).

defTableView :: TableView valSource

Default values for most fields. The following fields will be left undefined: tableRoute, tableCurrentLimit and tableCurrentOffset.

makeTableView :: [Filter val] -> [Order val] -> Int -> Int -> (Int -> Int -> Route (TableSite val)) -> TableView valSource

Simple smart constructor for common table view configurations.

tableView :: forall val. (PersistBackend (YesodDB (TableSite val) (GTableHandler val IO)), PersistEntity val, TableViewWidget val, YesodPersist (TableSite val)) => TableView val -> TableHandler val (TableWidget val ())Source

Generate a table view widget from the given configuration.

Reexports