eidolon/templates/adminComments.hamlet
2015-01-17 14:58:39 +01:00

30 lines
1.2 KiB
Text

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