public static function defaultColumns()
 {
     return ['subject' => ['attribute' => 'subject', 'format' => 'raw', 'filterInputOptions' => ['style' => 'width:100%', 'class' => 'form-control'], 'value' => function ($model) {
         $ava = Html::tag('div', Gravatar::widget(['emailHash' => $model->author_email, 'defaultImage' => 'identicon', 'options' => ['alt' => Yii::t('hipanel:ticket', 'Avatar for {login}', ['login' => $model->author]), 'class' => 'img-circle'], 'size' => 40]), ['class' => 'pull-right']);
         $isClosed = $model->state === Thread::STATE_CLOSE;
         $titleLink = Html::a($model->subject, $model->threadUrl, ['class' => 'text-bold', 'style' => $isClosed ? 'color: black!important;' : '']) . Topic::widget(['topics' => $model->topics]) . Html::tag('div', sprintf('#%s %s %s', $model->id, Html::tag('span', Yii::t('hipanel:ticket', $model->state_label), ['class' => 'text-bold']), Yii::$app->formatter->asDatetime($model->create_time)), ['class' => 'text-muted']);
         return $ava . Html::tag('div', $titleLink);
     }], 'author_id' => ['class' => ClientColumn::class, 'label' => Yii::t('hipanel:ticket', 'Author'), 'idAttribute' => 'author_id', 'sortAttribute' => 'author', 'attribute' => 'author_id', 'value' => function ($model) {
         return ClientSellerLink::widget(compact('model'));
     }], 'responsible_id' => ['class' => ClientColumn::class, 'idAttribute' => 'responsible_id', 'sortAttribute' => 'responsible', 'attribute' => 'responsible_id', 'clientType' => ['admin', 'seller', 'manager'], 'value' => function ($model) {
         return Html::a($model['responsible'], ['/client/client/view', 'id' => $model->responsible_id]);
     }, 'visible' => Yii::$app->user->can('support')], 'recipient_id' => ['class' => ClientColumn::class, 'idAttribute' => 'recipient_id', 'label' => Yii::t('hipanel:ticket', 'Recipient'), 'sortAttribute' => 'recipient', 'attribute' => 'recipient_id', 'value' => function ($model) {
         return Html::a($model->recipient, ['/client/client/view', 'id' => $model->recipient_id]);
     }, 'visible' => Yii::$app->user->can('support')], 'answer_count' => ['attribute' => 'answer_count', 'label' => Yii::t('hipanel:ticket', 'Answers'), 'format' => 'raw', 'filter' => false, 'enableSorting' => false, 'value' => function ($model) {
         $answerCount = Html::tag('span', $model->answer_count, ['class' => 'label label-default', 'title' => Yii::t('hipanel:ticket', 'Ticket contains {n, plural, one{# answer} other{# answers}}', ['n' => $model->answer_count])]);
         $lastAnswer = Html::a($model->replier, ['@client/view', 'id' => $model->replier_id], ['class' => '']) . '<br>' . Html::tag('span', Yii::$app->formatter->asRelativeTime($model->reply_time), ['style' => 'font-size: smaller;white-space: nowrap;', 'class' => 'text-muted']) . '&nbsp;&nbsp;' . $answerCount;
         return $lastAnswer;
     }, 'contentOptions' => ['class' => 'answer']], 'actions' => ['class' => MenuColumn::class, 'menuClass' => TicketActionsMenu::class]];
 }
<?php

use hipanel\modules\ticket\models\Thread;
use hipanel\widgets\ClientSellerLink;
use hipanel\widgets\Gravatar;
use yii\helpers\Html;
/* @var \hipanel\modules\client\models\Client $client */
$answerId = 'answer-' . $answer->answer_id;
echo Html::beginTag('div', ['class' => $answer->is_answer ? 'comment answer' : 'comment', 'id' => $answerId]);
echo Gravatar::widget(['email' => $answer->email_hash, 'options' => ['alt' => $answer->author, 'class' => 'comment-avatar'], 'size' => 32]);
echo Html::beginTag('div', ['class' => 'comment-body']);
echo Html::beginTag('div', ['class' => 'comment-text']);
?>
<div class="comment-heading" xmlns="http://www.w3.org/1999/html">
    <?php 
echo ClientSellerLink::widget(['model' => new \yii\base\DynamicModel(['client_id' => $answer->author_id, 'client' => $answer->author, 'seller_id' => $answer->seller_id, 'seller' => $answer->author_seller]), 'clientAttribute' => 'client', 'clientIdAttribute' => 'client_id', 'sellerAttribute' => 'seller', 'sellerIdAttribute' => 'seller_id']);
?>
    &nbsp;·&nbsp;
    <?php 
echo Html::tag('span', Yii::$app->formatter->asDatetime($answer->create_time));
?>
    <?php 
echo $answer->ip ? "&nbsp;·&nbsp;" . Html::tag('span', 'IP: ' . $answer->ip) : '';
?>
    <?php 
$country_name = Yii::$app->geoip->ip($answer->ip)->country;
if ($country_name) {
    print "&nbsp;·&nbsp;" . Html::tag('span', Yii::t('hipanel:ticket', 'Country') . ': ' . $country_name);
}
?>
    &nbsp;·&nbsp;
use hipanel\helpers\Url;
use hipanel\widgets\Gravatar;
use yii\helpers\Html;
use yii\widgets\Pjax;
Pjax::begin(array_merge(Yii::$app->params['pjax'], ['id' => 'ticketSubscribeButton', 'enablePushState' => false, 'clientOptions' => ['type' => 'POST', 'data' => ["{$model->formName()}[id]" => $model->id]]]));
if (is_array($model->watchers)) {
    echo Html::tag('p', Yii::t('hipanel:ticket', 'Watchers'), ['class' => 'lead', 'style' => 'border-bottom: 1px solid #E1E1E1; margin-bottom: 0.5em;']);
    ?>
    <div class="margin-bottom">
        <?php 
    foreach ($model->watchers as $watcherId => $watcher) {
        $piece = explode(' ', $watcher);
        $watcherEmailHash = array_pop(explode(' ', $watcher));
        if ($watcherEmailHash) {
            echo Html::beginTag('a', ['href' => Url::toRoute(['@client/view', 'id' => $watcherId])]);
            echo Gravatar::widget(['emailHash' => $watcherEmailHash, 'options' => ['class' => 'img-circle', 'title' => reset($piece), 'alt' => reset($piece)], 'size' => 32]);
            echo Html::endTag('a');
        }
    }
    ?>
    </div>
<?php 
}
$subscribed = array_key_exists(Yii::$app->user->identity->id, $model->watchers ?: []);
if ($subscribed) {
    $action = ['unsubscribe', 'id' => $model->id];
    $label = '<i class="fa fa-eye-slash"></i>&nbsp;&nbsp;' . Yii::t('hipanel:ticket', 'Unsubscribe');
} else {
    $action = ['subscribe', 'id' => $model->id];
    $label = '<i class="fa fa-eye"></i>&nbsp;&nbsp;' . Yii::t('hipanel:ticket', 'Subscribe');
}