From ded1d9d99e66bfca9e7bb37860c54e30c2539f69 Mon Sep 17 00:00:00 2001 From: nek0 Date: Fri, 6 Jan 2017 17:33:33 +0100 Subject: [PATCH] fixing comments --- Handler/Medium.hs | 4 ++-- templates/medium.hamlet | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Handler/Medium.hs b/Handler/Medium.hs index 1c5a330..c346a81 100755 --- a/Handler/Medium.hs +++ b/Handler/Medium.hs @@ -50,11 +50,11 @@ getMediumR mediumId = do comments <- runDB $ selectList [ CommentOrigin ==. mediumId , CommentParent ==. Nothing ] - [ Desc CommentTime ] + [ Asc CommentTime ] replies <- runDB $ selectList [ CommentOrigin ==. mediumId , CommentParent !=. Nothing ] - [ Desc CommentTime ] + [ Asc CommentTime ] let tr = StaticR $ StaticRoute (drop 2 $ map T.pack $ splitDirectories $ mediumThumb medium) [] pr = StaticR $ StaticRoute (drop 2 $ map T.pack $ splitDirectories $ mediumPreview medium) [] ir = StaticR $ StaticRoute (drop 2 $ map T.pack $ splitDirectories $ mediumPath medium) [] diff --git a/templates/medium.hamlet b/templates/medium.hamlet index 8ebadad..a4c0f56 100755 --- a/templates/medium.hamlet +++ b/templates/medium.hamlet @@ -56,11 +56,11 @@ $forall (Entity replyId reply) <- replies $if commentParent reply == Just commentId
- #{fromMaybe "" $ lookup (commentAuthor comment) authors} replied on #{formatTime defaultTimeLocale "%A %F %H:%M" $ commentTime reply}: + #{fromMaybe "" $ lookup (commentAuthor reply) authors} replied on #{formatTime defaultTimeLocale "%A %F %H:%M" $ commentTime reply}:
#{commentContent reply}
- $if userId == (Just $ commentAuthor comment) + $if userId == (Just $ commentAuthor reply) Delete this comment $if userId /= Nothing