eidolon/templates/adminComments.hamlet
2014-12-28 03:36:25 +01:00

25 lines
1 KiB
Text

$newline never
<h3>Comments by medium
$if null comments
<p>There are no comments yet
$else
$forall (Entity mediumId medium) <- media
<div #mediabox>
<h4>#{mediumTitle medium}
<hr>
$forall (Entity commentId comment) <- comments
$if commentOrigin comment == mediumId
<div #comment>
#{fromJust $ commentAuthorSlug comment} 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 #comment class="reply">
#{fromJust $ commentAuthorSlug comment} wrote on #{formatTime defaultTimeLocale "%A %F %H:%M" $ commentTime comment}:
<hr>
#{commentContent reply}
<a href=@{AdminCommentDeleteR replyId}>Delete this comment