<?php
    use artbox\core\components\SeoComponent;
    use artbox\core\models\Page;
    use yii\helpers\Html;
    use yii\web\View;
    use artbox\core\models\Image;
    
    /**
     * @var View         $this
     * @var Page         $model
     * @var Page[]       $pages
     * @var SeoComponent $seo
     * @var Image[]      $images
     * @var string       $body
     * @var string|null  $lefts
     */
    $seo = \Yii::$app->get('seo');
    $this->params[ 'breadcrumbs' ][] = $seo->title;

?>

<div id="content">
    <div class="container">
        
        <div class="row">
            
            <!-- *** LEFT COLUMN ***
      _________________________________________________________ -->
            
            <div class="col-md-9 clearfix">
                <section>
                    <div id="text-page">
                        <div class="lead">
                            <?= $body ?>
                        </div>
                    </div>
                </section>
    
                <?php if (!empty($images) && !empty($lefts)) { ?>
                    <section>
                        <div class="project owl-carousel">
                
                            <?php foreach ($images as $image) { ?>
                                <div class="item">
                                    <div class="itemimage" style="background-image:url(<?= $image->getUrl() ?>)"></div>
                                </div>
                            <?php } ?>
            
                        </div>
                        <!-- /.project owl-slider -->
                    </section>
                <?php } ?>
    
                <?php if (!empty($lefts)) { ?>
                    <section>
                        <div id="text-page">
                            <div class="lead">
                                <?= $lefts ?>
                            </div>
                        </div>
                    </section>
                <?php } ?>
            
            </div>
            <!-- /.col-md-9 -->
            
            <!-- *** LEFT COLUMN END *** -->
            
            <!-- *** RIGHT COLUMN ***
        _________________________________________________________ -->
            
            <div class="col-sm-3">
                <!-- *** PAGES MENU ***
        _________________________________________________________ -->
                <div class="panel panel-default sidebar-menu">
                    
                    <div class="panel-heading">
                        <span class="panel-title">Решения</span>
                    </div>
                    
                    <div class="panel-body">
                        <ul class="nav nav-pills nav-stacked">
                            <?php
                                foreach ($pages as $page) {
                                    echo Html::tag(
                                        'li',
                                        Html::a(
                                            $page->lang->title,
                                            [
                                                'page/view',
                                                'id' => $page->id,
                                            ]
                                        )
                                    );
                                }
                            ?>
                        </ul>
                    
                    </div>
                </div>
                
                <!-- *** PAGES MENU END *** -->

            </div>
            <!-- /.col-md-3 -->
            
            <!-- *** RIGHT COLUMN END *** -->
        
        
        </div>
        <!-- /.row -->
    
    </div>
    <!-- /.container -->
</div>
<!-- /#content -->
<style>
    .pages#get-it {
        padding: 20px 0 20px;
    }
</style>
<div id="get-it" class="pages">
    <div class="container">
        <div class="col-md-12 col-sm-12" style="text-align: center;">
            <a href="#" class="btn btn-template-transparent-primary do-order-but but-writeus" data-toggle="modal" data-target="#feedback-modal" data-modalname="Заказать. <?=$seo->title?>">Заказать</a>
        </div>
    </div>
</div>