<?php
    /**
     * @var yii\web\View $this
     * @var Articles     $model
     */
    use common\components\artboximage\ArtboxImageHelper;
    use common\models\Articles;
    use yii\helpers\Html;
    
    $this->title = $model->lang->title;
    $this->params[ 'breadcrumbs' ][] = [
        'label' => Yii::t('app', 'Статьи'),
        'url'   => [ '/article' ],
    ];
    $this->params[ 'breadcrumbs' ][] = $this->title;
?>
<div class="section-box box-title-1 uppercase"><?= $this->title; ?></div>
<div class="section-box box-brand margin_bottom_30">
    <div class="style articles-view-wr">
        <div class="row">
            <div class="articles-date col-xs-12 col-sm-12">
                <span>
                    <?php
                        echo date('d.m.Y', $model->date);
                    ?>
                </span>
            </div>
        </div>
        <div class="row">
            <div class="artile-view-txt style">
                <?php
                    if(!empty($model->image)) {
                        echo ArtboxImageHelper::getImage($model->getImageUrl(), 'article_list', [
                            'class' => 'float-left col-xs-12 col-sm-6',
                        ]);
                    } else {
                        echo ArtboxImageHelper::getImage('/storage/no-image.png', 'article_list', [
                            'class' => 'float-left col-xs-12 col-sm-6',
                        ]);
                    }
                    echo $model->lang->body;
                ?>
            </div>
        </div>
    </div>
</div>
