<?php
    use yii\helpers\Url;
    use common\modules\school\models\Courses;
    use common\modules\school\assets\WidgetAssetBundle;
    
    WidgetAssetBundle::register($this);
?>

<div class="kurs_item">
    <div class="kurs_img">
        <img src="<?php echo $model->getUrl($model->image);?>" height="262" width="907" alt="">
    </div>
    <div class="kurs_over">
        <h1 class="kurs_title"><span><?php echo $model->title;?></span></h1><br>
        <span class="kurs_sub-title"><?php echo $model->description;?></span>
        <?php if($model->type == Courses::TYPE_DV):?>
            <div class="kurs_lock"></div>
        <?php endif;?>   
        <?php if($model->spec_proposition):?>
            <div class="blip_kurs">За просмотр этих курсов<br> мы заплатим 15 000 руб.</div>
        <?php endif;?>
        <div class="kurs_foot clearfix">
            <?php if($model->type == Courses::TYPE_DV):?>
                <a href="#registration_form" class="kurs_bt popup-form call_form_reg" data-title="<?php echo $model->title;?>" 
                   data-spec ="<?php echo $model->spec_proposition;?>">
                    Предварительная регистрация
                </a>
            <?php else:?>
                <a href="<?php echo Url::toRoute(['/school/course/view', 'id' => $model->id]);?>" class="kurs_bt">Подробнее</a>
            <?php endif;?>        
        </div>
        <div class="for_<?php echo $model->getClassCourse($model->type);?>">
            <div class="r_<?php echo $model->getClassCourse($model->type);?>"></div>
            <?php echo Courses::$type_list[$model->type]?>
        </div>
    </div>
</div>
