85 lines
4.0 KiB
PHP
85 lines
4.0 KiB
PHP
<div id="accordion" class="card">
|
|
<?php $__currentLoopData = $posts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $date => $postsForDate): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
|
<div class="card-header" id="heading<?php echo e($loop->index); ?>">
|
|
<h4 class="mb-0">
|
|
<a class="btn" data-toggle="collapse" data-target="#collapse<?php echo e($loop->index); ?>" aria-expanded="true" aria-controls="collapse<?php echo e($loop->index); ?>">
|
|
<?php if($date >= Carbon::now()): ?>
|
|
<?php echo e(Date::diffInDaysString($postsForDate[0]->date)); ?>
|
|
|
|
<?php else: ?>
|
|
<?php echo e(Date::diffInDaysString($postsForDate[0]->date)); ?>
|
|
|
|
<?php endif; ?>
|
|
</a>
|
|
<span class="badge badge-primary badge-pill badge-danger pull-right"><?php echo e(count($postsForDate)); ?></span>
|
|
</h4>
|
|
</div>
|
|
|
|
<div id="collapse<?php echo e($loop->index); ?>" class="collapse <?php if($loop->index == $page): ?> show <?php endif; ?>" aria-labelledby="headingOne" data-parent="#accordion" data-page="<?php echo e(($loop->index + 1)); ?>">
|
|
<div class="card-body">
|
|
<table class="w-100">
|
|
<tbody>
|
|
<?php $__currentLoopData = $postsForDate; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $post): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
|
<?php
|
|
if(isset($post->state))
|
|
{
|
|
$platforms = $post->platforms;
|
|
$date = $post->date;
|
|
$post = $post->post;
|
|
$post->date = $date;
|
|
$post->platforms = $platforms;
|
|
}
|
|
?>
|
|
<tr>
|
|
<td>
|
|
<a href="#" title="<?php echo app('translator')->getFromJson("admin.details"); ?>"><i class="fa fa-info show-modal" data-id="<?php echo e($post->id); ?>" data-type="<?php echo e($post->type); ?>"></i></a>
|
|
<?php if(Access::hasAnyEditPermission($post->type, $post->user_id)): ?>
|
|
<a href="#" title="<?php echo app('translator')->getFromJson("admin.edit"); ?>"><i class="fa fa-edit edit-modal" data-id="<?php echo e($post->id); ?>" data-type="<?php echo e($post->type); ?>"></i></a>
|
|
<?php endif; ?>
|
|
<h5 class="d-inline">
|
|
<?php if(count($post->tag('abteilung'))): ?>
|
|
<?php echo e($post->tag('abteilung')[0]->name); ?>
|
|
|
|
<?php endif; ?>
|
|
: <?php echo e(ucfirst($post->type)); ?>
|
|
|
|
</h5>
|
|
</td>
|
|
<td class="pull-right">
|
|
<?php
|
|
$platforms = explode(",", $post->platforms);
|
|
?>
|
|
<?php $__currentLoopData = $platforms; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $platform): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
|
<?php if($platform == 'facebook'): ?>
|
|
<a href="<?php echo e(URL::Facebook($post)); ?>" target="_blank" title="Facebook">
|
|
<i class="fab fa-facebook" title="Veröffentlichung auf Facebook"></i>
|
|
</a>
|
|
<?php elseif($platform == 'twitter'): ?>
|
|
<a href="<?php echo e(URL::Twitter($post)); ?>" target="_blank" title="Twitter">
|
|
<i class="fab fa-twitter" title="Veröffentlichung auf Twitter"></i>
|
|
</a>
|
|
<?php elseif($platform == 'stadtanzeiger'): ?>
|
|
<i class="fa fa-book" title="<?php echo app('translator')->getFromJson("messages.publication in news"); ?>"></i>
|
|
<?php endif; ?>
|
|
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2">
|
|
<strong><?php echo e(Post::getSocialMediaTitle($post)); ?></strong>
|
|
<p>
|
|
<?php if(isset($post->previewDocument->filename)): ?>
|
|
<img class="img-fluid float-left mr-2 mb-2" width="200px" src="<?php echo e(Post::getPreviewThumbWebPath($post)); ?>" alt="">
|
|
<?php endif; ?>
|
|
<?php echo Post::getSocialMediaDescription($post); ?>
|
|
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
|
</div>
|