Example #1
0
$this->title = Yii::t('app', 'Dota Players');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="dota-player-index">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

    <p>
        <?php 
echo Html::a(Yii::t('app', 'Create Dota Player'), ['create'], ['class' => 'btn btn-success']);
?>
        <?php 
echo Html::a(Yii::t('app', 'Import'), ['import'], ['class' => 'btn btn-primary']);
?>
    </p>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'account_id', 'steamid', 'personaname', 'realname', ['attribute' => 'team', 'format' => 'text', 'content' => function ($data) {
    return $data->teamName;
}, 'filter' => DotaTeam::getTeamsListDropDown()], ['attribute' => 'status', 'format' => 'text', 'content' => function ($data) {
    return $data->statusName;
}, 'filter' => DotaPlayer::getStatusValuesList()], ['class' => 'yii\\grid\\ActionColumn', 'headerOptions' => ['width' => '75']]]]);
?>

</div>
Example #2
0
<?php

use yii\web\View;
use common\models\dota\DotaTeam;
//use dosamigos\multiselect\MultiSelect;
\common\assets\ChoosenSelectAsset::register($this);
$js = "jQuery('.chosen_select').chosen();";
$this->registerJs($js, View::POS_READY, 'form-teams');
?>
<br>

<div class="form-group">
	<?php 
echo $form->field($model, 'team_ids')->dropDownList(DotaTeam::getTeamsListDropDown(), [$model->team_ids, 'class' => 'chosen_select', 'multiple' => true, 'data-placeholder' => 'Укажите команды', 'style' => 'width:100%;min-height:30px;']);
?>
</div>


Example #3
0
?>

    <?php 
echo $form->field($model, 'firstname')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'lastname')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'middlename')->textInput(['maxlength' => true]);
?>
    
	<?php 
echo $form->field($model, 'team_id')->dropDownList(DotaTeam::getTeamsListDropDown(), [$model->team_id, 'prompt' => '-- Select --']);
?>

    <?//= $form->field($model, 'profileurl')->textInput(['maxlength' => true]) ?>

    <?//= $form->field($model, 'timecreated')->textInput() ?>

    <?//= $form->field($model, 'avatar')->textInput(['maxlength' => true]) ?>

    <?//= $form->field($model, 'avatarmedium')->textInput(['maxlength' => true]) ?>

    <?//= $form->field($model, 'avatarfull')->textInput(['maxlength' => true]) ?>

    <?//= $form->field($model, 'country_id')->textInput() ?>
    <?php 
echo $form->field($model, 'country_id')->dropDownList(Country::getLeaguesListDropDown(), [$model->country_id]);