request; $id = $request->get('id'); if( $id ){ $this->title="Редактирование статьи"; $news = \app\models\News::find()->andWhere(['id'=>$id])->one(); // print_a( $news ); }else{ $this->title="Новая статья"; $anews = [ 'title' => '' ]; $news = new \app\models\News();; $news->title = ''; } ?> 'news-form', 'options' => ['class' => 'form-horizontal','enctype' => 'multipart/form-data'],]); //иничиализация DateTimePicker::widget([ 'name' => 'dt_pub', 'options' => [], 'convertFormat' => true, 'pluginOptions' => [ 'format' => 'd-M-Y g:i A', 'startDate' => '01-Mar-2014 12:00 AM', 'todayHighlight' => true ] ]); ?>
field($news, 'title')->textInput([ 'maxlength' => true, 'class' => 'form-control js-word-count-input', 'placeholder' => 'Заголовок новости' ])->label('Заголовок'); */ ?>
0 из 80
Краткое содержание статьи
Новость подготовили

editors?>

Предпросмотр 'btn btn-success']); echo Html::submitButton('Save', ['class' => 'btn btn-success']); ?>

Фото

id){ $imageSrc = "/images/news/news/".$news->id."_size4.jpg"; } echo @app\components\admin\uploadcrop\UploadCrop::widget( [ 'form' => $form, 'model' => $news, 'attribute' => 'photo', 'maxSize' => 3000, 'imageSrc' => (isset($imageSrc)) ? $imageSrc : '', 'title' => 'Фото', 'changePhotoTitle' => 'Фото', 'jcropOptions' => [ 'center' => true, 'rotatable' => true, 'autoCrop' => true, 'autoCropArea' => false, 'checkOrientation' => true, 'aspectRatio' => 16 / 9, 'dragMode' => 'move', 'viewMode' => 1, 'autoCropArea' => '0.1', 'restore' => true, 'guides' => true, 'center' => true, 'movable' => false, 'highlight' => true, 'cropBoxMovable' => true, 'cropBoxResizable' => true, 'background' => false, 'minContainerHeight' => 500, 'minCanvasHeight' => 400, 'minCropBoxWidth' => 600, 'minCropBoxHeight' => 200, 'responsive' => true, 'toggleDragModeOnDblclick' => false, 'crop' => 'crq' ] ] ); ?>
Рубрики
getForNews($news->id); $atopic = array(); foreach( $Titems as $item ){ $atopic[$item->id] = $item->id; } foreach( NewsTopic::findActive()->getModels() as $item ){ ?>
id, $atopic, true))?' checked':''?>>
сюжеты
getForNews($news->id); ?>