%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/eoffice/frontend/modules/chanpalace/views/default/ |
Upload File : |
<?php
use yii\helpers\Html;
use yii\helpers\Url;
//use yii\grid\GridView;
use kartik\grid\GridView;
use yii\helpers\ArrayHelper;
use backend\modules\chanpalace\models\Chanpalace;
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\chanpalace\models\ChanpalaceSreach */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'ศูนย์ประวัติศาสตร์พระราชวังจันทน์';
$this->params['breadcrumbs'][] = $this->title;
$backend = Yii::getAlias('@back');
$time = time();
?>
<?php
$JSEventMouseover = <<<EOF
// function(event, jsEvent, element) {
// $(this).popover({
// placement: 'auto',
// trigger: 'hover',
// animation: false,
// html: true,
// title: event.nonstandard.datein,
// content: "<div style='text-align:center;'>"+event.title+"</div>",
// container: 'body',
// }).popover('toggle');
//
// }
function(event, jsEvent, element) {
$(this).popover({
placement: 'auto',
trigger: 'hover',
animation: false,
html: true,
title: "<div style='text-align:center;'>"+event.nonstandard.datein+"</div>",
content: "<div style='text-align:center;'>"+event.title+"</div>",
container: 'body',
}).popover('toggle');
}
EOF;
$JSDayRender = <<<EOF
function(date, cell) {
var theDate = $(cell).data('date');
var fcDaySkel = $("#calendar div.fc-bg td[data-date='"+theDate+"'].fc-day");
fcDaySkel.attr("id","1");
}
EOF;
$JSEventRender = <<<EOF
function(event, element) {
element.find(".fc-title").html(event.title);
element.find(".fc-time").html('');
}
EOF;
?>
<?php
$gridColumns = [
// [
// 'class' => 'kartik\grid\SerialColumn',
// 'contentOptions' => ['class' => 'kartik-sheet-style'],
// 'width' => '36px',
// 'header' => '',
// 'headerOptions' => ['class' => 'kartik-sheet-style']
// ],
[
'attribute' => 'dateon',
'label' => 'วันที่ขอ',
'hAlign' => 'center',
'width' => '10%',
'vAlign' => 'middle',
'xlFormat' => "mmm\\-dd\\, \\-yyyy",
'format' => 'html',
'filterType' => GridView::FILTER_DATE,
'filterWidgetOptions' => (
[
'model' => $searchModel,
'type' => 2,
'language' => 'th',
'attribute' => 'dateon',
'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 = "/chanpalace/default/view?id="+(this.id)',
];
},
'value' => function ($model) {
return Yii::$app->formatter->asDate($model->dateon, 'long');
},
],
[
'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 = "/chanpalace/default/view?id="+(this.id)',
];
},
],
[
'attribute' => 'department_in',
'vAlign' => 'middle',
'headerOptions' => ['class' => 'kv-sticky-column text-center'],
'contentOptions' => function ($model) {
return [
'style' => 'color:#1E90FF;font-weight: 600;text-align: center;cursor:pointer;overflow: auto;white-space: normal; word-wrap: break-word;',
'id' => $model['id'],
'onclick' => 'window.location.href = "/chanpalace/default/view?id="+(this.id)',
];
},
],
[
'attribute' => 'datein',
'vAlign' => 'middle',
'width' => '20%',
'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 = "/chanpalace/default/view?id="+(this.id)',
];
},
'value' => function ($model) {
if ($model->datein !== null) {
return Yii::$app->formatter->asDateTime($model->datein, 'php:วันที่ d F พ.ศ. 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 = "/chanpalace/default/view?id="+(this.id)',
];
},
],
[
'label' => 'จำนวนผู้เข้าชม',
'vAlign' => 'middle',
'width' => '5%',
'mergeHeader' => true,
'headerOptions' => ['class' => 'kv-sticky-column text-center'],
'contentOptions' => function ($model) {
return [
'style' => 'color:#D2691E;font-weight: bold;text-align: center;cursor:pointer',
'id' => $model['id'],
'onclick' => 'window.location.href = "/chanpalace/default/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>', '@back/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' => 'สถานะ',
'width' => '1%',
'vAlign' => 'middle',
'format' => 'raw',
'value' => function ($model) {
if ($model->status != 0) {
return '<i class="m-menu__link-icon fa fa-check" style="color:blue"></i>';
} else {
return '<i class="m-menu__link-icon fa fa-minus" style="color:red"></i>';
}
},
'headerOptions' => ['class' => 'kartik-sheet-style'],
'hAlign' => 'center',
'mergeHeader' => true,
],
];
?>
<div class="chanpalace-index">
<div class="body-content">
<div class="m-divider m--padding-bottom-20">
<span></span>
<h3 class="bg-light m--padding-20"><?= Html::encode($this->title) ?></h3>
<span></span>
</div>
<div class="alert m-alert--default" role="alert" style="text-align: center">
<?= Html::a('<strong>เว็บไซต์</strong> ศูนย์ประวัติศาสตร์พระราชวังจันทน์ https://chanpalaceform.ppao.go.th', 'https://chanpalaceform.ppao.go.th', ['target' => '_blank']); ?>
</div>
<div class="row">
<div class="row">
<div class="col-md-6">
<div class="m-portlet" id="m_portlet1">
<div class="m-portlet__head">
<div class="m-portlet__head-caption">
<div class="m-portlet__head-title">
<span class="m-portlet__head-icon">
<i class="flaticon-calendar"></i>
</span>
<h3 class="m-portlet__head-text">
ปฏิทินการเข้าเยี่ยมชมศูนย์ประวัติศาสตร์พระราชวังจันทน์
</h3>
</div>
</div>
</div>
<div class="m-portlet__body" id="calendar-booking">
<?=
edofre\fullcalendar\Fullcalendar::widget([
'options' => [
'id' => 'calendar',
'language' => 'th',
'class' => 'fc fc-unthemed fc-ltr',
],
'header' => [
'left' => 'prev,next',
'right' => 'title',
'center' => '',
],
'clientOptions' => [
'contentHeight' => 'auto',
'defaultView' => 'month',
// 'dayClick' => new \yii\web\JsExpression($JSDayClick),
// 'dayRender' => new \yii\web\JsExpression($JSDayRender),
// 'eventClick' => new \yii\web\JsExpression($JSEventClick),
'eventMouseover' => new \yii\web\JsExpression($JSEventMouseover),
'eventRender' => new \yii\web\JsExpression($JSEventRender),
],
'events' => Url::to(['default/jsoncalendar']),
'theme' => true,
]);
?>
</div>
</div>
</div>
<div class="col-md-6">
<div class="m-portlet" id="m_portlet2">
<div class="m-portlet__head">
<div class="m-portlet__head-caption">
<div class="m-portlet__head-title">
<span class="m-portlet__head-icon">
<i class="flaticon-calendar"></i>
</span>
<h3 class="m-portlet__head-text">
การเข้าเยี่ยมชมศูนย์ประวัติศาสตร์พระราชวังจันทน์ประจำสัปดาห์
</h3>
</div>
</div>
</div>
<div class="m-portlet__body">
<?=
edofre\fullcalendar\Fullcalendar::widget([
'options' => [
'id' => 'calendar2',
'language' => 'th',
'class' => 'fc fc-unthemed fc-ltr',
],
'header' => [
'left' => 'prev,next',
'right' => 'title',
'center' => '',
],
'clientOptions' => [
'defaultView' => 'listWeek',
// 'dayClick' => new \yii\web\JsExpression($JSDayClick),
'dayRender' => new \yii\web\JsExpression($JSDayRender),
// 'eventClick' => new \yii\web\JsExpression($JSEventClick),
'eventMouseover' => new \yii\web\JsExpression($JSEventMouseover),
// 'eventRender' => new \yii\web\JsExpression($JSEventRender),
],
'events' => Url::to(['default/jsoncalendar']),
'theme' => true,
]);
?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="m-portlet m-portlet--mobile">
<?=
GridView::widget([
'id' => 'grid-' . Yii::$app->controller->module->id . Yii::$app->controller->action->id,
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'options' => [
'class' => 'm-datatable__table table table-bordered'
],
'filterRowOptions' => ['class' => 'kartik-sheet-style'],
'layout' => "{items}\n{pager}",
'showPageSummary' => false,
'panel' => [
'type' => GridView::TYPE_PRIMARY
],
'panelTemplate' => '
<div class="m_datatable m-datatable m-datatable--default m-datatable--loaded panel {type}">
{items}
<div class="m-datatable__pager m-datatable--paging-loaded 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>