2018-10-16 16:28:42 +00:00
|
|
|
<?php
|
|
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
|
|
|
|
use Coduo\PHPHumanizer\DateTimeHumanizer;
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
<?= $message; ?>
|
|
|
|
|
2018-10-27 10:08:54 +00:00
|
|
|
<div class="row justify-content-center">
|
|
|
|
<ul class="comment-list">
|
|
|
|
<?php
|
|
|
|
$post['replyToPost']['hideShadows'] = true;
|
|
|
|
$this->load->view('network/posts/post_item', $post['replyToPost'])
|
|
|
|
?>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
2018-10-16 16:28:42 +00:00
|
|
|
<div class="row">
|
2018-10-27 10:08:54 +00:00
|
|
|
<div class="post-non-content">
|
2018-10-16 16:28:42 +00:00
|
|
|
<a href="<?= base_url('user/' . $post['username']) ?>">
|
|
|
|
<img src="<?= $post['profile_picture'] ?>?w=75" alt="" class="img-fluid rounded-circle">
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
|
2018-10-27 10:08:54 +00:00
|
|
|
<div class="col">
|
2018-10-16 16:28:42 +00:00
|
|
|
<h4>
|
|
|
|
<a href="<?= base_url('user/' . $post['username']) ?>">
|
|
|
|
<?= $post['displayname'] ?>
|
|
|
|
</a>
|
|
|
|
<?php
|
|
|
|
$date_created = strtotime($post['date']);
|
|
|
|
$time_passed = DateTimeHumanizer::difference(new \DateTime(), new \DateTime("@$date_created"), $_SESSION['site_lang']);
|
|
|
|
?>
|
|
|
|
<small>
|
|
|
|
<?= $time_passed ?>
|
|
|
|
</small>
|
|
|
|
</h4>
|
|
|
|
|
|
|
|
<p class="post-content">
|
|
|
|
<?= $post['content'] ?>
|
|
|
|
</p>
|
|
|
|
<?php if (!empty($post['media'])): ?>
|
|
|
|
<div class="post-media-list row">
|
|
|
|
<?php foreach ($post['media'] as $item): ?>
|
|
|
|
<div class="col">
|
|
|
|
<div class="post-media" data-full-image="<?= $item['mediaUrl'] ?>" style="background-image: url(<?= $item['mediaUrl'] ?>?w=500"></div>
|
|
|
|
</div>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
<div class="action-btns">
|
|
|
|
<a href="#" data-uuid="<?= $post['uuid'] ?>" class="action-btn reply-button" data-toggle="tooltip" data-placement="top" title="Antworten">
|
|
|
|
<span><i class="far fa-comment"></i></span>
|
|
|
|
<?= $post['replyCount'] ?>
|
|
|
|
</a>
|
|
|
|
<a href="#" data-uuid="<?= $post['uuid'] ?>" class="action-btn like-button <?= isset($post['userHasLiked']) && $post['userHasLiked'] ? 'active' : '' ?>" data-toggle="tooltip" data-placement="top" title="Gefällt mir">
|
|
|
|
<i class="<?= isset($post['userHasLiked']) && $post['userHasLiked'] ? 'fas' : 'far' ?> fa-heart"></i>
|
|
|
|
<span><?= $post['likeCount'] ?></span>
|
|
|
|
</a>
|
|
|
|
<div class="dropdown d-inline-block">
|
|
|
|
<a href="#" class="action-btn more-options-button" id="postMoreOptionsButton<?= $post['uuid'] ?>" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
|
|
<i class="fa fa-ellipsis-h"></i>
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<div class="dropdown-menu" aria-labelledby="postMoreOptionsButton<?= $post['uuid'] ?>">
|
|
|
|
<a href="#" class="dropdown-item">
|
|
|
|
<i class="fa fa-copy"></i>
|
|
|
|
Link zum Post kopieren
|
|
|
|
</a>
|
|
|
|
<a href="#" class="dropdown-item">
|
|
|
|
<i class="fa fa-flag"></i>
|
|
|
|
Post melden
|
|
|
|
</a>
|
|
|
|
<?php if (isset($_SESSION['user']) && $_SESSION['user']['username'] == $post['username']): ?>
|
|
|
|
<div class="dropdown-divider"></div>
|
|
|
|
<a href="" class="dropdown-item text-danger">
|
|
|
|
<i class="fa fa-trash"></i>
|
|
|
|
Post löschen
|
|
|
|
</a>
|
|
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-10 offset-1">
|
|
|
|
<ul class="comment-list">
|
|
|
|
<?php if ($replies !== NULL && !empty($replies)):
|
|
|
|
foreach ($replies as $reply):
|
|
|
|
$this->load->view('network/posts/post_item', $reply);
|
|
|
|
endforeach; ?>
|
|
|
|
</ul>
|
|
|
|
<?php else: ?>
|
|
|
|
<p class="text-muted">
|
|
|
|
<i class="far fa-frown"></i>
|
2018-10-28 14:33:06 +00:00
|
|
|
<?= lang('post_no_replies') ?>
|
2018-10-16 16:28:42 +00:00
|
|
|
</p>
|
|
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|