<div class="container"> <div class='col-md-6'> <div class="form-group"> <?php echo $form->field($model_file, 'imageFiles[]')->fileInput(['multiple' => true, 'accept' => 'image/*', 'class' => "file", 'data-upload-url' => '#']); ?> </div> </div> </div> <div class="container"> <div class='col-md-6'> <div class="form-group"> <?php echo $form->field($event, 'calendar_id')->dropDownList(Event::getCalendarOption(), ['prompt' => Yii::t('app', 'Please choose your type')]); ?> </div> </div> </div> <div class="container"> <div class='col-md-6'><?php echo $form->field($event, 'is_public')->checkbox(); ?> </div> </div> <div class="container"> <div class='col-md-6 form-inline align_right'> <p>
/** * @created date 2015/01/13 * * get calendar */ public function actionCalendar() { $this->layout = false; header('Content-type: application/json'); $calendars = array(array('title' => 'Long Event', 'start' => '2016-01-04'), array('title' => 'test test test', 'start' => '2016-01-04'), array('title' => 'test test test', 'start' => '2016-01-04'), array('title' => 'test test test', 'start' => '2016-01-04'), array('title' => 'test test test', 'start' => '2016-01-04'), array('title' => 'test test test', 'start' => '2016-01-04'), array('title' => 'test test test', 'start' => '2016-01-04'), array('title' => 'test test test', 'start' => '2016-01-04'), array('title' => 'test test test', 'start' => '2016-01-04'), array('title' => 'test test test', 'start' => '2016-01-04'), array('title' => 'test test test', 'start' => '2016-04-04')); $tmpEvents = Event::find(['event', 'calendar'])->select(['event.id', 'event.description', 'event.start_datetime', 'event.end_datetime', 'event.name', 'calendar.name'])->asArray()->innerJoin('calendar', 'calendar.id = event.calendar_id')->andWhere(['or', ['event.employee_id' => Yii::$app->user->identity->id], ['event.is_public' => true]])->all(); $events = []; if (!empty($tmpEvents)) { foreach ($tmpEvents as $value) { $events[] = ['id' => $value['id'], 'title' => $value['description'], 'start' => date('Y/m/d', $value['start_datetime']), 'end' => date('Y/m/d', $value['end_datetime'])]; } } echo json_encode($events); // echo json_encode($events); }
?> <div class="tab-pane active" id="tab1"> <div class="accsection"> <div class="topwrap"> <div class="row"> <div class="container"> <h4><?php echo Yii::t('app', 'Department'); ?> </h4> <div class='col-md-6'> <div class="checkbox"> <label> <input type="checkbox" id="checkAll">All</label> </div> <?php echo $form->field($model_department, 'id')->checkboxList(Event::getDepartmentNameCheckBox())->label(false); ?> </div> </div> <div class="container"> <h4><?php echo Yii::t('app', 'Department'); ?> </h4> <div class='col-md-6'> <div ng-controller="list_employee"> <ui-select multiple ng-model="multipleDemo.selectedPeople" theme="select2" ng-disabled="disabled" style="width: 100%;"> <ui-select-match placeholder="Select person..."> <div class="test"> <img alt="{{$item.urlImage}}" src="{{$item.urlImage}}" width="20px">