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
47
modules/admin/views/accounts/telegram.php
Normal file
47
modules/admin/views/accounts/telegram.php
Normal file
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
|
||||
/* @var $this \yii\web\View */
|
||||
/* @var $model \app\models\Telegram */
|
||||
/* @var $dataProvider \yii\data\ActiveDataProvider */
|
||||
|
||||
use yii\grid\GridView;
|
||||
use yii\helpers\Html;
|
||||
use yii\helpers\Url;
|
||||
use yii\widgets\ActiveForm;
|
||||
use app\models\Telegram;
|
||||
|
||||
$this->title = 'Telegram';
|
||||
|
||||
?>
|
||||
|
||||
<?php $form = ActiveForm::begin(); ?>
|
||||
<?= $form->field($model, 'host')->textInput() ?>
|
||||
<?= $form->field($model, 'port')->textInput() ?>
|
||||
<?= Html::submitButton('Добавить', ['class' => 'btn btn-success']) ?>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
<hr>
|
||||
|
||||
<?= GridView::widget([
|
||||
'dataProvider' => $dataProvider,
|
||||
'columns' => [
|
||||
'id',
|
||||
'host',
|
||||
'port',
|
||||
[
|
||||
'attribute' => 'status',
|
||||
'value' => function (Telegram $model) {
|
||||
return Telegram::getStatusName($model->status);
|
||||
}
|
||||
],
|
||||
'tm_last',
|
||||
[
|
||||
'format' => 'raw',
|
||||
'header' => 'Действия',
|
||||
'value' => function(Telegram $model) {
|
||||
return '<a href="' . Url::to(['accounts/delete-telegram', 'id' => $model->id]) . '" onclick="return confirm(\'Удалить инстанс?\')"><i class="icon-trash"></i></a>';
|
||||
}
|
||||
]
|
||||
]
|
||||
]) ?>
|
Loading…
Add table
Add a link
Reference in a new issue