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