<?php use yii\helpers\Html; use yii\grid\GridView; use app\modules\post\Module; use app\widgets\FileManager; /* @var $this yii\web\View */ /* @var $searchModel app\modules\post\models\PostSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = Module::t('general', 'Posts'); $this->params['breadcrumbs'][] = $this->title; echo FileManager::widget(); ?> <div class="post-index"> <h1><?php echo Html::encode($this->title); ?> </h1> <?php // echo $this->render('_search', ['model' => $searchModel]); ?> <p> <?php echo Html::a('Create Post', ['create'], ['class' => 'btn btn-success']); ?> </p> <?php foreach ($search as $hit) {
?> <?php echo $form->field($model, 'desciption')->textarea(['maxlength' => true]); ?> <?php echo TinyMCE::widget(['model' => $model, 'attribute' => 'content', 'mode' => 'advanced', 'options' => ['height' => 400]]); ?> <?php echo $form->field($model, 'category_id')->dropDownList(\yii\helpers\ArrayHelper::map(app\modules\post\models\Category::find()->all(), 'id', 'FullTitle')); ?> <?php echo FileManager::widget(['model' => $model, 'attribute' => 'image']); ?> <?php echo $form->field($model, 'meta_title')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'meta_desciption')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'publish_date')->textInput(['maxlength' => true, 'class' => 'form-control datepicker', 'value' => date('d-m-Y h:i:sA', (int) $model->publish_date)]); ?> <?php