summaryrefslogtreecommitdiff
path: root/src/web/_views/_template/posts.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/_views/_template/posts.php')
-rw-r--r--src/web/_views/_template/posts.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/web/_views/_template/posts.php b/src/web/_views/_template/posts.php
new file mode 100644
index 0000000..4202e67
--- /dev/null
+++ b/src/web/_views/_template/posts.php
@@ -0,0 +1,32 @@
+<div id="post-container">
+<?php
+ $pdata = $this->posts();
+
+ $loaded = $pdata['loaded'];
+ $page_size = $pdata['page_size'];
+ $total = $pdata['total'];
+ $max = $pdata['max'];
+ $filterUid = $pdata['filter_uid'];
+?>
+<?php if ($loaded == 0): ?>
+ <div id="no-posts" class="card">
+ <span class="no-posts-title mb"><?=lang('no_posts_found')?></span>
+ <span><?=random_value(explode("\n", lang('no_posts_found_ext')))?></span>
+ </div>
+<?php endif; ?>
+<?php
+ if ($loaded >= $page_size && $page_size < $total) {
+ echo ilang('action_load_posts',
+ id: 'action-load-posts',
+ class: 'btn btn-blend grow mb mt',
+ attrs: array(
+ 'loaded' => $loaded,
+ 'pageSize' => $page_size,
+ 'postCount' => $total,
+ 'postMax' => $max,
+ 'userId' => $filterUid ? json_encode($filterUid) : ''
+ )
+ );
+ }
+?>
+</div>