Added comment count to post list
This commit is contained in:
parent
16f9c277a1
commit
17cc4e7947
3 changed files with 11 additions and 4 deletions
1
TODO
1
TODO
|
@ -4,7 +4,6 @@ first major release.
|
||||||
everything related to posts:
|
everything related to posts:
|
||||||
- post listing
|
- post listing
|
||||||
- better thumbnail loading
|
- better thumbnail loading
|
||||||
- comment count
|
|
||||||
- search filters
|
- search filters
|
||||||
- file_size:3K..5M
|
- file_size:3K..5M
|
||||||
- image_size:huge/large/medium/small
|
- image_size:huge/large/medium/small
|
||||||
|
|
|
@ -5,22 +5,29 @@
|
||||||
|
|
||||||
<img class="thumb" src="/data/thumbnails/160x160/posts/<%= post.name %>" alt="<%= post.idMarkdown %>"/>
|
<img class="thumb" src="/data/thumbnails/160x160/posts/<%= post.name %>" alt="<%= post.idMarkdown %>"/>
|
||||||
|
|
||||||
<% if (post.favoriteCount || post.score) { %>
|
<% if (post.favoriteCount || post.score || post.commentCount) { %>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<ul>
|
<ul>
|
||||||
<% if (post.favoriteCount) { %>
|
<% if (post.favoriteCount) { %>
|
||||||
<li>
|
<li>
|
||||||
<i class="fa fa-heart-o"></i>
|
<i class="fa fa-heart"></i>
|
||||||
<%= post.favoriteCount %>
|
<%= post.favoriteCount %>
|
||||||
</li>
|
</li>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
<% if (post.score) { %>
|
<% if (post.score) { %>
|
||||||
<li>
|
<li>
|
||||||
<i class="fa fa-thumbs-o-up"></i>
|
<i class="fa fa-thumbs-up"></i>
|
||||||
<%= post.score %>
|
<%= post.score %>
|
||||||
</li>
|
</li>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
|
<% if (post.commentCount) { %>
|
||||||
|
<li>
|
||||||
|
<i class="fa fa-comments"></i>
|
||||||
|
<%= post.commentCount %>
|
||||||
|
</li>
|
||||||
|
<% } %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
|
@ -63,6 +63,7 @@ class PostViewProxy extends AbstractViewProxy
|
||||||
$result->originalFileSize = $post->getOriginalFileSize();
|
$result->originalFileSize = $post->getOriginalFileSize();
|
||||||
$result->favoriteCount = $post->getFavoriteCount();
|
$result->favoriteCount = $post->getFavoriteCount();
|
||||||
$result->score = $post->getScore();
|
$result->score = $post->getScore();
|
||||||
|
$result->commentCount = $post->getCommentCount();
|
||||||
|
|
||||||
if (!empty($config[self::FETCH_TAGS]))
|
if (!empty($config[self::FETCH_TAGS]))
|
||||||
$result->tags = $this->tagViewProxy->fromArray($post->getTags());
|
$result->tags = $this->tagViewProxy->fromArray($post->getTags());
|
||||||
|
|
Loading…
Reference in a new issue