aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/actor_profile.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.php
parent0f427b4b6f75134b2c25b7e5f8a515be2cec97f5 (diff)
add (un)follow button to profile
also other stuff i forgot what exactly
Diffstat (limited to 'templates/actor_profile.php')
-rw-r--r--templates/actor_profile.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/templates/actor_profile.php b/templates/actor_profile.php
index 8a97bd8..c480d21 100644
--- a/templates/actor_profile.php
+++ b/templates/actor_profile.php
@@ -1,3 +1,8 @@
+<?php
+use Digitigrade\Model\UserAccount;
+
+$user = UserAccount::findByCurrentSession();
+?>
<div class="fullProfile">
<div class="basicInfo">
<?php call_template('actor_avatar', ['actor' => $actor]); ?>
@@ -18,4 +23,13 @@
<?php } else {
call_template('placeholder_text', ['message' => __('user.profile.bio.placeholder')]);
} ?>
+
+ <?php if (isset($user) && $actor->id != $user->actor->id): ?>
+ <div class="followInfo">
+ <?php if ($actor->follows($user->actor)): ?>
+ <?= __('user.profile.followsYou') ?>
+ <?php endif; ?>
+ <?php call_template('actor_profile_follow_button', ['actor' => $actor, 'user' => $user]); ?>
+ </div>
+ <?php endif; ?>
</div> \ No newline at end of file