<?php
/**
 * @var $model \app\models\News
 * @var $index integer
 */
?>
<h3>
    <?=\yii\helpers\Html::a($model->title,$model->url);?>
    <div class="published_at">
        <?=($model->dt_pub<date("Y-m-d H:i:s",strtotime("-1 day")))?date("d.m.Y H:i",strtotime($model->dt_pub)):$model->publishedAt?>
        <?php
        $count=$model->getCommentsAll()->count();
        ?>
        <?php if($count>0):?>
            <span class="commnets">&nbsp;<svg class="icon icon-comments"><use xlink:href="/svg/symbol/sprite-clear.svg#comments"></use></svg><?=$count?></span>
        <?php endif;?>
    </div>
</h3>

