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
|
||||
return $(widgetFile "table/cell/header")
|
||||
|
||||
columnCount :: Int64
|
||||
columnCount = olength64 $ getColonnade dbtColonnade
|
||||
|
||||
wHeaders <- maybe (return Nothing) (fmap Just . genHeaders) pSortable
|
||||
|
||||
wRows <- forM rows $ \row -> forM (oneColonnadeEncode <$> getColonnade dbtColonnade) $ \(($ row) -> cell) -> do
|
||||
|
||||
@ -4,10 +4,15 @@ $newline never
|
||||
<thead>
|
||||
<tr .table__row.table__row--head>
|
||||
$forall widget <- wHeaders'
|
||||
^{widget}
|
||||
^{widget} $# cell/header.hamlet
|
||||
$nothing
|
||||
<tbody>
|
||||
$forall row <- wRows
|
||||
<tr .table__row>
|
||||
$forall widget <- row
|
||||
^{widget}
|
||||
$if null wRows
|
||||
<tr>
|
||||
<td colspan=#{show columnCount}>
|
||||
Kein Inhalt.
|
||||
$else
|
||||
$forall row <- wRows
|
||||
<tr .table__row>
|
||||
$forall widget <- row
|
||||
^{widget} $# cell/body.hamlet
|
||||
|
||||
Loading…
Reference in New Issue
Block a user