diff --git a/src/Handler/Utils/Table/Pagination.hs b/src/Handler/Utils/Table/Pagination.hs index cf649e8c1..f0b683dce 100644 --- a/src/Handler/Utils/Table/Pagination.hs +++ b/src/Handler/Utils/Table/Pagination.hs @@ -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 diff --git a/templates/table/colonnade.hamlet b/templates/table/colonnade.hamlet index e9877a5cd..dc27d91ce 100644 --- a/templates/table/colonnade.hamlet +++ b/templates/table/colonnade.hamlet @@ -4,10 +4,15 @@ $newline never $forall widget <- wHeaders' - ^{widget} + ^{widget} $# cell/header.hamlet $nothing - $forall row <- wRows - - $forall widget <- row - ^{widget} + $if null wRows + + + Kein Inhalt. + $else + $forall row <- wRows + + $forall widget <- row + ^{widget} $# cell/body.hamlet