use yii\helpers\Html; use yii\grid\GridView; /* @var $this yii\web\View */ /* @var $searchModel app\modules\portfolio\models\PortfolioRecordSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = Yii::t('app', 'Работы'); $this->params['breadcrumbs'][] = $this->title; ?> <div class="portfolio-record-index"> <h1><?php echo Html::encode($this->title); ?> </h1> <?php // echo $this->render('_search', ['model' => $searchModel]); ?> <p> <?php echo Html::a(Yii::t('app', 'Добавить'), ['create'], ['class' => 'btn btn-success']); ?> </p> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'id', 'title', ['header' => '', 'class' => \app\modules\core\components\ImageColumn::className()], 'alias', 'client', ['class' => 'yii\\grid\\ActionColumn', 'template' => '{update}{delete}']]]); ?> </div>
} ?> <?php echo $form->field($model, '[' . $k . ']position')->textInput(); ?> </div> </div> <?php if (!$model->isNewRecord) { ?> <div class="well"> <h4>Части</h4> <?php echo \yii\grid\GridView::widget(['dataProvider' => new \yii\data\ActiveDataProvider(['query' => $model->getParts(true), 'pagination' => false]), 'columns' => [['attribute' => 'parentId', 'value' => 'parent.title', 'filter' => \app\modules\services\models\ServicesPartsRecord::dropdown($model->id)], 'title', 'content', ['class' => \yii\grid\ActionColumn::className(), 'template' => '{update} {delete}', 'controller' => 'parts', 'header' => Html::a('<i class="glyphicon glyphicon-plus"></i> Добавить', ['parts/create', 'serviceId' => $model->id, 'lang' => $model->lang])]]]); ?> </div> <div class="well"> <h4>Портфолио</h4> <?php echo \yii\grid\GridView::widget(['dataProvider' => new \yii\data\ActiveDataProvider(['query' => $model->getPortfolio()->position(), 'pagination' => false]), 'columns' => ['title', ['class' => \app\modules\core\components\ImageColumn::className()], 'content', ['class' => \yii\grid\ActionColumn::className(), 'template' => '{update} {delete}', 'controller' => 'portfolio', 'header' => Html::a('<i class="glyphicon glyphicon-plus"></i> Добавить', ['portfolio/create', 'serviceId' => $model->id, 'lang' => $model->lang])]]]); ?> </div> <?php } ?> </div> </div>
use yii\helpers\Html; use yii\grid\GridView; /* @var $this yii\web\View */ /* @var $searchModel app\modules\clients\models\ClientsRecordSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = Yii::t('app', 'Клиенты'); $this->params['breadcrumbs'][] = $this->title; ?> <div class="clients-record-index"> <h1><?php echo Html::encode($this->title); ?> </h1> <?php // echo $this->render('_search', ['model' => $searchModel]); ?> <p> <?php echo Html::a(Yii::t('app', 'Добавить'), ['create'], ['class' => 'btn btn-success']); ?> </p> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'id', ['class' => \app\modules\core\components\ImageColumn::className()], 'title', 'alias', 'description:ntext', ['class' => 'yii\\grid\\ActionColumn']]]); ?> </div>
use yii\helpers\Html; use yii\grid\GridView; use app\modules\article\models\CategoryRecord; /* @var $this yii\web\View */ /* @var $searchModel app\modules\article\models\EventsRecordSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = Yii::t('app', 'Новости'); $this->params['breadcrumbs'][] = $this->title; ?> <div class="events-record-index"> <h1><?php echo Html::encode($this->title); ?> </h1> <?php // echo $this->render('_search', ['model' => $searchModel]); ?> <p> <?php echo Html::a(Yii::t('app', 'Добавить'), ['create'], ['class' => 'btn btn-success']); ?> </p> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'id', ['class' => \app\modules\core\components\ImageColumn::className()], ['attribute' => 'categoryId', 'value' => 'category.title', 'filter' => CategoryRecord::dropdown()], 'title', 'alias', 'dateUpdate:date', ['class' => 'yii\\grid\\ActionColumn', 'template' => '{update} {delete}']]]); ?> </div>