admin comment interface complete
This commit is contained in:
parent
08f355a602
commit
734f3f8d35
3 changed files with 51 additions and 24 deletions
|
@ -14,7 +14,7 @@ getAdminCommentR = do
|
|||
media <- runDB $ selectList [] [Desc MediumTime]
|
||||
comments <- runDB $ selectList [CommentParent ==. Nothing] [Desc CommentTime]
|
||||
replies <- runDB $ selectList [CommentParent !=. Nothing] [Desc CommentTime]
|
||||
defaultLayout $ do
|
||||
formLayout $ do
|
||||
setTitle "Administration: Comments"
|
||||
$(widgetFile "adminComments")
|
||||
Left (errorMsg, route) -> do
|
||||
|
|
|
@ -1,17 +1,39 @@
|
|||
/*templates/medium.cassius*/
|
||||
|
||||
img
|
||||
position: relative !important
|
||||
max-width: 100% !important
|
||||
width: auto !important
|
||||
display: block !important
|
||||
margin-left: auto !important
|
||||
margin-right: auto !important
|
||||
|
||||
.comment
|
||||
border: 5px solid rgb(255, 255, 255)
|
||||
padding: 2em 3em
|
||||
background: #d64760 url('/static/css/images/overlay.png')
|
||||
|
||||
.reply
|
||||
margin-left: 50px
|
||||
background: #47d65f url('/static/css/images/overlay.png')
|
||||
|
||||
#mediabox
|
||||
margin: 10px
|
||||
padding: 5px
|
||||
border: 1px solid #ddd
|
||||
border-radius: 6px
|
||||
box-shadow: 0 0 3px #c4c4c4
|
||||
.image
|
||||
width: 100% !important
|
||||
|
||||
#comment
|
||||
margin-top: 5px
|
||||
padding: 5px
|
||||
border: 1px solid #ddd
|
||||
border-radius: 6px
|
||||
box-shadow: 0 0 3px #c4c4c4
|
||||
background-color: #f5f5f5
|
||||
#wrapper
|
||||
overflow: auto !important
|
||||
|
||||
#reel
|
||||
width: 90% !important
|
||||
max-height: auto !important
|
||||
|
||||
#reel .item
|
||||
float: none !important
|
||||
display: inline-block !important
|
||||
width: 100% !important
|
||||
|
||||
div #main
|
||||
margin-top: 60px !important
|
||||
position: static !important
|
||||
|
||||
#footer
|
||||
position: static !important
|
||||
|
|
|
@ -1,16 +1,21 @@
|
|||
$newline never
|
||||
<h3>Comments by medium
|
||||
<div id="header" class="item">
|
||||
<div class="inner">
|
||||
<h1>Comments by medium
|
||||
|
||||
|
||||
$if null comments
|
||||
<p>There are no comments yet
|
||||
$else
|
||||
$forall (Entity mediumId medium) <- media
|
||||
<div #mediabox>
|
||||
<h4>#{mediumTitle medium}
|
||||
<hr>
|
||||
<div id="header" class="item">
|
||||
<div class="inner">
|
||||
<p>There are no comments yet
|
||||
|
||||
$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
|
||||
<div #comment>
|
||||
<article class="comment">
|
||||
#{fromJust $ commentAuthorSlug comment} wrote on #{formatTime defaultTimeLocale "%A %F %H:%M" $ commentTime comment}:
|
||||
<hr>
|
||||
#{commentContent comment}
|
||||
|
@ -18,7 +23,7 @@ $else
|
|||
$forall (Entity replyId reply) <- replies
|
||||
$if commentParent reply == Just commentId
|
||||
$if commentOrigin reply == mediumId
|
||||
<div #comment class="reply">
|
||||
<article class="comment reply">
|
||||
#{fromJust $ commentAuthorSlug comment} wrote on #{formatTime defaultTimeLocale "%A %F %H:%M" $ commentTime comment}:
|
||||
<hr>
|
||||
#{commentContent reply}
|
||||
|
|
Loading…
Reference in a new issue