Exemplo n.º 1
0
echo $box->renderCreateButton(Yii::t('hipanel:client', 'Create client'));
?>
            <?php 
echo $box->renderSearchButton();
?>
            <?php 
echo $box->renderSorter(['attributes' => ['article_name', 'post_date']]);
?>
            <?php 
echo $box->renderPerPage();
?>
        <?php 
$box->endActions();
?>
        <?php 
echo $box->renderSearchForm();
?>
    <?php 
$box->end();
?>
    <?php 
$box->beginBulkForm();
?>
        <?php 
echo ArticleGridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $model, 'columns' => ['article_name', 'post_date', 'is_published' => ['value' => function ($model) {
    return $model->is_published === 't' ? Html::tag('span', Yii::t('hipanel:client', 'Published'), ['class' => 'label label-success']) : Html::tag('span', Yii::t('hipanel:client', 'Unpublished'), ['class' => 'label label-warning']);
}, 'format' => 'html', 'filter' => StaticCombo::widget(['attribute' => 'is_published', 'model' => $model, 'data' => ['t' => Yii::t('hipanel:client', 'Published'), 'f' => Yii::t('hipanel:client', 'Unpublished')], 'hasId' => true, 'inputOptions' => ['id' => 'responsible_id'], 'pluginOptions' => ['select2Options' => ['multiple' => false]]])]]]);
?>
    <?php 
$box->endBulkForm();
Pjax::end();