fixing comments
This commit is contained in:
parent
d33ced3d4a
commit
ded1d9d99e
2 changed files with 4 additions and 4 deletions
|
@ -50,11 +50,11 @@ getMediumR mediumId = do
|
||||||
comments <- runDB $ selectList
|
comments <- runDB $ selectList
|
||||||
[ CommentOrigin ==. mediumId
|
[ CommentOrigin ==. mediumId
|
||||||
, CommentParent ==. Nothing ]
|
, CommentParent ==. Nothing ]
|
||||||
[ Desc CommentTime ]
|
[ Asc CommentTime ]
|
||||||
replies <- runDB $ selectList
|
replies <- runDB $ selectList
|
||||||
[ CommentOrigin ==. mediumId
|
[ CommentOrigin ==. mediumId
|
||||||
, CommentParent !=. Nothing ]
|
, CommentParent !=. Nothing ]
|
||||||
[ Desc CommentTime ]
|
[ Asc CommentTime ]
|
||||||
let tr = StaticR $ StaticRoute (drop 2 $ map T.pack $ splitDirectories $ mediumThumb medium) []
|
let tr = StaticR $ StaticRoute (drop 2 $ map T.pack $ splitDirectories $ mediumThumb medium) []
|
||||||
pr = StaticR $ StaticRoute (drop 2 $ map T.pack $ splitDirectories $ mediumPreview medium) []
|
pr = StaticR $ StaticRoute (drop 2 $ map T.pack $ splitDirectories $ mediumPreview medium) []
|
||||||
ir = StaticR $ StaticRoute (drop 2 $ map T.pack $ splitDirectories $ mediumPath medium) []
|
ir = StaticR $ StaticRoute (drop 2 $ map T.pack $ splitDirectories $ mediumPath medium) []
|
||||||
|
|
|
@ -56,11 +56,11 @@
|
||||||
$forall (Entity replyId reply) <- replies
|
$forall (Entity replyId reply) <- replies
|
||||||
$if commentParent reply == Just commentId
|
$if commentParent reply == Just commentId
|
||||||
<div .comment .reply .medium>
|
<div .comment .reply .medium>
|
||||||
<a href=@{ProfileR $ commentAuthor reply}>#{fromMaybe "" $ lookup (commentAuthor comment) authors}</a> replied on #{formatTime defaultTimeLocale "%A %F %H:%M" $ commentTime reply}:
|
<a href=@{ProfileR $ commentAuthor reply}>#{fromMaybe "" $ lookup (commentAuthor reply) authors}</a> replied on #{formatTime defaultTimeLocale "%A %F %H:%M" $ commentTime reply}:
|
||||||
<hr>
|
<hr>
|
||||||
#{commentContent reply}
|
#{commentContent reply}
|
||||||
<hr>
|
<hr>
|
||||||
$if userId == (Just $ commentAuthor comment)
|
$if userId == (Just $ commentAuthor reply)
|
||||||
<a href=@{CommentDeleteR replyId}>Delete this comment
|
<a href=@{CommentDeleteR replyId}>Delete this comment
|
||||||
|
|
||||||
$if userId /= Nothing
|
$if userId /= Nothing
|
||||||
|
|
Loading…
Reference in a new issue