<?php
    use yii\helpers\Url;
    use common\modules\users\widgets;
    use common\modules\school\assets\WidgetAssetBundle;
    
    WidgetAssetBundle::register($this);
?>
<section class="ks_header">
    <div class="container">
        <div class="row">
            <div class="col-md-5 col-xs-7 col-sm-12">
                <div class="ball-block">Накоплено баллов: 
                    <span class="col-ball">0</span>
                    <a href="#" class="ball-link">Как увеличить?</a>
                    <div class="ball_hover">Текст как увеличить,<br> текст как увеличить,</div>
                </div>
            </div>
            <div class="col-md-5 col-md-offset-2 col-xs-5 col-sm-12">
                <?php echo \common\modules\users\widgets\UserBoxWidget::widget() ?>
            </div>
        </div>
    </div>
</section>
<section class="les_list_top"  style="background: url(<?php echo $model->getUrl($model->image);?>) no-repeat center center; background-size: 100% auto;">
    <div class="ls_top_over">
        <div class="container">
            <div class="row">
                <div class="col-md-12 col-xs-12 col-sm-12">
                    <h1 class="ls_title">
                        <span><?php echo $model->title;?></span>
                    </h1>
                    <div class="ls_subtitle">
                        <?php echo $model->description_for_course;?>
                    </div>
                    <br>
                    <div class="ls_txt"><span>В роликах будет рассказываться:</span></div>
                    <a href="#" class="ls_now_btn">Приступить</a>
                </div>
            </div>
        </div>
    </div>
</section>
<section class="ls_list_block">
    <div class="container">
        <div class="row">
            
            <?php echo \yii\widgets\ListView::widget( [
                    'dataProvider' => $dataProvider,
                    'itemView' => 'item-view-lesson',
                    'itemOptions' => ['tag' => 'div class="col-md-3 col-xs-6 col-sm-12"'],
                    'options' => ['tag' => 'div class="lessons-block"'],
                    'emptyTextOptions' => [ 'tag' => 'div', 'class' => 'empty-text' ],
                    'layout' => '{items}<div class="clear"></div><li><nav class="pages">{pager}</nav></li>',
                    'pager' => [
                        'class' => 'common\components\zii\FrontLinkPager',
                        'activePageCssClass' => 'is-active',
                        'prevPageLabel' => '<span class="glyphicon glyphicon-chevron-left"></span>',
                        'nextPageLabel' => '<span class="glyphicon glyphicon-chevron-right"></span>',
                        'options' => [
                            'class' => 'pages-list',
                        ],
                    ],
                ] );
                ?> 
            <div class="clear"></div>
            <?php if (!Yii::$app->user->isGuest):?>
                <div class="col-md-3 col-xs-6 col-sm-12">
                    <div class="ls_likes">
                        <div class="ls_likes_title">Нравится курс?</div>
                        <a href="javascript:void(0)" class="ls_likes_y <?php echo $model->getEstimateCourseLike($model->id) ? 'ls_likes_y_choice':'';?>" 
                           data-course="<?php echo $model->id;?>">Да</a>
                        <a href="javascript:void(0)" class="ls_likes_n <?php echo $model->getEstimateCourseUnlike($model->id) ? 'ls_likes_n_choice':'';?>" 
                           data-course="<?php echo $model->id;?>">Нет</a>
                    </div>
                </div>
            <?php endif;?>
    </div>
</section>
<footer>
    <div class="container">

        <div class="footbottom_line">
            <div class="row">
                <div class="col-md-3 col-xs-3 col-sm-12">
                    <div class="foot_logo">
                        <img src="/images/foot_logo.png" height="51" width="192" alt="">
                    </div>
                </div>
                <div class="col-md-6  col-xs-6 col-sm-12">
                    <ul class="social_link">
                        <li><a href="#" class="soc_item"><i class="fa fa-vk"></i></a></li>
                        <li><a href="#" class="soc_item"><i class="fbicon"></i></a></li>
                        <li><a href="#" class="soc_item"><i class="fa fa-youtube"></i></a></li>
                        <li><a href="#" class="soc_item"><i class="fa fa-instagram"></i></a></li>
                        <li><a href="#" class="soc_item"><i class="fa fa-twitter"></i></a></li>
                        <li><a href="#" class="soc_item"><i class="gplusicon"></i></a></li>
                    </ul>
                </div>
                <div class="col-md-3 col-xs-3 col-sm-12">
                    <div class="taskon"><img src="/images/taskon.png" height="31" width="100" alt=""></div>
                    <div class="copyring">Powered by Taskon <br> Собственная разработка Арт Проект</div>
                </div>
            </div>
        </div>
    </div>
</footer>

<div class="hidden">
    <div id="zvonok_form" class="popup">
        <!-- <div class="txtbtnclose">Закрыть</div> -->
        <span class="popup__title">Заказать звонок</span>
        <span class="popup__subtittle">Чтобы мы могли вам перезвонить укажите свой номер телефона:</span>
        <form class="valid_form">
            <input type="text" class="input_st field-input required alphanumeric" placeholder="Ваше имя">
            <input type="tel" class="input_st field-input required email" placeholder="Ваш телефон">
            <button class="save-button popup_bt_send">Заказать звонок</button>
        </form>
    </div>
    <?php echo \common\modules\users\widgets\LoginWidget::widget(); ?>
    <?php echo \common\modules\users\widgets\RegistrationWidget::widget(); ?>
</div>
