%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 49.231.201.246 / Your IP : 216.73.216.149 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 : /proc/11584/root/var/www/html/ppaobm/backend/modules/booking_data/views/bookingdata/ |
Upload File : |
<?php use yii\helpers\Html; //use yii\grid\GridView; use kartik\grid\GridView; use yii\helpers\ArrayHelper; use kartik\export\ExportMenu; use backend\modules\location_center\models\LocationCenter; /* @var $this yii\web\View */ /* @var $searchModel backend\modules\booking_data\models\BookingDataSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = 'รายการขอใช้ห้องประชุมและอาคารสถานที่'; $this->params['breadcrumbs'][] = $this->title; $backend = Yii::getAlias('@back'); $time = time(); ?> <?php $gridColumns = [ [ 'class' => 'kartik\grid\SerialColumn', 'contentOptions' => ['class' => 'kartik-sheet-style'], 'width' => '0.5%', 'header' => '', 'headerOptions' => ['class' => 'kartik-sheet-style'] ], // 'id', [ 'attribute' => 'created_at', 'label' => 'วันที่ขอ', 'hAlign' => 'center', 'width' => '8%', 'vAlign' => 'middle', 'xlFormat' => "mmm\\-dd\\, \\-yyyy", 'format' => 'html', 'filterType' => GridView::FILTER_DATE, 'filterWidgetOptions' => ( [ 'model' => $searchModel, 'type' => 1, 'language' => 'th', 'attribute' => 'created_at', 'convertFormat' => true, 'pluginOptions' => [ 'autoclose' => true, 'format' => 'yyyy-MM-dd', ], ] ), 'headerOptions' => ['class' => 'kv-sticky-column text-center'], 'contentOptions' => function ($model) { return [ 'style' => 'color:#D2691E;font-weight: 500;text-align: center;cursor:pointer;', 'name' => 'modal-circular-view-button', 'id' => $model['id'], 'onclick' => 'window.location.href = "/booking_data/bookingdata/view?id="+(this.id)', ]; }, 'value' => function ($model) { return Yii::$app->thaiFormatter->asDate($model->created_at, 'medium'); }, ], [ 'attribute' => 'location_center_id', 'vAlign' => 'middle', 'width' => '12%', 'headerOptions' => ['class' => 'kv-sticky-column text-center'], 'contentOptions' => function ($model) { return [ 'style' => 'color:#1E90FF;text-align: center;cursor:pointer;overflow: auto;white-space: normal; word-wrap: break-word;', 'id' => $model['id'], 'onclick' => 'window.location.href = "/booking_data/bookingdata/view?id="+(this.id)', ]; }, 'value' => function ($model) { $model = LocationCenter::find()->where(['id' => $model->location_center_id])->one(); return substr($model->name, 96); }, 'filterType' => GridView::FILTER_SELECT2, // 'filter' => ArrayHelper::map(LocationCenter::find()->all(), 'id', 'name'), 'filter' => [ 1 => 'อำเภอเมืองพิษณุโลก', 2 => 'อำเภอบางระกำ', 3 => 'อำเภอบางกระทุ่ม', 4 => 'อำเภอพรหมพิราม', 5 => 'อำเภอวังทอง', 6 => 'อำเภอวัดโบสถ์', 7 => 'อำเภอเนินมะปราง', 8 => 'อำเภอนครไทย', 9 => 'อำเภอชาติตระการ', ], 'filterWidgetOptions' => [ 'options' => ['prompt' => ''], 'pluginOptions' => ['allowClear' => true], ], ], [ 'attribute' => 'name', 'vAlign' => 'middle', 'width' => '15%', 'headerOptions' => ['class' => 'kv-sticky-column text-center'], 'contentOptions' => function ($model) { return [ 'style' => 'color:#1E90FF;text-align: center;cursor:pointer;overflow: auto;white-space: normal; word-wrap: break-word;', 'id' => $model['id'], 'onclick' => 'window.location.href = "/booking_data/bookingdata/view?id="+(this.id)', ]; }, ], [ 'attribute' => 'department_name', 'vAlign' => 'middle', 'width' => '15%', 'headerOptions' => ['class' => 'kv-sticky-column text-center'], 'contentOptions' => function ($model) { return [ 'style' => 'color:#1E90FF;text-align: center;cursor:pointer;overflow: auto;white-space: normal; word-wrap: break-word;', 'id' => $model['id'], 'onclick' => 'window.location.href = "/booking_data/bookingdata/view?id="+(this.id)', ]; }, ], [ 'attribute' => 'title', 'vAlign' => 'middle', 'headerOptions' => ['class' => 'kv-sticky-column text-center'], 'contentOptions' => function ($model) { return [ 'style' => 'color:#1E90FF;text-align: center;cursor:pointer;overflow: auto;white-space: normal; word-wrap: break-word;', 'id' => $model['id'], 'onclick' => 'window.location.href = "/booking_data/bookingdata/view?id="+(this.id)', ]; }, ], [ 'attribute' => 'datein', 'width' => '15%', 'vAlign' => 'middle', 'headerOptions' => ['class' => 'kv-sticky-column text-center'], 'xlFormat' => "mmm\\-dd\\, \\-yyyy", 'format' => 'html', 'filterType' => GridView::FILTER_DATE, 'filterWidgetOptions' => ( [ 'model' => $searchModel, 'type' => 2, 'language' => 'th', 'attribute' => 'datein', 'convertFormat' => true, 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-MM-dd'], ] ), 'contentOptions' => function ($model) { return [ 'style' => 'color:#D2691E;text-align: center;cursor:pointer;overflow: auto;white-space: normal; word-wrap: break-word;', 'id' => $model['id'], 'onclick' => 'window.location.href = "/booking_data/bookingdata/view?id="+(this.id)', ]; }, 'value' => function ($model) { if ($model->datein !== null) { return Yii::$app->thaiFormatter->asDateTime($model->datein, 'php:d M Y เวลา H:i'); } else { return 'ไม่ได้ระบุ'; } }, ], [ 'attribute' => 'tel', 'vAlign' => 'middle', 'width' => '10%', 'headerOptions' => ['class' => 'kv-sticky-column text-center'], 'contentOptions' => function ($model) { return [ 'style' => 'text-align: center;cursor:pointer;overflow: auto;white-space: normal; word-wrap: break-word;', 'id' => $model['id'], 'onclick' => 'window.location.href = "/booking_data/bookingdata/view?id="+(this.id)', ]; }, ], // [ // 'label' => 'จำนวนผู้เข้าชม', // 'vAlign' => 'middle', // 'width' => '7%', // 'mergeHeader' => true, // 'headerOptions' => ['class' => 'kv-sticky-column text-center'], // 'contentOptions' => function ($model) { // return [ // 'style' => 'text-align: center;cursor:pointer', // 'id' => $model['id'], // 'onclick' => 'window.location.href = "/chanpalace/chanpalace/view?id="+(this.id)', // ]; // }, // 'value' => function ($model) { // $data = Chanpalace::find()->where(['id' => $model->id])->one(); // $sum = $data->department_male + $data->department_female; // return $sum; // }, // ], // [ // 'class' => 'kartik\grid\FormulaColumn', // 'header' => '<i class="m-menu__link-icon flaticon-file"></i>', // 'vAlign' => 'middle', // 'width' => '1%', // 'format' => 'raw', // 'value' => function ($model) { // if ($model->filename != null) { // return Html::a('<i class="m-menu__link-icon flaticon-file"></i>', ['@web/files/' . $model->filename], [ // 'data-pjax' => '0', // 'target' => '_blank', // 'data-toggle' => 'tooltip', // 'title' => 'ไฟล์เอกสาร' // ]); // } else { // return '-'; // } // }, // 'headerOptions' => ['class' => 'kartik-sheet-style'], // 'hAlign' => 'center', // 'mergeHeader' => true, // ], [ 'class' => 'kartik\grid\FormulaColumn', 'header' => 'สถานะ', 'vAlign' => 'middle', 'format' => 'raw', 'value' => function ($model) { if ($model->status == 0) { return '<i class="m-menu__link-icon fa fa-minus" style="color:red"></i>'; } if ($model->status == 1) { return '<i class="m-menu__link-icon fa fa-check" style="color:blue"></i>'; } if ($model->status == 2) { return '<i class="m-menu__link-icon fa fa-times" style="color:red"></i>'; } }, 'headerOptions' => ['class' => 'kartik-sheet-style'], 'hAlign' => 'center', 'mergeHeader' => true, ], [ 'class' => 'kartik\grid\ActionColumn', 'header' => 'การจัดการ', 'vAlign' => 'middle', 'template' => '{edit} | {delete}', 'buttons' => [ 'edit' => function ($url, $model, $key) { return Html::a('<span class="glyphicon glyphicon-edit"></span>', ['/booking_data/bookingdata/update', 'id' => $model->id, 'id' => $model->id], [ 'data-pjax' => '0', 'data-toggle' => 'tooltip', 'title' => 'แก้ไขข้อมูลเข้าเยี่ยมชม' ]); }, 'delete' => function ($url, $model, $key) { return Html::a('<span class="glyphicon glyphicon-remove"></span>', ['/booking_data/bookingdata/delete', 'id' => $model->id, 'id' => $model->id], [ 'data-pjax' => '0', 'data' => [ 'confirm' => 'คุณต้องการลบข้อมูลนี้', 'method' => 'post', ], 'data-toggle' => 'tooltip', 'title' => 'ลบข้อมูลรายการขอใช้ห้องประชุมและอาคารสถานที่' ]); }, ], // 'urlCreator' => function($action, $model, $key, $index) { // if ($action === 'delete') { // $url = '/dispatch/dispatch/delete&id='.$model->id; // return $url; // } // }, // 'viewOptions' => ['title' => $viewMsg, 'data-toggle' => 'tooltip'], // 'updateOptions' => ['title' => $updateMsg, 'data-toggle' => 'tooltip'], // 'deleteOptions' => ['title' => 'ลบ', 'data-toggle' => 'tooltip'], ], ]; ?> <div class="content-wrapper"> <section class="content-header"> <h1> <?= Html::encode($this->title) ?> <small>ศูนย์ประสานแผนพัฒนาท้องถิ่นประจำอำเภอ</small> </h1> </section> <section class="content"> <div class="row"> <div class="col-md-12"> <div class="box"> <div class="box-body"> <?= GridView::widget([ 'id' => 'grid-ppaobm', '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' => $gridColumns, 'krajeeDialogSettings' => ['overrideYiiConfirm' => false] ]); ?> </div> </div> </div> </div> </section> </div>