mirror of
https://github.com/janickiy/yii2-nomer
synced 2025-03-09 15:39:59 +00:00
add files to project
This commit is contained in:
commit
5cac498444
3729 changed files with 836998 additions and 0 deletions
34
modules/admin/views/reposts/index.php
Normal file
34
modules/admin/views/reposts/index.php
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
/* @var $this \yii\web\View */
|
||||
/* @var $dataProvider \yii\data\ActiveDataProvider */
|
||||
|
||||
use yii\grid\GridView;
|
||||
use yii\helpers\Html;
|
||||
|
||||
?>
|
||||
|
||||
<?= GridView::widget([
|
||||
'dataProvider' => $dataProvider,
|
||||
'rowOptions' => function(\app\models\Repost $model) {
|
||||
if ($model->status == 0) return ['class' => 'danger'];
|
||||
return [];
|
||||
},
|
||||
'columns' => [
|
||||
"id",
|
||||
"tm",
|
||||
[
|
||||
"attribute" => "user_id",
|
||||
"content" => function(\app\models\Repost $model) {
|
||||
return Html::a($model->user->email, ["users/view", "id" => $model->user_id]);
|
||||
}
|
||||
],
|
||||
[
|
||||
"attribute" => "vk_id",
|
||||
"content" => function(\app\models\Repost $model) {
|
||||
$link = "https://vk.com/id".$model->vk_id;
|
||||
return Html::a($link, $link);
|
||||
}
|
||||
],
|
||||
"sms_count",
|
||||
]
|
||||
]) ?>
|
Loading…
Add table
Add a link
Reference in a new issue