Ejemplo n.º 1
0
<?php

use yii\helpers\Html;
use vladkukushkin\faq\Module;
/* @var $this yii\web\View */
/* @var $model vladkukushkin\faq\models\Faq */
$this->title = Module::t('faq', 'Create');
$this->params['breadcrumbs'][] = ['label' => Module::t('faq', 'FREQUENTLY_ASKED_QUESTIONS'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="faq-create">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <?php 
echo $this->render('_form', ['model' => $model]);
?>

</div>
Ejemplo n.º 2
0
        ?>
" class="panel-collapse collapse <?php 
        echo $faq_id == $model['faq_id'] ? 'in' : '';
        ?>
">
                    <!-- Content -->
                    <div class="panel-body">
                        <p><?php 
        echo $model['faq_text'];
        ?>
</p>
                    </div>
                </div>
            </div>
        <?php 
    }
    ?>
    </div>
<?php 
} else {
    ?>
    <h4><?php 
    echo Module::t('faq', 'NO_DATA');
    ?>
</h4>
<?php 
}
?>


Ejemplo n.º 3
0
use vladkukushkin\faq\models\Faq;
use vladkukushkin\faq\Module;
/* @var $this yii\web\View */
/* @var $searchModel vladkukushkin\faq\models\search\FaqSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Module::t('faq', 'FREQUENTLY_ASKED_QUESTIONS');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="faq-index">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

    <p>
        <?php 
echo Html::a(Module::t('faq', 'Create'), ['create'], ['class' => 'btn btn-success']);
?>
    </p>
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'faq_id', 'faq_title', ['attribute' => 'faq_text', 'format' => 'raw'], ['attribute' => 'faq_show_on_main', 'value' => function ($model) {
    return Faq::getVisibleOnMain()[$model->faq_show_on_main];
}, 'filter' => Faq::getVisibleOnMain()], ['attribute' => 'faq_language', 'filter' => Faq::getLanguageFilter()], ['class' => 'yii\\grid\\ActionColumn']]]);
?>

</div>
Ejemplo n.º 4
0
    <?php 
$form = ActiveForm::begin();
?>

    <?php 
echo $form->field($model, 'faq_title')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'faq_text')->widget(\vova07\imperavi\Widget::className(), ['settings' => ['lang' => Yii::$app->controller->module->imperaviLanguage, 'minHeight' => 200, 'paragraphize' => false, 'cleanOnPaste' => false, 'replaceDivs' => false, 'linebreaks' => false, 'plugins' => ['fullscreen', 'imagemanager'], 'imageUpload' => Url::to(['/faq/default/image-upload']), 'imageManagerJson' => Url::to(['/faq/default/images-get'])]]);
?>

    <?php 
echo $form->field($model, 'faq_show_on_main')->dropDownList(Faq::getVisibleOnMain());
?>
    <?php 
echo $form->field($model, 'faq_language')->dropDownList([Yii::$app->language => Yii::$app->language]);
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? Module::t('faq', 'Create') : Module::t('faq', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
?>

</div>
Ejemplo n.º 5
0
 /**
  * @inheritdoc
  */
 public function attributeLabels()
 {
     return ['faq_id' => Module::t('faq', 'FAQ_ID'), 'faq_title' => Module::t('faq', 'FAQ_HEADER'), 'faq_text' => Module::t('faq', 'FAQ_CONTENT'), 'faq_language' => Module::t('faq', 'FAQ_LANGUAGE'), 'faq_show_on_main' => Module::t('faq', 'FAQ_IS_SHOW_ON_MAIN')];
 }
Ejemplo n.º 6
0
use yii\widgets\DetailView;
use vladkukushkin\faq\models\Faq;
use vladkukushkin\faq\Module;
/* @var $this yii\web\View */
/* @var $model vladkukushkin\faq\models\Faq */
$this->title = $model->faq_title;
$this->params['breadcrumbs'][] = ['label' => Module::t('faq', 'FREQUENTLY_ASKED_QUESTIONS'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="faq-view">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <p>
        <?php 
echo Html::a(Module::t('faq', 'Update'), ['update', 'id' => $model->faq_id], ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::a(Module::t('faq', 'Delete'), ['delete', 'id' => $model->faq_id], ['class' => 'btn btn-danger', 'data' => ['confirm' => 'Are you sure you want to delete this item?', 'method' => 'post']]);
?>
    </p>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['faq_id', 'faq_title', ['attribute' => 'faq_text', 'format' => 'raw'], ['attribute' => 'faq_show_on_main', 'value' => Faq::getVisibleOnMain()[$model->faq_show_on_main]], 'faq_language']]);
?>

</div>
Ejemplo n.º 7
0
<?php

use yii\helpers\Html;
use vladkukushkin\faq\Module;
/* @var $this yii\web\View */
/* @var $model vladkukushkin\faq\models\Faq */
$this->title = Module::t('faq', 'Update') . ' ' . $model->faq_title;
$this->params['breadcrumbs'][] = ['label' => Module::t('faq', 'FREQUENTLY_ASKED_QUESTIONS'), 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->faq_title, 'url' => ['view', 'id' => $model->faq_id]];
$this->params['breadcrumbs'][] = Module::t('faq', 'Update');
?>
<div class="faq-update">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <?php 
echo $this->render('_form', ['model' => $model]);
?>

</div>