Merge branch 'master' into 'live'
Fix accidental form nesting See merge request !123
This commit is contained in:
commit
e17b7f2eca
@ -679,17 +679,18 @@ dbTable PSValidator{..} dbtable@DBTable{ dbtIdent = dbtIdent'@(toPathPiece -> db
|
|||||||
let attrs = cell' ^. cellAttrs
|
let attrs = cell' ^. cellAttrs
|
||||||
return $(widgetFile "table/cell/body")
|
return $(widgetFile "table/cell/body")
|
||||||
|
|
||||||
let table = $(widgetFile "table/colonnade")
|
return $(widgetFile "table/colonnade")
|
||||||
pageCount
|
|
||||||
| PagesizeLimit l <- psLimit
|
|
||||||
= max 1 . ceiling $ rowCount % l
|
|
||||||
| otherwise
|
|
||||||
= 1
|
|
||||||
pageNumbers = [0..pred pageCount]
|
|
||||||
|
|
||||||
return $(widgetFile "table/layout")
|
pageCount
|
||||||
|
| PagesizeLimit l <- psLimit
|
||||||
|
= max 1 . ceiling $ rowCount % l
|
||||||
|
| otherwise
|
||||||
|
= 1
|
||||||
|
pageNumbers = [0..pred pageCount]
|
||||||
|
|
||||||
bool (dbHandler (Proxy @m) (Proxy @x) $ (\table -> $(widgetFile "table/layout-wrapper")) . dbsFilterLayout filterWdgt filterEnc rawAction) (sendResponse <=< tblLayout . dbsFilterLayout filterWdgt filterEnc rawAction <=< dbWidget (Proxy @m) (Proxy @x)) psShortcircuit <=< runDBTable dbtable paginationInput currentKeys . fmap swap $ runWriterT table'
|
uiLayout table = dbsFilterLayout filterWdgt filterEnc rawAction $(widgetFile "table/layout")
|
||||||
|
|
||||||
|
bool (dbHandler (Proxy @m) (Proxy @x) $ (\table -> $(widgetFile "table/layout-wrapper")) . uiLayout) (sendResponse <=< tblLayout . uiLayout <=< dbWidget (Proxy @m) (Proxy @x)) psShortcircuit <=< runDBTable dbtable paginationInput currentKeys . fmap swap $ runWriterT table'
|
||||||
where
|
where
|
||||||
tblLayout :: forall m'. (MonadHandler m', HandlerSite m' ~ UniWorX) => Widget -> m' Html
|
tblLayout :: forall m'. (MonadHandler m', HandlerSite m' ~ UniWorX) => Widget -> m' Html
|
||||||
tblLayout tbl' = do
|
tblLayout tbl' = do
|
||||||
|
|||||||
@ -1,20 +1,21 @@
|
|||||||
$newline never
|
$newline never
|
||||||
<table *{dbsAttrs'}>
|
<div .scrolltable>
|
||||||
$maybe wHeaders' <- wHeaders
|
<table *{dbsAttrs'}>
|
||||||
<thead>
|
$maybe wHeaders' <- wHeaders
|
||||||
<tr .table__row.table__row--head>
|
<thead>
|
||||||
$forall widget <- wHeaders'
|
<tr .table__row.table__row--head>
|
||||||
$# cell/header.hamlet
|
$forall widget <- wHeaders'
|
||||||
^{widget}
|
$# cell/header.hamlet
|
||||||
$nothing
|
|
||||||
<tbody>
|
|
||||||
$if null wRows && (dbsEmptyStyle == DBESHeading)
|
|
||||||
<tr .table__row>
|
|
||||||
<td .table__td colspan=#{show columnCount}>
|
|
||||||
_{dbsEmptyMessage}
|
|
||||||
$else
|
|
||||||
$forall row <- wRows
|
|
||||||
<tr .table__row>
|
|
||||||
$forall widget <- row
|
|
||||||
$# cell/body.hamlet
|
|
||||||
^{widget}
|
^{widget}
|
||||||
|
$nothing
|
||||||
|
<tbody>
|
||||||
|
$if null wRows && (dbsEmptyStyle == DBESHeading)
|
||||||
|
<tr .table__row>
|
||||||
|
<td .table__td colspan=#{show columnCount}>
|
||||||
|
_{dbsEmptyMessage}
|
||||||
|
$else
|
||||||
|
$forall row <- wRows
|
||||||
|
<tr .table__row>
|
||||||
|
$forall widget <- row
|
||||||
|
$# cell/body.hamlet
|
||||||
|
^{widget}
|
||||||
|
|||||||
@ -1,9 +1,8 @@
|
|||||||
$newline never
|
$newline never
|
||||||
$if null wRows && (dbsEmptyStyle == DBESNoHeading)
|
$if null rows && (dbsEmptyStyle == DBESNoHeading)
|
||||||
_{dbsEmptyMessage}
|
_{dbsEmptyMessage}
|
||||||
$else
|
$else
|
||||||
<div .scrolltable>
|
^{table}
|
||||||
^{table}
|
|
||||||
$if pageCount > 1
|
$if pageCount > 1
|
||||||
<div .pagination>
|
<div .pagination>
|
||||||
<form .pagesize method=GET enctype=#{pagesizeEnc} action=#{rawAction}>
|
<form .pagesize method=GET enctype=#{pagesizeEnc} action=#{rawAction}>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user