<?php
/**
 * @var $model \app\models\base\Comments
 */

use app\models\News;

if($model instanceof \app\models\base\Comments):
?>
<li class="header-comments__item">
    <a href="<?=($model->post instanceof News)?$model->post->url:"#"?>" class="">
        <div class="header-comments-item">
            <div class="header-comments-item__top">
                <div class="header-comments-item__text">
                    <?=$model->message?>
                </div>
            </div>
            <div class="header-comments-item__bottom">
                <div class="header-comments-item__title">
                    <?=($model->post instanceof News)?$model->post->title:"Новость не найдена"?>
                </div>
                <div class="header-comments-item__time">
                    <?=($model->post instanceof News)?$model->post->publishedAt:$model->publishedAt?>
                </div>
            </div>
        </div>
    </a>
</li>
<?php
 endif;
?>
