コード例 #1
0
 public function init()
 {
     parent::init();
     $this->modules = ['raspisanie' => RaspisanieModule::className(), 'potok' => PotokModule::className()];
     $this->activeRelationMap = [\app\records\FizLico::className() => FizLico::className(), \app\records\Kurs::className() => Kurs::className(), \app\records\RabotaFizLica::className() => RabotaFizLica::className()];
 }
コード例 #2
0
ファイル: DayData.php プロジェクト: tsyrya/mybriop
 /**
  * @return ActiveQuery
  */
 private function createQuery()
 {
     $query = $this->kurs->getZanyatiya_rel()->where(['>=', 'data', $this->kurs->raspisanie_nachalo])->andWhere(['<=', 'data', $this->kurs->raspisanie_konec])->orderBy(['data' => SORT_ASC, 'nomer' => SORT_ASC]);
     return $query;
 }
コード例 #3
0
ファイル: spisok.php プロジェクト: tsyrya/mybriop
}], ['header' => 'О курсе', 'format' => 'html', 'value' => function () {
    return Html::a('показать', '#', ['class' => 'sub-row-switch']);
}], ['format' => 'html', 'value' => function ($kurs) {
    /**
     * @var $kurs KursExtended
     */
    return Html::a("Список слушателей ({$kurs->zapisanoSlushatelej}/{$kurs->raschitanoSlushatelej})", ['/spisok-slushatelej/slushatel/index', 'kurs' => $kurs->id], ['class' => 'btn btn-default']);
}], ['format' => 'raw', 'value' => function ($kurs) {
    /* @var $kurs KursExtended */
    $editLinkClass = '';
    if ($kurs->statusProgrammy == StatusProgrammyKursa::ZAVERSHENA) {
        $editLinkClass = ' hidden';
    }
    $result = Html::a('Редактор', ['/kurs/edit', 'id' => $kurs->id], ['class' => 'btn btn-primary' . $editLinkClass]) . Html::tag('p', '', ['class' => $editLinkClass]) . Html::button('Сделать копию', ['class' => 'btn btn-primary', 'ng-click' => 'main.copyProgram(' . $kurs->id . ')']) . Html::tag('p') . Html::button('Удалить программу', ['class' => 'btn btn-primary', 'ng-click' => 'main.deleteProgram(' . $kurs->id . ')']);
    /* @var $kurs2 Kurs */
    $kurs2 = Kurs::findOne($kurs->id);
    if ($kurs2 && $kurs2->allowsZanyatiyaChange()) {
        $raspBtn = Html::a('Расписание', ['/upravlenie-kursami/raspisanie/zanyatie', 'kurs' => $kurs->id], ['class' => 'btn btn-primary']);
        $result .= Html::tag('p') . $raspBtn;
    }
    return $result;
}]]]);
$years = ArrayHelper::map(\app\entities\Kurs::find()->select(['EXTRACT(YEAR FROM plan_prospekt_god) as year'])->distinct()->orderBy('year')->where(['rukovoditel' => Yii::$app->user->fizLico->id])->asArray()->all(), 'year', 'year');
?>

<div id="copying-form" class="copying-form" ng-controller="CopyingController as copying" ng-show="copying.isShow">
    <div class="form-group">
        <div class="inline-block">
            <label for="plan_prospekt_years">Выберите год</label>
            <?php 
echo Html::dropDownList('plan_prospekt_years', null, $years, ['id' => 'plan_prospekt_years', 'class' => 'form-control', 'ng-model' => 'copying.year']);