diff --git a/lib/View.hs b/lib/View.hs index 6f2b979..fe2ac6d 100644 --- a/lib/View.hs +++ b/lib/View.hs @@ -411,7 +411,7 @@ renderEdit globalState edit = do " from " >> quote (toHtml (show oldStatus)) " to " >> quote (toHtml (show newStatus)) Edit'SetCategoryNotes catId oldNotes newNotes -> do - p_ $ "changed notes of category " >> printCategory catId + p_ $ (if (T.null oldNotes) then "added" else "changed") >> " notes of category " >> printCategory catId table_ $ tr_ $ do td_ $ blockquote_ $ toHtml (toMarkdownBlock oldNotes) td_ $ blockquote_ $ toHtml (toMarkdownBlock newNotes) @@ -441,24 +441,24 @@ renderEdit globalState edit = do " from " >> code_ (toHtml (show oldKind)) " to " >> code_ (toHtml (show newKind)) Edit'SetItemDescription itemId oldDescr newDescr -> do - p_ $ "changed description of item " >> printItem itemId + p_ $ (if (T.null oldDescr) then "added" else "changed") >> " description of item " >> printItem itemId table_ $ tr_ $ do td_ $ blockquote_ $ toHtml (toMarkdownBlock oldDescr) td_ $ blockquote_ $ toHtml (toMarkdownBlock newDescr) Edit'SetItemNotes itemId oldNotes newNotes -> do - p_ $ "changed notes of item " >> printItem itemId + p_ $ (if (T.null oldNotes) then "added" else "changed") >> " notes of item " >> printItem itemId table_ $ tr_ $ do td_ $ blockquote_ $ toHtml (toMarkdownBlock oldNotes) td_ $ blockquote_ $ toHtml (toMarkdownBlock newNotes) Edit'SetItemEcosystem itemId oldEcosystem newEcosystem -> do - p_ $ "changed ecosystem of item " >> printItem itemId + p_ $ (if (T.null oldEcosystem) then "added" else "changed") >> " ecosystem of item " >> printItem itemId table_ $ tr_ $ do td_ $ blockquote_ $ toHtml (toMarkdownBlock oldEcosystem) td_ $ blockquote_ $ toHtml (toMarkdownBlock newEcosystem) -- Change trait properties Edit'SetTraitContent itemId _traitId oldContent newContent -> do - p_ $ "changed trait of item " >> printItem itemId + p_ $ (if (T.null oldContent) then "added" else "changed") >> " trait of item " >> printItem itemId table_ $ tr_ $ do td_ $ blockquote_ $ p_ (toHtml (toMarkdownInline oldContent)) td_ $ blockquote_ $ p_ (toHtml (toMarkdownInline newContent))