bb7f0e6fc2
Eliminated the commentAuthorSlugs in database and getting them by lookup from userId.
28 lines
1.1 KiB
Text
Executable file
28 lines
1.1 KiB
Text
Executable file
$newline never
|
|
<div .column>
|
|
<div .subheader .medium>
|
|
<h1>Comments by medium
|
|
|
|
|
|
$if null comments
|
|
<div .subheader .medium>
|
|
<p>There are no comments yet
|
|
$else
|
|
$forall (Entity mediumId medium) <- media
|
|
<div .subheader .medium>
|
|
<h3>#{mediumTitle medium}
|
|
$forall (Entity commentId comment) <- comments
|
|
$if commentOrigin comment == mediumId
|
|
<div .medium .comment>
|
|
#{fromMaybe "" $ lookup (commentAuthor comment) authors} wrote on #{formatTime defaultTimeLocale "%A %F %H:%M" $ commentTime comment}:
|
|
<hr>
|
|
#{commentContent comment}
|
|
<a href=@{AdminCommentDeleteR commentId}>Delete this comment
|
|
$forall (Entity replyId reply) <- replies
|
|
$if commentParent reply == Just commentId
|
|
$if commentOrigin reply == mediumId
|
|
<div .medium .comment .reply>
|
|
#{fromMaybe "" $ lookup (commentAuthor comment) authors} wrote on #{formatTime defaultTimeLocale "%A %F %H:%M" $ commentTime comment}:
|
|
<hr>
|
|
#{commentContent reply}
|
|
<a href=@{AdminCommentDeleteR replyId}>Delete this comment
|