Пример #1
0
?>
<div class="user-index">

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

    <p>
        <?php 
echo Html::a('Create User', ['create'], ['class' => 'btn btn-success']);
?>
    </p>

    <?php 
$columns = [['class' => 'yii\\grid\\SerialColumn'], 'username', 'email:email', ['attribute' => 'role', 'value' => function ($data) {
    if (isset($data->user_role->role_desc)) {
        return $data->user_role->role_desc;
    } else {
        return 'ไม่ทราบสิทธิ';
        //
    }
}, 'filter' => \yii\helpers\ArrayHelper::map(backend\models\UserRole::find()->all(), 'role_name', 'role_desc')], 'created_at', 'updated_at', ['class' => 'yii\\grid\\ActionColumn']];
echo kartik\grid\GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'pjax' => true, 'pjaxSettings' => ['options' => ['enablePushState' => false]], 'responsive' => true, 'hover' => true, 'panel' => ['before' => ''], 'columns' => $columns]);
?>

</div>
Пример #2
0
<div class="upload-fortythree-index">

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

    <p>
        <?php 
echo Html::a(Yii::t('app', '{modelClass}', ['modelClass' => 'Upload 43 แฟ้ม']), ['create'], ['class' => 'btn btn-success']);
?>
    </p>

    <?php 
echo kartik\grid\GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'floatHeader' => true, 'pjax' => TRUE, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'hospcode', ['attribute' => 'file_name', 'format' => 'raw', 'value' => function ($data) {
    if ($data->note3 === 'import all') {
        return Html::a($data->file_name, array('detail2', 'filename' => $data->file_name));
    }
    return Html::a($data->file_name, array('view', 'id' => $data->id));
}], 'file_size', 'upload_date', 'upload_time', array('attribute' => 'note2', 'label' => 'status', 'value' => function ($data) {
    return $data->note2;
}), array('attribute' => 'note3', 'label' => 'note', 'value' => function ($data) {
    return $data->note3;
})]]);
?>

</div>
Пример #3
0
?>
</b></span>
    Current Process: <span style="background-color: white;margin: 15px"><b><?php 
echo $fnc_name;
?>
</b></span>
    Start Time: <span style="background-color: white;margin: 15px"><b><?php 
echo $fnc_time;
?>
</b></span>
</div>
<br>


<?php 
echo kartik\grid\GridView::widget(['dataProvider' => $dataProvider, 'pjax' => true, 'pjaxSettings' => ['options' => ['enablePushState' => false]], 'responsive' => true, 'hover' => true, 'panel' => []]);
Pjax::end();
?>

<?php 
$script = <<<JS
\$(document).ready(function() {
    setInterval(function(){ \$("#refreshButton").click(); }, 5000);
});

setInterval(function () {
    \$("#divtoBlink").css("background-color", function () {
        this.switch = !this.switch
        return this.switch ? "yellow" : "white"
    });
}, 1000)