コード例 #1
0
ファイル: _form.php プロジェクト: shubnikofff/teleport
<div class="vks-room-form col-md-6">

    <?php 
$form = ActiveForm::begin();
?>

    <?php 
echo $form->field($model, 'name');
?>

    <?php 
echo $form->field($model, 'shortName');
?>

    <?php 
echo $form->field($model, 'companyId')->widget(Select2::className(), ['data' => ViewHelper::items(Company::className(), '_id', 'name')]);
?>

    <?php 
echo $form->field($model, 'ahuConfirmation')->checkbox();
?>

    <?php 
echo $form->field($model, 'confirmPersonId')->widget(Select2::className(), ['data' => $model::confirmPersonList(), 'options' => ['placeholder' => 'Выберите пользователя ...'], 'pluginOptions' => ['allowClear' => true]]);
?>

    <?php 
echo $form->field($model, 'supportEmailsInput');
?>

    <?php 
コード例 #2
0
ファイル: index.php プロジェクト: shubnikofff/teleport
<?php

use yii\helpers\Html;
use yii\grid\GridView;
use common\models\Company;
use common\components\helpers\ViewHelper;
/* @var $this yii\web\View */
/* @var $model \app\models\VksParticipantSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Переговорные комнаты';
?>
<div class="vks-room-index">

    <div class="page-header"><h2><?php 
echo $this->title;
?>
</h2></div>

    <?php 
echo Html::a('<span class="glyphicon glyphicon-plus"></span>', ['create'], ['class' => 'btn btn-sm btn-default']);
?>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $model, 'columns' => ['shortName', ['filter' => ViewHelper::items(Company::className(), '_id', 'name'), 'attribute' => 'companyId', 'value' => 'company.name'], 'ipAddress', 'note:ntext', ['class' => 'yii\\grid\\ActionColumn', 'contentOptions' => ['width' => '70px;']]]]);
?>

</div>