Show note if table is empty
This commit is contained in:
parent
936b808aaf
commit
0ab81d3fc1
@ -289,6 +289,9 @@ dbTable PSValidator{..} dbtable@(DBTable{ dbtIdent = (toPathPiece -> dbtIdent),
|
|||||||
attrs = sortableContent ^. cellAttrs
|
attrs = sortableContent ^. cellAttrs
|
||||||
return $(widgetFile "table/cell/header")
|
return $(widgetFile "table/cell/header")
|
||||||
|
|
||||||
|
columnCount :: Int64
|
||||||
|
columnCount = olength64 $ getColonnade dbtColonnade
|
||||||
|
|
||||||
wHeaders <- maybe (return Nothing) (fmap Just . genHeaders) pSortable
|
wHeaders <- maybe (return Nothing) (fmap Just . genHeaders) pSortable
|
||||||
|
|
||||||
wRows <- forM rows $ \row -> forM (oneColonnadeEncode <$> getColonnade dbtColonnade) $ \(($ row) -> cell) -> do
|
wRows <- forM rows $ \row -> forM (oneColonnadeEncode <$> getColonnade dbtColonnade) $ \(($ row) -> cell) -> do
|
||||||
|
|||||||
@ -4,10 +4,15 @@ $newline never
|
|||||||
<thead>
|
<thead>
|
||||||
<tr .table__row.table__row--head>
|
<tr .table__row.table__row--head>
|
||||||
$forall widget <- wHeaders'
|
$forall widget <- wHeaders'
|
||||||
^{widget}
|
^{widget} $# cell/header.hamlet
|
||||||
$nothing
|
$nothing
|
||||||
<tbody>
|
<tbody>
|
||||||
$forall row <- wRows
|
$if null wRows
|
||||||
<tr .table__row>
|
<tr>
|
||||||
$forall widget <- row
|
<td colspan=#{show columnCount}>
|
||||||
^{widget}
|
Kein Inhalt.
|
||||||
|
$else
|
||||||
|
$forall row <- wRows
|
||||||
|
<tr .table__row>
|
||||||
|
$forall widget <- row
|
||||||
|
^{widget} $# cell/body.hamlet
|
||||||
|
|||||||
Reference in New Issue
Block a user