예제 #1
0
echo $model->annotaciya;
?>
</p>
    </div>
    <div class="row">
        <?php 
$srok_provedeniya = $model->srokProvedeniyaFormatted;
$div_opts = ['class' => $srok_provedeniya ? 'col-md-4' : 'col-md-6'];
?>
        <?php 
echo Html::beginTag('div', $div_opts);
?>
        <dl class="dl-horizontal">
            <dt>Руководитель</dt>
            <dd><?php 
echo Val::of($model, 'rukovoditelRel', 'fio');
?>
</dd>
            <dt>Объем часов</dt>
            <dd><?php 
echo $model->raschitanoChasov;
?>
</dd>
        </dl>
        <?php 
echo Html::endTag('div');
?>
        <?php 
echo Html::beginTag('div', $div_opts);
?>
        <dl class="dl-horizontal">
예제 #2
0
파일: _tema.php 프로젝트: tsyrya/mybriop
<?php

use app\entities\Tema;
use app\helpers\ArrayHelper;
use app\helpers\StringHelper;
use app\helpers\Val;
use yii\web\View;
/**
 * @var $prefixNo integer
 * @var $temaRecord Tema
 * @var $this View
 */
$prefixNo = $prefixNo . '.' . Val::of($temaRecord, 'nomer');
$chasy = Val::of($temaRecord, 'chasy');
$nedelya = Val::of($temaRecord, 'nedelya');
$time = '';
$nbsp = StringHelper::nbsp();
if ($chasy) {
    $time .= "{$chasy}{$nbsp}ч.";
}
if ($nedelya) {
    if ($time) {
        $time .= ",{$nbsp}";
    }
    $time .= "{$nedelya}{$nbsp}неделя";
}
$caption = $prefixNo . ' ' . Val::asText($temaRecord, 'nazvanie');
if ($time) {
    $caption .= " ({$time})";
}
?>
예제 #3
0
<?php

use app\entities\RazdelKursa;
use app\helpers\Val;
use yii\web\View;
/**
 * @var $razdelRecord RazdelKursa
 * @var $this View
 */
$prefixNo = Val::of($razdelRecord, 'nomer');
?>
<h2><?php 
echo Val::asText($razdelRecord, 'nazvanieDlyaRazdelaKursaRel', 'nazvanie');
?>
</h2>
<?php 
$query = $razdelRecord->getPodrazdelyKursaRel()->orderBy('nomer');
foreach ($query->all() as $podrazdelRecord) {
    echo $this->render('_podrazdel-kursa', compact('podrazdelRecord', 'prefixNo'));
}
예제 #4
0
 private function populateByudzhetImpl()
 {
     $fiz_lico = FizLico::findOne($this->fizLico);
     if ($fiz_lico) {
         $this->pedStazh = $fiz_lico->pedStazh;
     }
     $rabota_fiz_lica = RabotaFizLica::find()->where(['fiz_lico' => $this->fizLico])->orderBy('id')->one();
     $dolzhnost_fiz_lica_na_rabote = $rabota_fiz_lica ? DolzhnostFizLicaNaRabote::find()->where(['rabota_fiz_lica' => $rabota_fiz_lica->id])->orderBy('id')->one() : null;
     if ($dolzhnost_fiz_lica_na_rabote) {
         list($this->dolzhnostId, $this->dolzhnostNazvanie) = DirectoryHelper::getForCombo(Dolzhnost::findOne($dolzhnost_fiz_lica_na_rabote->dolzhnost));
     }
     if ($dolzhnost_fiz_lica_na_rabote && ($stazh_v_dolzhnosti = StazhFizLica::findOne(['fiz_lico' => $this->fizLico, 'dolzhnost' => Val::of($dolzhnost_fiz_lica_na_rabote, 'dolzhnost')]))) {
         $this->stazhVDolzhnosti = $stazh_v_dolzhnosti->stazh;
     }
     if ($attestaciya_fiz_lica = $fiz_lico->attestaciyaFizLicaRel) {
         $this->kategoriya = $attestaciya_fiz_lica->kategoriya;
     }
     if ($obrazovanie_fiz_lica = ObrazovanieFizLica::find()->where(['fiz_lico' => $this->fizLico])->orderBy('id')->one()) {
         list($this->obrOrgId, $this->obrOrgNazvanie) = DirectoryHelper::getForCombo(Organizaciya::findOne($obrazovanie_fiz_lica->organizaciya));
         list($this->obrKvalifikaciyaId, $this->obrKvalifikaciyaNazvanie) = DirectoryHelper::getForCombo(Kvalifikaciya::findOne($obrazovanie_fiz_lica->kvalifikaciya));
         $this->obrDocTip = $obrazovanie_fiz_lica->dokumentObObrazovaniiTip;
         $this->obrDocSeriya = $obrazovanie_fiz_lica->dokumentObObrazovaniiSeriya;
         $this->obrDocNomer = $obrazovanie_fiz_lica->dokumentObObrazovaniiNomer;
         $this->obrDocData = DeprecatedDatePicker::fromDatetime($obrazovanie_fiz_lica->dokumentObObrazovaniiDataAsDate);
     }
     return $fiz_lico;
 }
예제 #5
0
<?php

use app\entities\PodrazdelKursa;
use app\helpers\ArrayHelper;
use app\helpers\Val;
use yii\web\View;
/**
 * @var $prefixNo integer
 * @var $podrazdelRecord PodrazdelKursa
 * @var $this View
 */
$prefixNo = $prefixNo . '.' . Val::of($podrazdelRecord, 'nomer');
?>
<h3><?php 
echo $prefixNo . ' ' . Val::asText($podrazdelRecord, 'nazvanie');
?>
</h3>

<?php 
if (ArrayHelper::getValue($podrazdelRecord, 'chasy_kontrolya') || ArrayHelper::getValue($podrazdelRecord, ['formaKontrolyaVTechenieKursaRel', 'nazvanie'])) {
    ?>
<div class="kontrol-block">
    <div class="inner">
        <dl>
            <dt>Форма</dt>
            <dd><?php 
    echo Val::asText($podrazdelRecord, 'formaKontrolyaVTechenieKursaRel', 'nazvanie');
    ?>
</dd>

            <dt>Часы</dt>
예제 #6
0
 /**
  * @inheritdoc
  */
 public static function find()
 {
     $cols = ['{{kurs}}.*', 'zapisanoSlushatelej' => 'coalesce(count({{slushatel}}.[[id]]),0)', 'isUserZapisan' => self::userZapisanCond(), 'userStatusKursa' => 'kurs_tek_polzovatelya.status'];
     return parent::find()->select($cols)->joinWith(['slushateliRel' => function ($q) {
         $q->from(['slushatel' => 'fiz_lico']);
     }])->joinWith(['kursyFizLicaRel' => function ($q) {
         $q->from(['kurs_tek_polzovatelya' => 'kurs_fiz_lica'])->onCondition(['kurs_tek_polzovatelya.fiz_lico' => Val::of(Yii::$app->user->fizLico, 'id')]);
     }])->groupBy(['kurs.id', 'kurs_tek_polzovatelya.id'])->with('rukovoditelRel', 'kategoriiSlushatelejRel');
 }