<p><?php echo $item['name']; ?> </p> <span href="<?php echo Url::to(['cabinet_wallet/add', 'id' => $item['id']]); ?> " class="label label-success labelPaid" style="width: 100%" title="<?php echo 'до ' . \Yii::$app->formatter->asDate($item['date_finish']); ?> , осталось <?php echo \cs\services\DatePeriod::diff($item['date_finish']); ?> " >Оплачено</span> </div> <?php } ?> </div> <h2 class="page-header">Заказать</h2> <div class="row col-sm-12"> <?php foreach ($notPaid as $item) {
}, 'columns' => ['id', 'address:text:Адрес', 'phone:text:Телефон', ['header' => 'Пользоватль', 'content' => function ($model, $key, $index, $column) { $arr = []; $arr[] = $model['user_email'] . ' ' . $model['user_name_first'] . ' ' . $model['user_name_last']; return join('', $arr); }], ['header' => 'Время создания', 'content' => function ($model, $key, $index, $column) { $v = \yii\helpers\ArrayHelper::getValue($model, 'date_create', 0); if ($v == 0) { return ''; } return Html::tag('abbr', \cs\services\DatePeriod::back($v, ['isShort' => true]), ['class' => 'gsssTooltip', 'title' => Yii::$app->formatter->asDatetime($v)]); }], ['header' => 'Время последнего ответа', 'content' => function ($model, $key, $index, $column) { $v = \yii\helpers\ArrayHelper::getValue($model, 'last_message_time', 0); if ($v == 0) { return ''; } return Html::tag('abbr', \cs\services\DatePeriod::back($v, ['isShort' => true]), ['class' => 'gsssTooltip', 'title' => Yii::$app->formatter->asDatetime($v)]); }], ['header' => 'Оплачен?', 'content' => function ($item) { $v = \yii\helpers\ArrayHelper::getValue($item, 'is_paid', 0); if ($v == 0) { return Html::tag('span', 'Нет', ['class' => 'label label-default']); } return Html::tag('span', 'Да', ['class' => 'label label-success']); }], ['header' => 'Есть ответ?', 'content' => function ($item) { if ($item['is_answer_from_client'] == 1) { return Html::tag('span', Html::tag('span', null, ['class' => 'glyphicon glyphicon-envelope']), ['class' => 'label label-success']); } }], ['header' => 'Удалить', 'content' => function ($item) { return Html::button('Удалить', ['class' => 'btn btn-danger btn-xs buttonDelete', 'data-id' => $item['id']]); }]]]); ?>
" class="img-circle" width="50" > </span> <div class="chat-body clearfix"> <div class="header"> <strong class="primary-font char-user-name"><?php echo $user->getNameFull(); ?> </strong> <small class="pull-right text-muted chat-datetime" data-time="<?php echo $message->getDateTime(); ?> " title="<?php echo Yii::$app->formatter->asDatetime($message->getDateTime()); ?> "> <i class="glyphicon glyphicon-time"></i> <?php echo \cs\services\DatePeriod::back($message->getDateTime()); ?> </small> </div> <p> <?php echo \cs\helpers\Html::encode($message->getText()); ?> </p> </div> </li>
}) } }); \$('.dateTooltip').tooltip(); JS ); ?> <h1 class="page-header"><?php echo Html::encode($this->title); ?> </h1> <?php echo \yii\grid\GridView::widget(['dataProvider' => new \yii\data\ActiveDataProvider(['query' => \app\models\Registration::query()->select(['cap_registration.*', 'cap_users.avatar as cap_users_avatar', 'cap_users.name_first as cap_users_name_first', 'cap_users.name_last as cap_users_name_last', 'cap_users.name_org as cap_users_name_org', 'cap_users.email as cap_users_email'])->innerJoin('cap_users', 'cap_registration.referal_code = cap_users.referal_code')->orderBy(['cap_registration.datetime' => SORT_DESC]), 'pagination' => ['pageSize' => 20]]), 'tableOptions' => ['class' => 'table table-striped table-hover'], 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['header' => 'Время регистрации', 'content' => function ($model, $key, $index, $column) { return Html::tag('abbr', \cs\services\DatePeriod::back($model['datetime']), ['title' => Yii::$app->formatter->asDatetime($model['datetime'], 'php:d.m.Y в H:i (P)'), 'class' => 'dateTooltip']); }], ['header' => 'Чья ссылка?', 'content' => function ($model, $key, $index, $column) { $arr = []; if ($model['cap_users_avatar']) { $arr[] = Html::img($model['cap_users_avatar'], ['width' => 40, 'style' => 'padding-right: 5px;']); } $arr[] = $model['cap_users_name_first'] . ' ' . $model['cap_users_name_last'] . ' (' . $model['cap_users_email'] . ')'; return join('', $arr); }], ['header' => 'Кто зарегистрировался?', 'content' => function ($model, $key, $index, $column) { return $model['user_id']; }], ['header' => 'Оплатил?', 'content' => function ($model, $key, $index, $column) { if ($model['is_paid']) { return Html::tag('span', 'Да', ['class' => 'label label-success']); } else { return Html::tag('span', 'Нет', ['class' => 'label label-default']); }
?> "><i class="glyphicon <?php echo $icon; ?> "></i></div> <div class="timeline-panel"> <div class="timeline-heading"> <h4 class="timeline-title"><?php echo $header; ?> </h4> <p><small class="text-muted"><i class="glyphicon glyphicon-time"></i> <abbr title="<?php echo Yii::$app->formatter->asDatetime($item['datetime']); ?> " class="timeBack"><?php echo \cs\services\DatePeriod::back($item['datetime']); ?> </abbr></small></p> </div> <?php if ($message != '') { ?> <div class="timeline-body"> <?php echo nl2br($message); ?> </div> <?php } ?> </div>