Show the recently commented pages
This commit is contained in:
parent
85bb5c2ef4
commit
ba09e9a865
2 changed files with 42 additions and 24 deletions
|
@ -105,32 +105,28 @@
|
|||
<p class="center">Showing <span class="totalRetrieved">{{grav.twig.comments.totalRetrieved}}</span> comments of <span class="totalAvailable">{{grav.twig.comments.totalAvailable}}</span></p>
|
||||
</div>
|
||||
|
||||
<h1>Recently commented pages</h1>
|
||||
{% if grav.twig.pages %}
|
||||
<h1>Recently commented pages</h1>
|
||||
|
||||
<div class="admin-block">
|
||||
<table>
|
||||
<tbody class="js__pages-container">
|
||||
<tr class="h">
|
||||
<th class="page">Page</th>
|
||||
<th class="number-of-comments">Number of comments</th>
|
||||
<th class="last-comment-date">Last commented on</th>
|
||||
</tr>
|
||||
{% for page in grav.twig.pages %}
|
||||
<tr>
|
||||
<td class="page">{{page.title}}</td>
|
||||
<td class="number-of-comments">{{page.commentsCount}}</td>
|
||||
<td class="last-comment-date"><strong>Page</strong>: {{page.lastCommentDate}}</td>
|
||||
<div class="admin-block">
|
||||
<table>
|
||||
<tbody class="js__pages-container">
|
||||
<tr class="h">
|
||||
<th class="page">Page</th>
|
||||
<th class="number-of-comments">Number of comments</th>
|
||||
<th class="last-comment-date">Last commented on</th>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% if grav.twig.comments.totalRetrieved < grav.twig.comments.totalAvailable %}
|
||||
<button type="button" class="button center js__load-more">
|
||||
Load more
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% for page in grav.twig.pages %}
|
||||
<tr>
|
||||
<td class="page">{{page.title}}</td>
|
||||
<td class="number-of-comments">{{page.commentsCount}}</td>
|
||||
<td class="last-comment-date">{{page.lastCommentDate}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue