Exemplo n.º 1
0
/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Module::t('app', 'ADMIN_ACTIVITY');
$this->params['breadcrumbs'][] = ['label' => Module::t('app', 'ADMIN'), 'url' => ['default/index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="activity-index">

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

    <p class="alert alert-info">
        <?php 
echo Module::t('app', 'ACTIVITY_HELP');
?>
    </p>

    <p>
        <?php 
echo Html::a(Module::t('app', 'ADMIN_ACTIVITY_ADD'), ['create'], ['class' => 'btn btn-success btn-xs']);
?>
    </p>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'columns' => ['id', ['class' => LinkColumn::className(), 'attribute' => 'name'], 'module', 'created_at:datetime']]);
?>

</div>
Exemplo n.º 2
0
<?php

use yii\helpers\Html;
use yii\grid\GridView;
use app\modules\admin\Module;
use app\modules\admin\components\widgets\AdminBoxWidget;
use app\modules\admin\components\grid\LinkColumn;
/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Module::t('app', 'ADMIN_CATEGORY_MAIN');
$this->params['breadcrumbs'][] = ['label' => Module::t('app', 'ADMIN'), 'url' => ['/admin/default/index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="admin-category-index">
    <?php 
AdminBoxWidget::begin(['type' => AdminBoxWidget::TYPE_INFO, 'solid' => false, 'title' => Html::a('<i class="fa fa-plus-circle"></i>' . ' ' . Module::t('app', 'ADMIN_CATEGORY_ADD'), ['create'], ['class' => 'btn btn-success btn-xs', 'title' => Module::t('app', 'ADMIN_CATEGORY_ADD')])]);
?>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'summary' => false, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['class' => LinkColumn::className(), 'attribute' => 'title'], 'created_at:datetime']]);
?>

    <?php 
AdminBoxWidget::end();
?>
</div>
Exemplo n.º 3
0
use yii\helpers\Html;
use yii\grid\GridView;
use app\modules\admin\Module;
use app\modules\admin\components\grid\LinkColumn;
/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Module::t('app', 'ADMIN_AVATAR');
$this->params['breadcrumbs'][] = ['label' => Module::t('app', 'ADMIN'), 'url' => ['/admin/default/index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="avatar-index">

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

    <p>
        <?php 
echo Html::a(Module::t('app', 'ADMIN_AVATAR_ADD'), ['create'], ['class' => 'btn btn-success btn-xs']);
?>
    </p>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'tableOptions' => ['class' => 'table table-striped table-bordered'], 'columns' => ['id', ['class' => LinkColumn::className(), 'attribute' => 'name'], ['attribute' => 'img', 'format' => 'text', 'value' => function ($data) {
    return Yii::$app->request->baseUrl . $data->img;
}]]]);
?>

</div>
Exemplo n.º 4
0
<?php

use yii\helpers\Html;
use yii\grid\GridView;
use app\modules\admin\components\grid\SetColumn;
use app\modules\admin\components\grid\LinkColumn;
use app\modules\admin\Module;
use app\modules\user\models\User;
/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Module::t('app', 'ADMIN_USER');
$this->params['breadcrumbs'][] = ['label' => Module::t('app', 'ADMIN'), 'url' => ['default/index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="user-index">

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

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'columns' => ['id', ['class' => LinkColumn::className(), 'attribute' => 'username'], 'email:email', ['attribute' => 'status', 'class' => SetColumn::className(), 'name' => 'UserStatusName', 'cssCLasses' => [User::STATUS_ACTIVE => 'success', User::STATUS_BLOCKED => 'danger', User::STATUS_WAIT => 'warning']], 'created_at:datetime']]);
?>

</div>
Exemplo n.º 5
0
use app\modules\admin\components\grid\LinkColumn;
use app\modules\admin\components\grid\SetColumn;
use app\modules\main\models\Article;
use app\modules\admin\components\widgets\AdminBoxWidget;
use yii\grid\SerialColumn;
/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Module::t('app', 'ADMIN_ARTICLE');
$this->params['breadcrumbs'][] = ['label' => Module::t('app', 'ADMIN'), 'url' => ['default/index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="admin-article-index">

    <?php 
AdminBoxWidget::begin(['type' => AdminBoxWidget::TYPE_INFO, 'title' => Html::a('<i class="fa fa-plus-circle"></i>' . ' ' . Module::t('app', 'ADMIN_ARTICLE_ADD'), ['create'], ['class' => 'btn btn-success btn-xs'])]);
?>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'summary' => false, 'columns' => [['class' => SerialColumn::className()], ['class' => LinkColumn::className(), 'attribute' => 'title'], ['attribute' => 'category_id', 'value' => function ($data) {
    return $data->category->title;
}], ['attribute' => 'author_id', 'value' => function ($data) {
    return $data->author->username;
}], ['class' => SetColumn::className(), 'attribute' => 'status', 'name' => 'ArticleStatusName', 'cssCLasses' => [Article::ARTICLE_ACTIVE => 'success', Article::ARTICLE_INACTIVE => 'warning']], ['attribute' => 'created_at', 'format' => 'datetime']]]);
?>

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

</div>