public function location() { //get location from pivot table (vks_store_location) $location = App::$instance->capsule->connection('coreCaDb')->table('vks_store_location')->where('vks_id', $this->id)->first(['location']); //try find it in attendance table // dump(); $tryGetAtt = !AttendanceNew_controller::isLocationString($location['location']) ? CAAttendance::find($location['location']) : false; // dump($tryGetAtt); if (!$tryGetAtt) { return $this->hasOne('CACustomLocation', 'vks_id', 'id'); } else { $this->location = $location['location']; return $this->hasOne('CAAttendance', 'id', 'location'); } }
foreach ($available_points as $attendance) { ?> <div class="checkbox"> <label> <input <?php echo $vks->get('tech_support_att_id') == $attendance['id'] ? 'checked' : ''; ?> name="tech_support_att_id" value="<?php echo $attendance['id']; ?> " type="radio" <?php echo $attendance['selectable'] ? '' : 'disabled'; ?> /> <?php echo AttendanceNew_controller::makeFullPath($attendance['id']); echo $attendance['selectable'] ? '' : ' <span style="font-size: 8px;" class="label label-success">Заявка создана</span>'; ?> </label> </div> <?php } ?> <?php } ?> </div> </div> <div class="col-lg-12"> <div class="form-group"> <label class="no-left-padding">Краткое сообщение для тех. поддержки</label>
<?php ST::deployTemplate('heads/ui_timepicker.inc'); ST::setVarPhptoJS(AttendanceNew_controller::makeStackName(STACK_MULTIPLY), 'stackMultiName'); ST::setVarPhptoJS(1000, 'stackMultiCapacity'); RenderEngine::MenuChanger(); ?> <div class="container" xmlns="http://www.w3.org/1999/html"> <div class="col-md-3"> <div id="blocked-time-list" class="hidden"> </div> <div id="selected-time-list" class="hidden"> </div> </div> <div class="col-md-7 left-border"> <h4 class="text-muted heading-main">Упрощенная заявка на проведение ВКС</h4> <hr> <form id="form1" class="form-horizontal" name="form1" method="post" action="?route=Vks/storeSimple"> <?php echo Token::castTokenField(); ?> <div class="form-group"> <label class="control-label col-lg-4"> Дата: </label> <div class="col-lg-3">
<div class="col-lg-3 left-border padding25"> <h4>Последние сохраненные Тех. поддержки</h4> <hr> <?php if (!count($last_editing)) { ?> <i>Список пуст</i> <?php } else { ?> <ul> <?php foreach ($last_editing as $edited_container) { ?> <li class="li-hover"><?php echo AttendanceNew_controller::makeFullPath($edited_container->attendance->id); ?> <a href="<?php echo ST::route("TechSupport/cloneTechSupport/" . $edited_container->attendance->id . "/" . $attendance->id); ?> " title="Скопировать тех. поддержку из этой точки"><span class="glyphicon glyphicon-duplicate text-info"></span> </a></li> <?php } ?> </ul> <?php } ?> </div>
location.href = "<?php echo App::$instance->opt->appHttpPath; ?> ?route=AttendanceNew/showSchedule/0/" + date + "/" + $this.data('id'); }) }) </script> <div class="pull-left"> <h3 class="text-muted">ВКС походящие <b><?php echo date_create($date)->format("d.m.Y"); ?> </b> в переговорной: <span class="text-success"><?php echo strlen(AttendanceNew_controller::makeFullPath($attendance->id)) ? AttendanceNew_controller::makeFullPath($attendance->id) : 'Корневой контейнер'; ?> </span> </h3> </div> <div class="pull-right"> <h3> <span class="btn-group"> <button type="button" class="btn btn-default disabled">Список</button> <a href="<?php echo ST::route('AttendanceNew/showSchedule/1/' . $date . "/" . $attendance->id); ?> " class="btn btn-default">График</a> </span> </h3>
public function getStackArray($stackName) { $result = []; $c = 0; if (isset($_COOKIE[$stackName]) && !empty($_COOKIE[$stackName])) { foreach (explode("@@DELIM@@", $_COOKIE[$stackName]) as $id) { if (!AttendanceNew_controller::isLocationString($id)) { $result[$c]['path'] = self::fullParentInfo($id); $result[$c]['pathString'] = $this->makePathString(self::fullParentInfo($id)); } else { $result[$c]['pathString'] = $id; } $result[$c]['id'] = $id; $c++; } } return $result; }
public function fillCookieParticipants($cookieName, Vks $vks) { $lsc = new LocalStorage_controller(); $att = new AttendanceNew_controller(); $inner_parp = [array("type" => 3, "counter" => $vks->in_place_participants_count)]; foreach ($vks->participants as $parp) { $inner_parp[] = array('id' => $parp->id, 'parent_id' => $parp->parent_id, 'name' => $parp->name, 'path' => $parp->full_path, "type" => $parp->container, "free" => $att->isFree($parp->id, $vks->start_date_time, $vks->end_date_time, [$vks->id])); } $lsc->setValue($cookieName, $inner_parp); return $inner_parp; }
$(".date-pick").datepicker({ defaultDate: date, dateFormat: "yy-mm-dd", onSelect: function (date) { location.href = "<?php echo App::$instance->opt->appHttpPath; ?> ?route=test/test2/" + date + "/" + requested_participant_id; }, }); }) </script> <div class="pull-left"> <h3 class="text-muted">ВКС в <?php echo AttendanceNew_controller::makeFullPath($attendance->id); ?> на <?php echo date_create($date)->format("d.m.Y"); ?> </h3> </div> <div class="pull-right"> <h3> <span class="btn-group"> <button type="button" class="btn btn-default disabled">Список</button> <a href="<?php echo ST::route('test/test/' . $date . "/" . $attendance->id); ?> " class="btn btn-default">График</a> </span>