Example #1
0
    ?>
</td>
            <td><?php 
    echo $item['label'];
    ?>
</td>
            <td><?php 
    echo $item['sort_order'];
    ?>
</td>
            <td><?php 
    echo CmsCatalog::getCatalogPageTypeLabels($item['page_type']);
    ?>
</td>
            <td><?php 
    echo \clh021\cms\models\YesNo::labels()[$item['is_nav']];
    ?>
</td>
            <td><?php 
    echo \clh021\cms\models\Status::labels()[$item['status']];
    ?>
</td>
            <td>
                <?php 
    if ($item['page_type'] == CmsCatalog::PAGE_TYPE_LIST) {
        ?>
<a href="<?php 
        echo \Yii::$app->getUrlManager()->createUrl(['cms/cms-show/create', 'catalog_id' => $item['id']]);
        ?>
" title="<?php 
        echo Module::t('cms', 'Add Show');
Example #2
0
<?php

use yii\helpers\Html;
use yii\widgets\DetailView;
use clh021\cms\Module;
/* @var $this yii\web\View */
/* @var $model app\models\CmsCatalog */
$this->title = $model->title;
$this->params['breadcrumbs'][] = ['label' => Module::t('cms', 'Cms Catalogs'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="cms-catalog-view">

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

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', ['attribute' => 'parent_id', 'value' => $model->parent_id ? $model->parent->title : Module::t('cms', 'Root Catalog')], 'title', 'surname', 'brief', 'content:ntext', 'seo_title', 'seo_keywords', 'seo_description', 'banner', ['attribute' => 'is_nav', 'value' => \clh021\cms\models\YesNo::labels($model->is_nav)], 'sort_order', ['attribute' => 'page_type', 'value' => \clh021\cms\models\CmsCatalog::getCatalogPageTypeLabels($model->page_type)], 'page_size', 'template_list', 'template_show', 'template_page', 'redirect_url:url', ['attribute' => 'status', 'value' => \clh021\cms\models\Status::labels($model->status)], 'created_at:datetime', 'updated_at:datetime']]);
?>

</div>
Example #3
0
?>

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

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

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

    <?php 
echo $form->field($model, 'is_nav')->dropDownList(\clh021\cms\models\YesNo::labels());
?>

    <?php 
echo $form->field($model, 'sort_order')->textInput();
?>

    <?php 
echo $form->field($model, 'page_size')->textInput();
?>

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

    <?php