예제 #1
0
파일: list.php 프로젝트: sibds/playground
<?php

use yii\helpers\Html;
use sibds\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel app\modules\pages2\models\PagesSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Pages';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="pages-index">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>
                <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>
    
    <p>
        <?php 
echo Html::a('Create Pages', ['update'], ['class' => 'btn btn-success']);
?>
    </p>
                <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'sibds\\grid\\UrlColumn', 'attribute' => 'id', 'width' => '50px', 'hAlign' => 'center'], ['class' => 'sibds\\grid\\UrlColumn', 'attribute' => 'name', 'showLock' => true], ['class' => 'sibds\\grid\\UrlColumn', 'attribute' => 'url'], ['class' => 'sibds\\grid\\UrlColumn', 'attribute' => 'content'], ['attribute' => 'created_at', 'format' => ['date', 'dd.MM.YYYY HH:mm']], ['class' => 'sibds\\grid\\ActionColumn']]]);
?>
        </div>
예제 #2
0
파일: list.php 프로젝트: sibds/playground
<?php

use yii\helpers\Html;
use sibds\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel app\modules\news2\models\NewsSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'News';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="news-index">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>
                <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>
    
    <p>
        <?php 
echo Html::a('Create News', ['update'], ['class' => 'btn btn-success']);
?>
    </p>
                <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'sibds\\grid\\UrlColumn', 'attribute' => 'id', 'width' => '50px', 'hAlign' => 'center'], ['class' => 'sibds\\grid\\UrlColumn', 'attribute' => 'name', 'showLock' => true], 'category_id', ['class' => 'sibds\\grid\\UrlColumn', 'attribute' => 'url'], ['class' => 'sibds\\grid\\UrlColumn', 'attribute' => 'image'], ['class' => 'sibds\\grid\\ActionColumn']]]);
?>
        </div>