/* @var $searchModel app\models\StaticPadeTableSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = 'Статические страницы'; $this->params['breadcrumbs'][] = $this->title; ?> <div class="static-page-table-index"> <h1><?php echo Html::encode($this->title); ?> <?php echo Html::a("<span class='glyphicon glyphicon-plus'>", ['create'], ['class' => 'btn btn-success', 'data-toggle' => "tooltip", 'data-placement' => "top", 'title' => "Создать страницу"]); ?> </h1> <?php // echo $this->render('_search', ['model' => $searchModel]); ?> <?php echo SortableInput::widget(['name' => 'sort_list_2', 'value' => $value, 'items' => $list, 'hideInput' => false, 'options' => ['class' => 'form-control', 'readonly' => true, 'form' => 'sort']]); ?> <?php $form = ActiveForm::begin(['id' => 'sort']); ?> <br> <div class="form-group"> <?php echo Html::submitButton('Сохранить порядок', ['class' => 'btn btn-primary btn-block']); ?> </div> </div>
?> </h3> </div> <?php $form = ActiveForm::begin(['id' => 'gallery', 'enableClientValidation' => true, 'errorSummaryCssClass' => 'error-summary alert alert-error', 'options' => ['enctype' => 'multipart/form-data']]); ?> <div class="box-body col-md-7"> <?php echo $form->field($gallery, 'name')->textInput(['maxlength' => true]); ?> <?php if (!$gallery->isNewRecord) { ?> <div id="gallery-images-sortable"> <?php echo SortableInput::widget(['name' => 'galleryImagesOrder', 'items' => $gallery->getGalleryImagesForSortableWidget(), 'value' => $gallery->getOrderOfGalleryImagesForSortableWidget(), 'hideInput' => true, 'sortableOptions' => ['type' => 'grid']]); ?> </div> <?php } ?> </div> <div class="col-md-12"> <?php echo $form->field($gallery, 'uploadedImages[]')->widget(FileInput::classname(), ['options' => ['multiple' => true, 'accept' => 'image/*'], 'pluginOptions' => ['previewFileType' => 'any', 'showCaption' => false, 'showRemove' => true, 'showUpload' => false]]); ?> </div> <div class="clearfix"></div> <div class="box-footer"> <?php echo Html::submitButton('<span class="glyphicon glyphicon-check"></span> ' . ($gallery->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Save')), ['id' => 'save-' . $gallery->formName(), 'class' => 'btn btn-success']);