add holiday calendar

This commit is contained in:
vladrigos
2020-08-05 14:03:45 +03:00
parent 38069c57d4
commit 1a3d74ee39
4 changed files with 61 additions and 1 deletions

View File

@ -0,0 +1,31 @@
<?php
use yii\data\ActiveDataProvider;
use yii\helpers\Html;
use yii\jui\DatePicker;
use yii\web\View;
/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Отпуска';
$this->params['breadcrumps'][] = $this->title;
?>
<?= Html::a('Назад', ['index'], ['class' => 'btn btn-success']) ?>
<div class="holiday-calendar">
<?= \edofre\fullcalendarscheduler\FullcalendarScheduler::widget([
'header' => [
'left' => 'today prev,next',
'center' => 'title',
],
'clientOptions' => [
'now' => date("Y/m/d"),
'editable' => false,
'aspectRatio' => 2.4,
'scrollTime' => '00:00', // undo default 6am scrollTime
'defaultView' => 'month',
],
'events' => $events,
]);
?>
</div>

View File

@ -14,6 +14,7 @@ $this->params['breadcrumps'][] = $this->title;
<div class="holiday-index">
<p>
<?= Html::a('Добавить', ['create'], ['class' => 'btn btn-success']) ?>
<?= Html::a('Календарь', ['calendar'], ['class' => 'btn btn-success']) ?>
</p>
<?= \yii\grid\GridView::widget([
'dataProvider' => $dataProvider,