Hello,
I installed Kartik in my project, I added toolbar and panel, but it hides the pagination. How can I make it appear?
<?php
use kartik\grid\GridView;
use yii\helpers\Html;
//use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel app\models\CitySearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Villes';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="city-index">
<!--<h1><?= Html::encode($this->title) ?></h1>-->
<p>
<!--<?= Html::a('Create City', ['create'], ['class' => 'btn btn-success']) ?>-->
</p>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
//attributes kartik ici...
'bootstrap' => true,
'responsive' => true,
'responsiveWrap' => true,
'bordered' => false,
'hover' => true,
'resizableColumns'=>false,
'floatHeader'=>true,
'toolbar' => [
[
'content'=>
Html::button('<i class="glyphicon glyphicon-plus"></i>', [
'type'=>'button',
//'title'=>Yii::t('kvgrid', 'Add Book'),
'class'=>'btn btn-success'
]) . ' '.
Html::a('<i class="fas fa-redo"></i>', ['grid-demo'], [
'class' => 'btn btn-secondary',
//'title' => Yii::t('kvgrid', 'Reset Grid')
]),
'options' => ['class' => 'btn-group-sm']
],
'{export}',
'{toggleData}'
],
'toggleDataContainer' => ['class' => 'btn-group-sm'],
'exportContainer' => ['class' => 'btn-group-sm'],
'panel' => [
'heading'=>'<h3 class="panel-title"><i class="glyphicon glyphicon-globe"></i> Villes</h3>',
'type'=>'primary',
'before'=>Html::a('<i class="glyphicon glyphicon-plus"></i> Creation ville', ['create'], ['class' => 'btn btn-success']),
'after'=>Html::a('<i class="fas fa-redo"></i> Retour en haut', ['index'], ['class' => 'btn btn-info']),
'footer'=>false
],
//Colonnes visible
'columns' => [
//['class' => 'yii\grid\SerialColumn'],
['class' => 'kartik\grid\SerialColumn'],
//'id',
'zip',
'name',
//'is_subcity',
//'countryid',
'countryName',//ajout de la colonne
//['class' => 'yii\grid\ActionColumn'],
['class' => 'kartik\grid\ActionColumn',
'template' => '{update} {delete}'],//rend visible uniquement les icônes update et delete, cache l'icône view
],
]); ?>
</div>