Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/235.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何在YiBooster中的TbExtendedGridView下显示分页链接?_Php_Gridview_Yii_Pagination_Yii Booster - Fatal编程技术网

Php 如何在YiBooster中的TbExtendedGridView下显示分页链接?

Php 如何在YiBooster中的TbExtendedGridView下显示分页链接?,php,gridview,yii,pagination,yii-booster,Php,Gridview,Yii,Pagination,Yii Booster,我一直在搜索,但找不到显示分页链接的方法,如下所示: 在网格视图上 我的网格有以下配置: <?php $dataProvider=$model->search(); $dataProvider->pagination = array('pageSize'=>1); // Forced to show 1 item per page to make sure the pagination is triggered. $widget = $this->widget('

我一直在搜索,但找不到显示分页链接的方法,如下所示:

在网格视图上

我的网格有以下配置:

<?php
$dataProvider=$model->search();
$dataProvider->pagination = array('pageSize'=>1); // Forced to show 1 item per page to make sure the pagination is triggered.
$widget = $this->widget('bootstrap.widgets.TbExtendedGridView', array(
  'id'=>'_grid',
  // 'filter'=>new CallReport,
  'fixedHeader' => true,
  'responsiveTable' => true,
  'headerOffset' => 30, // 40px is the height of the main navigation at bootstrap
  'selectableRows'=>1,
  'selectionChanged'=>'function(id){ 
    if ( $.fn.yiiGridView.getSelection(id).length ) {
      $("#selectBtnID").fadeIn("fast");
    } else {
      $("#selectBtnID").fadeOut("fast");
    }
  }',
  'afterAjaxUpdate'=>'function(id){ 
    if ( $.fn.yiiGridView.getSelection(id).length ) {
      $("#selectBtnID").fadeIn("fast");
    } else {
      $("#selectBtnID").fadeOut("fast");
    }
  }',
  'type'=>'striped bordered',
  'enablePagination' => true,
  'pager' => array(
        'cssFile' => false,
        'header' => false,
        'firstPageLabel' => 'First',
        'prevPageLabel' => 'Previous',
        'nextPageLabel' => 'Next',
        'lastPageLabel' => 'Last',
    ),
  'summaryText'=>'Displaying {start}-{end} of {count} results.',
  'dataProvider' => $dataProvider,
  'template' => "{items}",
  'columns' => array(
            array('name' => 'call_date','header' => 'Call Date'),
            array('name'=>'remarks', 'header'=>'Remarks'),
            array('name'=>'appointment_date', 'header'=>'Appointment Date'),
            array('name'=>'appointment_venue', 'header'=>'Appointment Venue'),
            array('name'=>'appointment_remarks', 'header'=>'Appointment Remarks'),
            array('name'=>'issues_concern', 'header'=>'Issues/Concern'),
            array('name'=>'supervisor_message', 'header'=>'Supervisor Message'),
    ),
));
?>

只需像这样修复模板行

....
    'summaryText'=>'Displaying {start}-{end} of {count} results.',
    'dataProvider' => $dataProvider,
    'template' => "{items}",
....

我有一个类似的问题, 对我来说,这篇总结文章没有显示出来

我的代码是

$this->widget('booster.widgets.TbExtendedGridView',
        array(
                'type' => 'striped',
                'dataProvider' => $dataprovider,
                'responsiveTable' => true,
                'summaryText'=>'Displaying {start}-{end} of {count} results.',
                'template' => "{items}{pager}",             
                'columns' => array(
                        array(
                                'header'=>'Title',
                                'value'=>'$data->qtitle',
                        ),
                        array(
                                'header'=>'Url',
                                'type'=>'raw',
                                'value'=>'$data->qurl',
                ),
                array(
                        'header'=>'Attachments',
                        'type'=>'html',
                        'value'=>function($data) {
                            $arr=json_decode($data->attachments);
                            if(count($arr)<1) return "No Attachments";
                            else{
                                $value=Files::model()->getfileurls($arr);   
                            }

                            return $value;
                        },
                        ),
                array(
                    'header'=>'Submited On',
                    'value'=>'$data->submitedon',
                        ),

                ),
));
$this->widget('booster.widgets.TbExtendedGridView',
排列(
'type'=>'striped',
“dataProvider”=>$dataProvider,
“responsiveTable”=>true,
'summaryText'=>'显示{count}结果的{start}-{end}',
'模板'=>“{items}{pager}”,
'列'=>数组(
排列(
“标题”=>“标题”,
'值'=>'$data->qtitle',
),
排列(
'header'=>'Url',
'type'=>'raw',
'值'=>'$data->qurl',
),
排列(
'标题'=>'附件',
'type'=>'html',
'value'=>函数($data){
$arr=json_decode($data->attachments);
if(count($arr)getfileurl($arr);
}
返回$value;
},
),
排列(
'标题'=>'提交日期',
'值'=>'$data->提交',
),
),
));
$this->widget('booster.widgets.TbExtendedGridView',
        array(
                'type' => 'striped',
                'dataProvider' => $dataprovider,
                'responsiveTable' => true,
                'summaryText'=>'Displaying {start}-{end} of {count} results.',
                'template' => "{items}{pager}",             
                'columns' => array(
                        array(
                                'header'=>'Title',
                                'value'=>'$data->qtitle',
                        ),
                        array(
                                'header'=>'Url',
                                'type'=>'raw',
                                'value'=>'$data->qurl',
                ),
                array(
                        'header'=>'Attachments',
                        'type'=>'html',
                        'value'=>function($data) {
                            $arr=json_decode($data->attachments);
                            if(count($arr)<1) return "No Attachments";
                            else{
                                $value=Files::model()->getfileurls($arr);   
                            }

                            return $value;
                        },
                        ),
                array(
                    'header'=>'Submited On',
                    'value'=>'$data->submitedon',
                        ),

                ),
));