123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- <?php
- use yii\helpers\Html;
- use yii\widgets\ActiveForm;
- use yii\web\View;
- /** @var yii\web\View $this */
- /** @var app\models\Page $model */
- /** @var yii\widgets\ActiveForm $form */
- $uuid = 'static_page';
- @session_start();
- $_SESSION['KCFINDER']['admin_news'] = true;
- $this->registerJs(
- "$( function() { $( '#tabs' ).tabs();});",
- View::POS_READY
- );
- // CKEditor
- $this->registerJs(
- <<<JS
- $(function () {
- if($('#page-content').length != 0){
- CKEDITOR.replace('page-content', {
- 'filebrowserBrowseUrl': '/components/admin/ckeditor/kcfinder/browse.php?type=files&uid=$uuid',
- 'filebrowserImageBrowseUrl': '/components/admin/ckeditor/kcfinder/browse.php?type=images&uid=$uuid',
- 'filebrowserFlashBrowseUrl': '/components/admin/ckeditor/kcfinder/browse.php?type=flash&uid=$uuid',
- 'filebrowserUploadUrl': '/components/admin/ckeditor/kcfinder/upload.php?type=files&uid=$uuid',
- 'filebrowserImageUploadUrl': '/components/admin/ckeditor/kcfinder/upload.php?type=images&uid=$uuid',
- 'filebrowserFlashUploadUrl': '/components/admin/ckeditor/kcfinder/upload.php?type=flash&uid=$uuid',
- 'filebrowserAudioBrowseUrl': '/components/admin/ckeditor/kcfinder/browse.php?type=files&uid=$uuid',
- 'filebrowserlightboxUploadUrl': '/components/admin/ckeditor/kcfinder/browse.php?type=files&uid=$uuid',
- 'height': 400
- });
- }
- });
- JS
- ,
- View::POS_READY,
- 'ck_editor'
- );
- ?>
- <div class="page-form">
- <?php $form = ActiveForm::begin(); ?>
- <div id="tabs">
- <ul>
- <li><a href="#tabs-1">Основные настройки</a></li>
- <li><a href="#tabs-2">Дополнения</a></li>
- </ul>
- <div id="tabs-1">
- <?= $form->field($model, 'path')->textInput(['maxlength' => true]) ?>
- <?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>
- <?= $form->field($model, 'title_menu')->textInput(['maxlength' => true]) ?>
- <?= $form->field($model, 'title_seo')->textInput(['maxlength' => true]) ?>
- <?= $form->field($model, 'description_seo')->textInput(['maxlength' => true]) ?>
- <?= $form->field($model, 'keywords_seo')->textInput(['maxlength' => true]) ?>
- <?= $form->field($model, 'key')->textInput(['maxlength' => true]) ?>
- <?= $form->field($model, 'content')->textarea(['rows' => 6]) ?>
- <?= $form->field($model, 'norder')->textInput() ?>
- <?= $form->field($model, 'status')->textInput() ?>
- <?= $form->field($model, 'menu')->textInput() ?>
- </div>
- <div id="tabs-2">
- <?= $form->field($model, 'parent_id')->textInput() ?>
- <?= $form->field($model, 'index_controller')->textInput(['maxlength' => true]) ?>
- <?= $form->field($model, 'index_action')->textInput(['maxlength' => true]) ?>
- <?= $form->field($model, 'view_controller')->textInput(['maxlength' => true]) ?>
- <?= $form->field($model, 'view_action')->textInput(['maxlength' => true]) ?>
- <?= $form->field($model, 'index_params')->textInput(['maxlength' => true]) ?>
- <?= $form->field($model, 'lang')->textInput(['maxlength' => true]) ?>
- <?= $form->field($model, 'layout')->textInput(['maxlength' => true]) ?>
-
- <?//= $form->field($model, 'created')->textInput() ?>
- <?//= $form->field($model, 'updated')->textInput() ?>
- <?//= $form->field($model, 'create_user_id')->textInput() ?>
- <?//= $form->field($model, 'update_user_id')->textInput() ?>
-
- </div>
- </div>
- <div class="form-group">
- <?= Html::submitButton('Save', ['class' => 'btn btn-success']) ?>
- </div>
- <?php ActiveForm::end(); ?>
- </div>
|