summaryrefslogtreecommitdiff
path: root/src/web/_views/_template/post.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/web/_views/_template/post.php (renamed from src/web/_views/template/post.php)13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/web/_views/template/post.php b/src/web/_views/_template/post.php
index 48f8bb6..f7f5de2 100644
--- a/src/web/_views/template/post.php
+++ b/src/web/_views/_template/post.php
@@ -5,14 +5,13 @@
<?=pfp($user)?>
<div class="col ml">
<strong><?=$user['first_name'] . ' ' . $user['last_name']?></strong>
- <span class="subtext"><?=$this->main->date($post['created'])?></span>
+ <span class="subtext"><?=$this->format_date($post['created'])?></span>
</div>
</div>
<p>
<?=$post['content']?>
</p>
<?php
- $self = $this->main->user();
$liked = $post['like_id'] ? 'btn-primary' : '';
$post_attrs = array(
'postId' => $post['id']
@@ -22,7 +21,7 @@
}
?>
<span class="likes subtext"><span class="count"><?=$post['like_count']?></span><?=' ' . ucfirst(lang('likes'))?></span>
-<?php if ($self): ?>
+<?php if ($session): ?>
<hr>
<div class="row">
<?=ilang('action_like',
@@ -30,7 +29,7 @@
attrs: $post_attrs
)?>
<?=ilang('action_comment', class: 'btn grow action-comment',
- click: '$(\'#action-new-comment-' . $post['id'] . '\').focus()'
+ onclick: '$(\'#action-new-comment-' . $post['id'] . '\').focus()'
)?>
</div>
<hr>
@@ -46,7 +45,7 @@
$total = $post['comment_count'];
if ($loaded >= $page_size && $page_size < $total) {
- ilang('action_load_comments',
+ echo ilang('action_load_comments',
class: 'action-load-comments btn btn-blend mt',
attrs: array(
'postId' => $post['id'],
@@ -60,9 +59,9 @@
?>
</div>
-<?php if ($self): ?>
+<?php if ($session): ?>
<div class="row pb">
- <?=pfp($self)?>
+ <?=pfp($session)?>
<form class="ml action-new-comment-form row">
<input
type="hidden"