aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/actor_profile_page.php
diff options
context:
space:
mode:
authorwinter2025-01-14 20:44:49 +0000
committerwinter2025-01-14 20:44:49 +0000
commit4d7f8450d9a842e2f69754ccaa4202710328dcb7 (patch)
tree60e90ff7ebbf069e04faf665d68861970eaee000 /templates/actor_profile_page.php
parent0f427b4b6f75134b2c25b7e5f8a515be2cec97f5 (diff)
add (un)follow button to profile
also other stuff i forgot what exactly
Diffstat (limited to 'templates/actor_profile_page.php')
-rw-r--r--templates/actor_profile_page.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/templates/actor_profile_page.php b/templates/actor_profile_page.php
index e7d28b7..649069d 100644
--- a/templates/actor_profile_page.php
+++ b/templates/actor_profile_page.php
@@ -9,11 +9,16 @@ call_template('skeleton', [
global $actor;
call_template('actor_profile', ['actor' => $actor]);
echo '<hr>';
- $notes = Note::findAllWithAuthor($actor, 50);
+ $notes = Note::findAllWithAuthor($actor, 20);
if (count($notes) == 0) {
call_template('placeholder_text', ['message' => __('user.notes.placeholder')]);
- }
- foreach ($notes as $n) {
- call_template('note', ['note' => $n]);
+ } else {
+ foreach ($notes as $n) {
+ call_template('note', ['note' => $n]);
+ }
+ $countNotShown = Note::countWithAuthor($actor) - count($notes);
+ if ($countNotShown >= 0) {
+ call_template('placeholder_text', ['count' => $countNotShown]);
+ }
}
}); \ No newline at end of file