Пример #1
0
/* @var $this yii\web\View */
/* @var $searchModel app\models\CommentSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Comments';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="comment-index">


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

    <p class="text-right hide">
        <?php 
echo Html::a('Create Comment', ['create'], ['class' => 'btn btn-success']);
?>
    </p>

    <?php 
\yii\widgets\Pjax::begin();
?>
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'text:html', 'videoTitle', 'username', 'created_at', ['class' => 'yii\\grid\\ActionColumn', 'template' => \app\components\OvcUtility::getCommentActionTemplate()]]]);
?>
    <?php 
\yii\widgets\Pjax::end();
?>

</div>
Пример #2
0
use app\models\Course;
/* @var $this yii\web\View */
/* @var $searchModel app\models\UserHasCourseSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'User Has Courses';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="user-has-course-index">

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

    <p class="text-right">
        <?php 
echo Html::a('Create User Has Course', ['create'], ['class' => 'btn btn-success']);
?>
    </p>

    <?php 
\yii\widgets\Pjax::begin();
?>
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'course.name', 'user.username', 'user.role.name', 'user.first_name', 'user.last_name', 'user.email', ['class' => 'yii\\grid\\ActionColumn', 'template' => \app\components\OvcUtility::getUserHasCourseActionTemplate()]]]);
?>
    <?php 
\yii\widgets\Pjax::end();
?>

</div>
Пример #3
0
/* @var $searchModel app\models\VideoSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Videos';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="video-index">

    <?php 
if (User::getCurrentUserRole() != OvcRole::STUDENT && User::getCurrentUserRole()) {
    ?>
        <p class="text-right">
            <?php 
    echo Html::a('Create Video', ['create'], ['class' => 'btn btn-success']);
    ?>
        </p>
    <?php 
}
?>

    <?php 
\yii\widgets\Pjax::begin();
?>
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'id', 'title', 'courseName', 'created_at', 'commentCount', ['class' => 'yii\\grid\\ActionColumn', 'template' => \app\components\OvcUtility::getVideoActionTemplate()]]]);
?>
    <?php 
\yii\widgets\Pjax::end();
?>

</div>
Пример #4
0
<?php

use yii\helpers\Html;
use yii\grid\GridView;
use app\models\User;
use app\models\Role;
/* @var $this yii\web\View */
/* @var $searchModel app\models\UserSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Users';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="user-index">
    <p class="text-right">
        <?php 
echo Html::a('Create User', ['create'], ['class' => 'btn btn-success']);
?>
    </p>

    <?php 
\yii\widgets\Pjax::begin();
?>
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'id', 'first_name', 'last_name', 'username', 'email:email', 'active', 'roleName', ['class' => 'yii\\grid\\ActionColumn', 'template' => \app\components\OvcUtility::getUserActionTemplate()]]]);
?>
    <?php 
\yii\widgets\Pjax::end();
?>

</div>