Ejemplo n.º 1
0
<?php

/* @var $this yii\web\View */
use yeesoft\comments\widgets\Comments;
use yeesoft\page\models\Page;
use yii\helpers\Html;
$this->title = $page->title;
$this->params['breadcrumbs'][] = $page->title;
?>

    <div class="page">
        <h1><?php 
echo Html::encode($page->title);
?>
</h1>
        <div><?php 
echo $page->content;
?>
</div>
    </div>
<?php 
if ($page->comment_status == Page::COMMENT_STATUS_OPEN) {
    ?>
    <?php 
    echo Comments::widget(['model' => Page::className(), 'model_id' => $page->id]);
}
Ejemplo n.º 2
0
echo Html::encode($this->title);
?>
</h3>
            <?php 
echo Html::a(Yii::t('yee', 'Add New'), ['/page/default/create'], ['class' => 'btn btn-sm btn-primary']);
?>
        </div>
    </div>

    <div class="panel panel-default">
        <div class="panel-body">

            <div class="row">
                <div class="col-sm-6">
                    <?php 
echo GridQuickLinks::widget(['model' => Page::className(), 'searchModel' => $searchModel, 'labels' => ['all' => Yii::t('yee', 'All'), 'active' => Yii::t('yee', 'Published'), 'inactive' => Yii::t('yee', 'Pending')]]);
?>
                </div>

                <div class="col-sm-6 text-right">
                    <?php 
echo GridPageSize::widget(['pjaxId' => 'page-grid-pjax']);
?>
                </div>
            </div>

            <?php 
Pjax::begin(['id' => 'page-grid-pjax']);
?>

            <?php