From 4d7f8450d9a842e2f69754ccaa4202710328dcb7 Mon Sep 17 00:00:00 2001 From: winter Date: Tue, 14 Jan 2025 20:44:49 +0000 Subject: add (un)follow button to profile also other stuff i forgot what exactly --- templates/actor_profile_page.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'templates/actor_profile_page.php') 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 '
'; - $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 -- cgit v1.3