Example #1
0
echo StepsNavigation::widget(['targetStep1' => '#confirm-step1', 'urlStep1' => Url::to(['/ad/default/index', 'id' => $modelAdRealEstate->adCategory->adMain->id]), 'urlStep2' => Url::to(['/ad/real-estate/update', 'id' => $modelAdRealEstate->id]), 'urlStep3' => Url::to(['/#']), 'urlStep4' => Url::to(['/#']), 'titleStep1' => Yii::t('app', 'Step 1'), 'titleStep2' => Yii::t('app', 'Step 2'), 'titleStep3' => Yii::t('app', 'Step 3'), 'titleStep4' => Yii::t('app', 'Complite'), 'headerStep1' => Yii::t('app', 'Select Category'), 'headerStep2' => Yii::t('app', 'Select the type of property and fill out a simple form.'), 'headerStep3' => Yii::t('app', 'Add photos'), 'headerStep4' => Yii::t('app', 'Post the ad'), 'contentStep1' => Yii::t('app', 'Select Category: content'), 'contentStep2' => Yii::t('app', 'Fill in the form: content'), 'contentStep3' => Yii::t('app', 'Add images: content'), 'contentStep4' => Yii::t('app', 'Post the ad: content'), 'classLinkStep1' => '', 'classLinkStep2' => '', 'classLinkStep3' => 'active', 'classLinkStep4' => 'disabled', 'classContentStep1' => 'tab-pane', 'classContentStep2' => 'tab-pane', 'classContentStep3' => 'tab-pane active', 'classContentStep4' => 'tab-pane']);
//
?>
    </div>
        <h1 class="text-center" style="margin-bottom: 40px;"><?php 
echo Html::encode($this->title);
?>
</h1>
    <div class="col-md-6" style="margin-top: 0 !important; padding-top: 0 !important; padding-bottom: 20px;">
        <div class="row">
            <div class="col-md-12">
                <?php 
if ($modelAdRealEstate->model_scenario == 'sellingRoom' || $modelAdRealEstate->model_scenario == 'rentARoom' || $modelAdRealEstate->model_scenario == 'sellingApatrment' || $modelAdRealEstate->model_scenario == 'rentApatrment' || $modelAdRealEstate->model_scenario == 'sellingHouse' || $modelAdRealEstate->model_scenario == 'rentHouse' || $modelAdRealEstate->model_scenario == 'sellingLand' || $modelAdRealEstate->model_scenario == 'sellingGarage' || $modelAdRealEstate->model_scenario == 'rentGarage' || $modelAdRealEstate->model_scenario == 'sellingComercial' || $modelAdRealEstate->model_scenario == 'rentComercial') {
    ?>
                    <?php 
    echo ImageLoadWidget::widget(['modelName' => 'AdRealEstate', 'id' => 'load-image', 'object_id' => $modelAdRealEstate->id, 'imagesObject' => $modelAdRealEstate->imagesOfObjects, 'images_num' => $user->userPrivilege->images_num, 'images_label' => $modelAdRealEstate->images_label, 'images_temp' => 0, 'imageSmallWidth' => 480, 'imageSmallHeight' => 270, 'headerModal' => 'Загрузить изображение товара', 'sizeModal' => 'modal-md', 'baseUrl' => '/images/', 'imagePath' => 'imagesApp/' . $modelAdRealEstate->model_scenario . '/' . $modelAdRealEstate->subDir . '/', 'noImage' => 'imagesApp/noImage_' . Yii::$app->language . '.png', 'classesWidget' => ['imageClass' => 'imageProduct', 'buttonDeleteClass' => 'btn btn-xs btn-danger btn-imageDeleteProduct glyphicon glyphicon-trash glyphicon', 'imageContainerClass' => 'imageContainerProduct', 'formImagesContainerClass' => 'formImageContainerProduct'], 'pluginOptions' => ['aspectRatio' => 16 / 9, 'strict' => true, 'guides' => true, 'center' => true, 'autoCrop' => true, 'autoCropArea' => 0.5, 'dragCrop' => true, 'movable' => true, 'rotatable' => true, 'scalable' => true, 'zoomable' => true, 'preview' => '.img-preview'], 'cropBoxData' => ['left' => 10, 'top' => 10, 'width' => 480, 'height' => 270], 'canvasData' => []]);
    ?>
                    <?php 
} else {
    ?>
                    <h4><?php 
    echo Yii::t('app', 'For this advertisement you can not add photos.');
    ?>
</h4>
                    <?php 
}
?>
            </div>
        </div>
    </div>
    <div class="col-md-6">
