Advertisement
Esforeal

index.php

May 31st, 2016
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.75 KB | None | 0 0
  1. <?php
  2.  
  3. use app\assets\CalendarAsset;
  4. use yii\bootstrap\Modal;
  5. use yii\helpers\Html;
  6. use yii\grid\GridView;
  7. use yii\helpers\Url;
  8.  
  9. /* @var $this yii\web\View */
  10. /* @var $searchModel app\models\EventsSearch */
  11. /* @var $dataProvider yii\data\ActiveDataProvider */
  12.  
  13. $this->title = Yii::t('app', 'Calendar');
  14. $this->params['breadcrumbs'][] = $this->title;
  15.  
  16. CalendarAsset::register($this);
  17. ?>
  18. <div class="events-index">
  19.  
  20.     <h1><?= Html::encode($this->title) ?></h1>
  21.  
  22.     <p>
  23.         <?php
  24.             Modal::begin([
  25.                 'header' => '<h2>Create event</h2>',
  26.                 'id' => 'crEvent',
  27.                 'size' => 'modal-md'
  28.             ]);
  29.  
  30.             echo '<div id="modalContent"></div>';
  31.  
  32.             Modal::end();
  33.         ?>
  34.         <?php
  35.         Modal::begin([
  36.             'header' => '<h2>Edit event</h2>',
  37.             'id' => 'edEvent',
  38.             'size' => 'modal-md'
  39.         ]);
  40.  
  41.         echo '<div id="modalContent"></div>';
  42.  
  43.         Modal::end();
  44.         ?>
  45.     </p>
  46.         <?= \yii2fullcalendar\yii2fullcalendar::widget(array(
  47.                 'clientOptions' => [
  48.                     'height' => 770,
  49.                     'editable' => true,
  50. //                    'hiddenDays' => 7,
  51.                     'minTime' => '08:00',
  52.                     'maxTime' => '19:00',
  53.                     'slotDuration' => '00:15:00',
  54.                     'eventLimit' => true,
  55.                     'allDaySlot' => false,
  56.                     'timezone' => 'local',
  57.                     'timeFormat' => 'HH:mm',
  58.                     'lang' => 'uk',
  59.                     'slotLabelFormat' => 'HH:mm',
  60.                     'scrollTime' => '00:00:30'
  61.                 ],
  62.                 'events'=> $events
  63.         ));
  64.         ?>
  65. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement