mirror of https://github.com/bvn13/VoidForum.git
working on commenting ability
parent
a250ace937
commit
ad77b46d26
|
@ -174,4 +174,26 @@ img.borderless {
|
||||||
float: left;
|
float: left;
|
||||||
color: red;
|
color: red;
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 30px !important;
|
||||||
|
}
|
||||||
|
h2 {
|
||||||
|
font-size: 24px !important;
|
||||||
|
}
|
||||||
|
h3 {
|
||||||
|
font-size: 18px !important;
|
||||||
|
}
|
||||||
|
h4 {
|
||||||
|
font-size: 16px !important;
|
||||||
|
}
|
||||||
|
h5 {
|
||||||
|
font-size: 14px !important;
|
||||||
|
}
|
||||||
|
h6 {
|
||||||
|
font-size: 12px !important;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
font: 300 14px "Helvetica Neue",Helvetica, Microsoft Yahei, Hiragino Sans GB, Microsoft Sans Serif, WenQuanYi Micro Hei, sans;
|
||||||
}
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
|
|
||||||
|
hr
|
||||||
|
|
||||||
form#commentForm.comment-form(action="comments", method="POST")
|
form#commentForm.comment-form(action="/posts/"+post.getId()+"/comments", method="POST")
|
||||||
.item-row
|
.item-row
|
||||||
input(type="hidden", name='_csrf', value='#{_csrf.token}')
|
input(type="hidden", name='_csrf', value='#{_csrf.token}')
|
||||||
.item-row
|
.item-row
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
|
||||||
|
.load-more
|
||||||
|
nav
|
||||||
|
ul.pagination
|
||||||
|
if page > 1
|
||||||
|
li.previous
|
||||||
|
a.btn(href="?page=#{page - 1}")
|
||||||
|
span(aria-hidden="true") ←
|
||||||
|
| Older comments
|
||||||
|
|
||||||
|
for pageNum in pagesList
|
||||||
|
if pageNum==page
|
||||||
|
li.active
|
||||||
|
a.btn(href="?page=#{pageNum}")
|
||||||
|
= pageNum
|
||||||
|
else
|
||||||
|
li
|
||||||
|
a.btn(href="?page=#{pageNum}")
|
||||||
|
= pageNum
|
||||||
|
|
||||||
|
|
||||||
|
if totalPages > page
|
||||||
|
li.next
|
||||||
|
a.btn(href="?page=#{page + 1}")
|
||||||
|
| Newer comments
|
||||||
|
span(aria-hidden="true") →
|
|
@ -1,29 +1,5 @@
|
||||||
|
|
||||||
.load-more
|
include fragments/pagination
|
||||||
nav
|
|
||||||
ul.pagination
|
|
||||||
if page > 1
|
|
||||||
li.previous
|
|
||||||
a.btn(href="?page=#{page - 1}")
|
|
||||||
span(aria-hidden="true") ←
|
|
||||||
| Older comments
|
|
||||||
|
|
||||||
for pageNum in pagesList
|
|
||||||
if pageNum==page
|
|
||||||
li.active
|
|
||||||
a.btn(href="?page=#{pageNum}")
|
|
||||||
= pageNum
|
|
||||||
else
|
|
||||||
li
|
|
||||||
a.btn(href="?page=#{pageNum}")
|
|
||||||
= pageNum
|
|
||||||
|
|
||||||
|
|
||||||
if totalPages > page
|
|
||||||
li.next
|
|
||||||
a.btn(href="?page=#{page + 1}")
|
|
||||||
| Newer comments
|
|
||||||
span(aria-hidden="true") →
|
|
||||||
|
|
||||||
for comment in comments
|
for comment in comments
|
||||||
if comment.getDeletedMark()
|
if comment.getDeletedMark()
|
||||||
|
@ -31,6 +7,10 @@ for comment in comments
|
||||||
else
|
else
|
||||||
include one
|
include one
|
||||||
|
|
||||||
|
include fragments/pagination
|
||||||
|
|
||||||
|
|
||||||
if userService.currentUserCanWrite()
|
if userService.currentUserCanWrite()
|
||||||
include fragments/commentCreationForm
|
include fragments/commentCreationForm
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,22 +1,17 @@
|
||||||
|
|
||||||
.panel.panel-default
|
.panel.panel-default
|
||||||
.panel-heading
|
.panel-heading
|
||||||
span #{comment.getUser().getNickname()}, #{viewHelper.getFormattedDate(comment.getCreatedAt())}
|
span
|
||||||
|
b #{comment.getUser().getNickname()}
|
||||||
|
|, #{viewHelper.getFormattedDate(comment.getCreatedAt())}
|
||||||
div
|
div
|
||||||
if userService.isCurrentUserAdmin()
|
if userService.isCurrentUserAdmin()
|
||||||
.td
|
.td
|
||||||
admin
|
| admin
|
||||||
|
|
||||||
.panel-body
|
.panel-body
|
||||||
!{comment.getRenderedContent()}
|
!{comment.getRenderedContent()}
|
||||||
|
|
||||||
|
|
||||||
//if userService.currentUserCanWrite()
|
|
||||||
// div
|
|
||||||
// = userService.currentUser().getNickname()
|
|
||||||
// include fragments/commentCreationForm
|
|
||||||
|
|
||||||
//if commentService.childrenCount(comments, comment) > 0
|
|
||||||
// .comment-children(style="padding-left: #{5 * commentService.childrenCount(comments, comment)}px")
|
|
||||||
// include list
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue