chore(dbtable): fix tooltipCell to display default icon

This commit is contained in:
Steffen Jost 2022-04-05 10:55:54 +02:00
parent 2dac5a056c
commit efcc9526ac
2 changed files with 3 additions and 6 deletions

View File

@ -1690,12 +1690,7 @@ i18nCell msg = cell $ do
cellTooltip :: (RenderMessage UniWorX msg, IsDBTable m a) => msg -> DBCell m a -> DBCell m a
cellTooltip msg = cellContents.mapped %~ (<> tipWdgt)
where
tipWdgt = [whamlet|
<div .tooltip>
<div .tooltip__handle>
<div .tooltip__content>_{msg}
|]
tipWdgt = iconTooltip (msg2widget msg) Nothing True
-- | Always display widget; maybe a link if user is Authorized.
-- Also see variant `linkEmptyCell`

View File

@ -307,6 +307,8 @@ int2widget i = [whamlet|#{tshow i}|]
word2widget :: Word64 -> WidgetFor site ()
word2widget i = [whamlet|#{tshow i}|]
msg2widget :: RenderMessage site a => a -> WidgetFor site ()
msg2widget msg = [whamlet|_{msg}|]
withFragment :: Monad m => MForm m (a, WidgetFor site ()) -> Markup -> MForm m (a, WidgetFor site ())
withFragment form html = flip fmap form $ over _2 (toWidget html >>)