%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
| Server IP : 14.207.165.8 / Your IP : 216.73.216.26 Web Server : Apache/2.4.18 (Ubuntu) System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : root ( 0) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/ppaobm/backend/theme/adminlte/mdm/assignment/ |
Upload File : |
<?php
use yii\helpers\Html;
use yii\widgets\Pjax;
use kartik\grid\GridView;
use yii\helpers\Url;
use yii\web\View;
use yii\helpers\ArrayHelper;
use kartik\export\ExportMenu;
use backend\modules\location_center\models\LocationCenter;
/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */
/* @var $searchModel mdm\admin\models\searchs\Assignment */
/* @var $usernameField string */
/* @var $extraColumns string[] */
$this->title = Yii::t('rbac-admin', 'Assignments');
$this->params['breadcrumbs'][] = $this->title;
$columns = [
['class' => 'yii\grid\SerialColumn'],
[
'attribute' => 'username',
'contentOptions' => function ($model) {
return [
'style' => 'cursor:pointer;',
'name' => 'modal-circular-view-button',
'id' => $model['id'],
'onclick' => 'window.location.href = "/admin/assignment/view?id="+(this.id)',
];
},
],
// $usernameField,
[
'attribute' => 'name',
'label' => 'ชื่อ-นามสกุล',
'value' => function ($model) {
$model = \backend\models\Profile::find()->where(['user_id' => $model->id])->one();
return $model->name;
},
'format' => 'html',
'contentOptions' => function ($model) {
return [
'style' => 'cursor:pointer;',
'name' => 'modal-circular-view-button',
'id' => $model['id'],
'onclick' => 'window.location.href = "/admin/assignment/view?id="+(this.id)',
];
},
],
[
'attribute' => 'location_center',
'label' => 'ศูนย์ประสานแผนประจำอำเภอ',
'value' => function ($model) {
$model = \backend\models\Profile::find()->where(['user_id' => $model->id])->one();
$location = backend\modules\location_center\models\LocationCenter::find()->where(['id' => $model->departments])->one();
return $location->name;
},
'format' => 'html',
'contentOptions' => function ($model) {
return [
'style' => 'cursor:pointer;',
'name' => 'modal-circular-view-button',
'id' => $model['id'],
'onclick' => 'window.location.href = "/admin/assignment/view?id="+(this.id)',
];
},
],
];
if (!empty($extraColumns)) {
$columns = array_merge($columns, $extraColumns);
}
$columns[] = [
'class' => 'yii\grid\ActionColumn',
'template' => '{view}'
];
?>
<div class="assignment-index">
<?php if (Yii::$app->user->can('admin') and ( Yii::$app->user->identity->isAdmin == false)) { ?>
<h1>การกำหนดสิทธิให้ User </h1>
<?php } else { ?>
<h1><?= Html::encode($this->title) ?></h1>
<?php } ?>
<?php Pjax::begin(); ?>
<div class="box">
<div class="box-body">
<?=
GridView::widget([
'id' => 'grid-admin-assignment',
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'options' => [
'class' => 'table table-bordered table-striped'
],
'filterRowOptions' => ['class' => 'kartik-sheet-style'],
'layout' => "{items}\n{pager}",
'showPageSummary' => false,
// 'panel' => [
// 'type' => GridView::TYPE_PRIMARY
// ],
'panelTemplate' => '
<div class="panel {type}">
{items}
<div class="clearfix">
{pager}
</div>
<div class="clearfix"></div>
</div>',
'pjax' => true,
'pjaxSettings' => [
'neverTimeout' => true,
'enablePushState' => true,
'options' => ['id' => 'grid-' . Yii::$app->controller->module->id . Yii::$app->controller->action->id,],
],
// 'pager' => Yii::$app->params['pagerX'],
'toolbar' => [
'{export}',
'{toggleData}'
],
'export' => [
'label' => 'ดาว์โหลดเอกสาร',
'fontAwesome' => true,
'showConfirmAlert' => false,
'target' => \kartik\grid\GridView::TARGET_BLANK
],
'exportConfig' => [
\kartik\grid\GridView::EXCEL => false,
],
'responsive' => true,
'responsiveWrap' => false,
'hover' => true,
'headerRowOptions' => ['class' => 'header-table-center',],
'columns' => $columns,
'krajeeDialogSettings' => ['overrideYiiConfirm' => false]
]);
?>
</div>
</div>
<?php Pjax::end(); ?>
</div>