<?php /** * @var \common\components\View $this * @var string $id идентификатор виджета * @var \yii\data\ActiveDataProvider $dataProvider провайдер данных */ use yii\helpers\Html; use yii\widgets\Pjax; use common\widgets\ListView; echo Html::beginTag('div', ['id' => $id]); Pjax::begin(["id" => "{$id}-pjax"]); echo ListView::widget(['id' => "{$id}-list-view", 'dataProvider' => $dataProvider, 'itemView' => '_item', 'options' => ['class' => 'list-view reviews-list-view'], 'summary' => '', 'emptyText' => '']); Pjax::end(); echo Html::endTag('div');
<?php /* @var $this yii\web\View */ /* @var $userAuth \common\models\User */ /* @var $userView \common\models\User */ /* @var $dataProvider \yii\data\ActiveDataProvider */ echo \common\widgets\ListView::widget(['dataProvider' => $dataProvider, 'itemOptions' => ['tag' => false], 'options' => ['tag' => false], 'itemView' => function ($model, $key, $index, $widget) use($userView) { return \common\widgets\Wall::widget(['model' => $model, 'userView' => $userView]); }, 'layout' => '{items}']);
<div class="table_list"> <?php $mainForm = ActiveForm::begin(['id' => 'main-form', 'action' => '']); ?> <table width="100%"> <thead> {header} </thead> {data} </table> <?php ActiveForm::end(); ?> </div> <?php echo $this->render('/common/_tree-page', ['models' => $models]); ?> <div class="btn_wrap"> <div class="btn_wrap_pd"> {actionButtons} </div> </div> <?php ListView::end();
echo Yii::t('main/app', 'Error when adding a comment'); ?> </div> <a name="comments-add-form"></a> <div class="comments-re-wrapper"><strong>RE:</strong> <span class="comments-re-info"></span> [<a class="comments-re-cancel" href="#"><?php echo Yii::t('main/app', 'Cancel'); ?> </a>] </div> <?php $form = ActiveForm::begin($formOptions); echo $form->field($model, 'username'); echo $form->field($model, 'email'); echo $form->field($model, 'text')->widget($editorClass, $editorOptions); echo Html::activeHiddenInput($model, 'model'); echo Html::activeHiddenInput($model, 'item_id'); echo Html::hiddenInput("parent_id"); echo \common\widgets\JsCaptcha::widget(["model" => $model, "attribute" => "verifyCode", "value" => $model::VERIFY_CODE]); ?> <div class="form-group"> <?php echo Html::submitButton(Yii::t('main/app', 'Submit'), ["class" => "comments-add btn btn-primary"]); ?> </div> <?php ActiveForm::end(); Pjax::begin(["id" => "pjax-{$id}"]); echo ListView::widget(["dataProvider" => $dataProvider, "itemView" => "_item", "viewParams" => ["marginStep" => $marginStep], "summary" => "", "emptyText" => Yii::t("main/app", "Be the first to leave a comment")]); Pjax::end(); echo Html::endTag('div');