// echo $this->render('_search', ['model' => $searchModel]); ?> <p> <?php echo Html::a(Yii::t('app', 'เพิ่มรายการกิจกรรม'), ['create'], ['class' => 'btn btn-success']); ?> </p> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'rowOptions' => function ($model) { if ($model->patient_flag == 1) { return ['class' => 'info']; } else { return []; } }, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'date', 'value' => 'date', 'options' => ['class' => 'col-md-3'], 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'date', 'language' => 'th', 'options' => ['placeholder' => 'เลือกวันที่'], 'pluginOptions' => ['format' => 'yyyy-mm-dd', 'todayHighlight' => true, 'autoclose' => true]]), 'format' => 'html'], ['attribute' => 'period', 'filter' => NurseEvent::itemAlias('shift'), 'value' => function ($model) { return $model->shiftName; }], ['value' => function ($model) { return Html::a('เพิ่มข้อมูลผู้ป่วย', ['nurse-patient/create', 'event_ref' => $model->ref], ['class' => 'btn btn-default btn-block']); }, 'format' => 'html'], ['value' => function ($model) { return Html::a('เพิ่มข้อมูล Staff Mix', ['nurse-staffevent/create', 'event_ref' => $model->ref], ['class' => 'btn btn-default btn-block']); }, 'format' => 'html'], ['value' => function ($model) { return Html::a('พิมพ์ใบมอบหมายงาน', ['nurse-patient/assign-report', 'event_ref' => $model->ref], ['target' => '_blank', 'class' => 'btn btn-primary btn-block']); }, 'format' => 'raw'], ['value' => function ($model) { return Html::a('พิมพ์ใบรายชื่อผู้ป่วย', ['nurse-patient/daily-report', 'event_ref' => $model->ref], ['target' => '_blank', 'class' => 'btn btn-default btn-block']); }, 'format' => 'raw'], ['class' => 'yii\\grid\\ActionColumn', 'header' => 'ลบ', 'template' => '{delete}']]]); ?> </div>