Esempio n. 1
0
echo Html::beginForm(['window/clear-task', 'id' => $model->id]);
?>
    <?php 
echo Html::submitButton('Clear all tasks');
?>
    <?php 
echo Html::endForm();
?>

    <?php 
echo Html::beginForm(['window/assign-task', 'id' => $model->id]);
?>
    <?php 
echo Html::dropDownList('task_id', null, ArrayHelper::map(Task::find()->all(), 'id', 'name'));
?>
    <?php 
echo Html::submitButton('Assign task');
?>
    <?php 
echo Html::endForm();
?>




    <?php 
echo RecordGridView::widget(['dataProvider' => $recordsDataProvider]);
?>

</div>
Esempio n. 2
0
use yii\helpers\Html;
use yii\jui\DatePicker;
/* @var $this yii\web\View */
/* @var $searchModel app\models\RecordSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Yii::t('app', 'Records');
?>
<div class="record-index">
    <?php 
$form = ActiveForm::begin(['method' => 'get', 'layout' => 'inline', 'fieldConfig' => ['labelOptions' => ['class' => '']]]);
?>
        <?php 
echo $form->field($searchModel, 'dateFrom')->widget(DatePicker::className(), ['dateFormat' => 'yyyy-MM-dd']);
?>
        <?php 
echo $form->field($searchModel, 'dateTo')->widget(DatePicker::className(), ['dateFormat' => 'yyyy-MM-dd']);
?>

        <?php 
echo \yii\bootstrap\Button::widget(['label' => 'Submit', 'options' => ['class' => 'btn-primary']]);
?>
    <?php 
ActiveForm::end();
?>

    <?php 
echo RecordGridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel]);
?>

</div>