Example #2
0
use yii\widgets\ActiveForm;
use common\widgets\PjaxField\PjaxFieldWidget;
use common\widgets\ImageLoad\ImageLoadWidget;
use common\widgets\SocialLinks\ShareBar;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $modelProfile common\models\Profile */
/* @var $image common\models\ImagesOfObject */
/* @var $modelUser common\models\User */
/* @var $form ActiveForm */
?>
<div class="main-profile">
    <div class="row">
        <div class="col-md-6 col-md-offset-3">
            <?php 
echo ImageLoadWidget::widget(['modelName' => 'Profile', 'id' => 'load-avatar', 'object_id' => $modelProfile->user_id, 'imagesObject' => $modelProfile->imagesOfObjects, 'images_num' => $modelProfile->images_num, 'images_label' => $modelProfile->images_label, 'images_temp' => 0, 'imageSmallWidth' => 150, 'imageSmallHeight' => 150, 'headerModal' => 'Загрузить аватар', 'sizeModal' => 'modal-md', 'baseUrl' => '/images/', 'imagePath' => 'avatars/users/' . Yii::$app->user->id . '/', 'noImage' => 'avatars/noavatar.png', 'classesWidget' => ['imageClass' => 'imageAvatar', 'buttonDeleteClass' => 'btn btn-xs btn-danger btn-imageDeleteAvatar glyphicon glyphicon-trash glyphicon', 'imageContainerClass' => 'imageContainerAvatar', 'formImagesContainerClass' => 'formImageContainerAvatar'], 'pluginOptions' => ['aspectRatio' => 1 / 1, 'strict' => true, 'guides' => true, 'center' => true, 'autoCrop' => true, 'autoCropArea' => 0.5, 'dragCrop' => true, 'movable' => true, 'rotatable' => true, 'scalable' => true, 'zoomable' => true, 'preview' => '.img-preview'], 'cropBoxData' => ['left' => 10, 'top' => 10], 'canvasData' => []]);
?>
        </div>
    </div>
    <div class="row">
        <div class="col-md-6 col-md-offset-3">
            <?php 
echo PjaxFieldWidget::widget(['route' => '/main/user', 'model' => $modelUser, 'id' => Yii::$app->user->id, 'attribute' => 'phone']);
echo PjaxFieldWidget::widget(['route' => '/main/profile', 'model' => $modelProfile, 'attribute' => 'first_name']);
echo PjaxFieldWidget::widget(['route' => '/main/profile', 'model' => $modelProfile, 'attribute' => 'second_name']);
echo PjaxFieldWidget::widget(['route' => '/main/profile', 'model' => $modelProfile, 'attribute' => 'middle_name']);
?>
            <div class="col-md-3">
                <?php 
echo ShareBar::widget(['title' => 'Title Content', 'media' => 'image.jpg', 'url' => ['main/view-profile', 'id' => $modelProfile->user_id], 'networks' => ['GooglePlus', 'Facebook', 'Vk']]);
?>
Example #3
0
<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\Url;
use common\widgets\ImageLoad\ImageLoadWidget;
/* @var $this yii\web\View */
/* @var $modelCarousel common\models\Carousel */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="row">
    <div class="col-md-12">
        <?php 
echo ImageLoadWidget::widget(['modelName' => 'Carousel', 'id' => 'load-image', 'object_id' => $modelCarousel->id, 'imagesObject' => $modelCarousel->imagesOfObjects, 'images_num' => $modelCarousel->images_num, 'images_label' => $modelCarousel->images_label, 'images_temp' => 0, 'imageSmallWidth' => 360, 'imageSmallHeight' => 200, 'headerModal' => 'Загрузить изображение карусели', 'sizeModal' => 'modal-md', 'baseUrl' => '/images/', 'imagePath' => 'carousel/images/', 'noImage' => 'carousel/noImage.png', 'classesWidget' => ['imageClass' => 'imageCarousel', 'buttonDeleteClass' => 'btn btn-xs btn-danger btn-imageDeleteCarousel glyphicon glyphicon-trash glyphicon', 'imageContainerClass' => 'imageContainerCarousel', 'formImagesContainerClass' => 'formImageContainerCarousel'], 'pluginOptions' => ['aspectRatio' => 16 / 9, 'strict' => true, 'guides' => true, 'center' => true, 'autoCrop' => true, 'autoCropArea' => 0.5, 'dragCrop' => true, 'movable' => true, 'rotatable' => true, 'scalable' => true, 'zoomable' => true, 'preview' => '.img-preview'], 'cropBoxData' => ['left' => 10, 'top' => 10], 'canvasData' => []]);
?>
    </div>
</div>

<div class="carousel-form">
    <?php 
$form = ActiveForm::begin();
?>

    <?php 
/*echo $form->field($modelCarousel, 'images_num')->textInput()*/
?>

    <?php 
/*echo $form->field($modelCarousel, 'images_label')->textInput(['maxlength' => true])*/
?>