diff options
Diffstat (limited to 'src/web/_views/template')
-rw-r--r-- | src/web/_views/template/comment.php | 2 | ||||
-rw-r--r-- | src/web/_views/template/pfp.php | 17 | ||||
-rw-r--r-- | src/web/_views/template/post.php | 5 | ||||
-rw-r--r-- | src/web/_views/template/posts.php | 2 |
4 files changed, 5 insertions, 21 deletions
diff --git a/src/web/_views/template/comment.php b/src/web/_views/template/comment.php index 3ff473b..cf2c0b4 100644 --- a/src/web/_views/template/comment.php +++ b/src/web/_views/template/comment.php @@ -4,7 +4,7 @@ $format_model = $this->load->model('format'); ?> <div class="comment row mt"> - <?php $this->view('template/pfp', array('user' => $user))?> + <?=pfp($user)?> <div class="ml col sub-card"> <div class="row"> <strong><?=$format_model->name($user)?></strong> diff --git a/src/web/_views/template/pfp.php b/src/web/_views/template/pfp.php deleted file mode 100644 index ebb4b5f..0000000 --- a/src/web/_views/template/pfp.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php /* Copyright (c) 2024 Freya Murphy */ ?> -<?php /* vi: syntax=php */ ?> -<?php - $class = isset($class) ? $class : ''; - $link = isset($link) ? $link : TRUE; -?> -<?php if($link): ?> -<a class="image-loading pfp <?=$class?>" href="/profile?id=<?=$user['id']?>"> -<?php else: ?> -<div class="image-loading pfp <?=$class?>"> -<?php endif; ?> - <img src="/api/rpc/profile_avatar?user_id=<?=$user['id']?>"/> -<?php if ($link): ?> -</a> -<?php else: ?> -</div> -<?php endif; ?> diff --git a/src/web/_views/template/post.php b/src/web/_views/template/post.php index 0633985..fb8cef5 100644 --- a/src/web/_views/template/post.php +++ b/src/web/_views/template/post.php @@ -2,7 +2,7 @@ <?php /* vi: syntax=php */ ?> <div class="post card"> <div class="row"> - <?php $this->view('template/pfp', array('user' => $user))?> + <?=pfp($user)?> <div class="col ml"> <strong><?=$user['first_name'] . ' ' . $user['last_name']?></strong> <span class="dim"><?=$post['created']?></span> @@ -21,6 +21,7 @@ $post_attrs['likeId'] = $post['like_id']; } ?> + <span class="likes dim"><span class="count"><?=$post['like_count']?></span><?=' ' . lang('likes')?></span> <?php if ($self): ?> <hr> <div class="row"> @@ -61,7 +62,7 @@ </div> <?php if ($self): ?> <div class="row pb"> - <?php $this->view('template/pfp', array('user' => $self))?> + <?=pfp($self)?> <form class="ml action-new-comment-form row"> <input type="hidden" diff --git a/src/web/_views/template/posts.php b/src/web/_views/template/posts.php index 5fec698..137c0dd 100644 --- a/src/web/_views/template/posts.php +++ b/src/web/_views/template/posts.php @@ -17,7 +17,7 @@ 'pageSize' => $page_size, 'postCount' => $total, 'postMax' => $max, - 'userId' => $filterUid + 'userId' => $filterUid ? json_encode($filterUid) : '' ) ); } |