Файл: storage/framework/views/ef136ec52fb9ce6fd0320721bca26762e32c402f.php
Строк: 131
<?php $__env->startSection('content'); ?>
<script>
function addBB(html)
{
var e = document.getElementById("comment");
if (e != null)
{
if(html == 'color-red') text = '[color=red][/color]';
else if(html == 'color-blue') text = '[color=blue][/color]';
else if(html == 'color-green') text = '[color=green][/color]';
else if(html == 'url') text = '[url=][/url]';
else if(html == 'img') text = '[img][/img]';
else if(html == 'left') text = '[left][/left]';
else if(html == 'center') text = '[center][/center]';
else if(html == 'right') text = '[right][/right]';
e.value += ''+text+'';
e.focus();
}
}
</script>
<div class="box">
<center>Форум / <?php echo e($topic->categoryInfo->name); ?> / <?php echo e($topic->name); ?></center>
<?php $__currentLoopData = $posts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $post): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div class="media">
<div class="media-body">
<h4 class="media-heading">
<?php if($post->authorInfo == null): ?>
<a href="#">Удалён</a>
<?php else: ?>
<a href="/profile/<?php echo e($post->authorInfo->id); ?>"><?php echo e($post->authorInfo->login); ?></a>
<?php endif; ?>
<span class="time pull-right"><?php echo e($post->created_at); ?></span>
</h4>
<?php echo Services::bbcodes($post->text, ($post->authorInfo == null ? null : $post->author)); ?>
<?php if($post->type != 'starter' && Auth::user()->isRole()): ?>
<a href="/forum/post<?php echo e($post->id); ?>/delete"> (del) </a>
<?php endif; ?>
<?php if($post->author == Auth::user()->id): ?>
<a href="/forum/edit<?php echo e($post->id); ?>"> [ред.] </a>
<?php endif; ?>
</div>
</div>
<?php if($loop->iteration == 1 && $loop->count > 1 && $posts->currentPage() == 1): ?>
<br><center><font color="white">Комментарии:</font></center>
<?php endif; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
</div>
<?php if($topic->status == 'open'): ?>
<?php if(Auth::user()->role != 'user'): ?>
<span id="panel">
<center>
<a href="javascript:addBB('color-red')"><button><font color="red">R</font></button></a>
<a href="javascript:addBB('color-green')"><button><font color="green">G</font></button></a>
<a href="javascript:addBB('color-blue')"><button><font color="blue">B</font></button></a>
<font color="black">
<a href="javascript:addBB('url')"><button><font color="black">URL</font></button></a>
<a href="javascript:addBB('img')"><button><font color="black">IMG</font></button></a>
<a href="javascript:addBB('left')"><button><font color="black">L</font></button></a>
<a href="javascript:addBB('center')"><button><font color="black">C</font></button></a>
<a href="javascript:addBB('right')"><button><font color="black">R</font></button></a>
</font>
</center>
</span>
<?php endif; ?>
<div class="box">
<div class="menu">
<center><font color = "#ccd724">У вас <b><?php echo e(Services::viewNumber(Auth::user()->post_points)); ?></b> очк. общения</font></center><br>
<center>
<form action="/forum/top<?php echo e($topic->id); ?>/post" method="post">
<?php echo e(csrf_field()); ?>
<textarea id="comment" name="text" class="form-control vvod-text" rows = "3"></textarea><br>
<input type="submit" class = "btn btn-games2 btn-block" value="Отправить">
</form>
</center>
</div>
<?php else: ?>
<div class="menu">
</div>
<?php endif; ?>
<?php echo e($posts->links()); ?>
<?php if(Auth::user()->isRole()): ?>
<center> <div class="menu">
<a href="/forum/top<?php echo e($topic->id); ?>/delete">Удалить тему</a>
<?php if($topic->author == Auth::user()->id || Auth::user()->isRole()): ?>
<a href="/forum/top<?php echo e($topic->id); ?>/changeStatus"><?php echo e($topic->status == 'open' ? 'Закрыть тему' : 'Открыть тему'); ?></a>
<?php endif; ?>
</div></center>
</div>
<?php endif; ?>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.main', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>