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]
|
media <- runDB $ selectList [] [Desc MediumTime]
|
||||||
comments <- runDB $ selectList [CommentParent ==. Nothing] [Desc CommentTime]
|
comments <- runDB $ selectList [CommentParent ==. Nothing] [Desc CommentTime]
|
||||||
replies <- runDB $ selectList [CommentParent !=. Nothing] [Desc CommentTime]
|
replies <- runDB $ selectList [CommentParent !=. Nothing] [Desc CommentTime]
|
||||||
defaultLayout $ do
|
formLayout $ do
|
||||||
setTitle "Administration: Comments"
|
setTitle "Administration: Comments"
|
||||||
$(widgetFile "adminComments")
|
$(widgetFile "adminComments")
|
||||||
Left (errorMsg, route) -> do
|
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
|
.reply
|
||||||
margin-left: 50px
|
background: #47d65f url('/static/css/images/overlay.png')
|
||||||
|
|
||||||
#mediabox
|
.image
|
||||||
margin: 10px
|
width: 100% !important
|
||||||
padding: 5px
|
|
||||||
border: 1px solid #ddd
|
|
||||||
border-radius: 6px
|
|
||||||
box-shadow: 0 0 3px #c4c4c4
|
|
||||||
|
|
||||||
#comment
|
#wrapper
|
||||||
margin-top: 5px
|
overflow: auto !important
|
||||||
padding: 5px
|
|
||||||
border: 1px solid #ddd
|
#reel
|
||||||
border-radius: 6px
|
width: 90% !important
|
||||||
box-shadow: 0 0 3px #c4c4c4
|
max-height: auto !important
|
||||||
background-color: #f5f5f5
|
|
||||||
|
#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
|
$newline never
|
||||||
<h3>Comments by medium
|
<div id="header" class="item">
|
||||||
|
<div class="inner">
|
||||||
|
<h1>Comments by medium
|
||||||
|
|
||||||
|
|
||||||
$if null comments
|
$if null comments
|
||||||
|
<div id="header" class="item">
|
||||||
|
<div class="inner">
|
||||||
<p>There are no comments yet
|
<p>There are no comments yet
|
||||||
$else
|
|
||||||
$forall (Entity mediumId medium) <- media
|
$forall (Entity mediumId medium) <- media
|
||||||
<div #mediabox>
|
<div id="header" class="item">
|
||||||
<h4>#{mediumTitle medium}
|
<div class="inner">
|
||||||
<hr>
|
<h3>#{mediumTitle medium}
|
||||||
$forall (Entity commentId comment) <- comments
|
$forall (Entity commentId comment) <- comments
|
||||||
$if commentOrigin comment == mediumId
|
$if commentOrigin comment == mediumId
|
||||||
<div #comment>
|
<article class="comment">
|
||||||
#{fromJust $ commentAuthorSlug comment} wrote on #{formatTime defaultTimeLocale "%A %F %H:%M" $ commentTime comment}:
|
#{fromJust $ commentAuthorSlug comment} wrote on #{formatTime defaultTimeLocale "%A %F %H:%M" $ commentTime comment}:
|
||||||
<hr>
|
<hr>
|
||||||
#{commentContent comment}
|
#{commentContent comment}
|
||||||
|
@ -18,7 +23,7 @@ $else
|
||||||
$forall (Entity replyId reply) <- replies
|
$forall (Entity replyId reply) <- replies
|
||||||
$if commentParent reply == Just commentId
|
$if commentParent reply == Just commentId
|
||||||
$if commentOrigin reply == mediumId
|
$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}:
|
#{fromJust $ commentAuthorSlug comment} wrote on #{formatTime defaultTimeLocale "%A %F %H:%M" $ commentTime comment}:
|
||||||
<hr>
|
<hr>
|
||||||
#{commentContent reply}
|
#{commentContent reply}
|
||||||
|
|
Loading…
Reference in a new issue