本文整理汇总了PHP中TbHtml::pager方法的典型用法代码示例。如果您正苦于以下问题:PHP TbHtml::pager方法的具体用法?PHP TbHtml::pager怎么用?PHP TbHtml::pager使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TbHtml
的用法示例。
在下文中一共展示了TbHtml::pager方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<?php echo CHtml::link('Tambah Kegiatan', array('kegiatan/create')); ?>
<?php $this->widget('zii.widgets.grid.CGridView', array(
'id'=>'kegiatan-grid',
'dataProvider'=>$model->search(),
'filter'=>$model,
'columns'=>array(
array(
'name'=>'regional',
'value'=>'$data->regional->nama',
),
'nama_kegiatan',
'pembicara',
'materi',
array('name'=>'jenis_kegiatan',
'value'=>'$data->jenis_kegiatan == "1" ? "Bulanan" : ($data->jenis_kegiatan == "2" ? "Pekanan" : ($data->jenis_kegiatan == "3" ? "Lokal" : "Khusus"))',
//'filter'=>array('1'=>'Bulanan', '2'=>'Pekanan', '3'=>'Lokal', '4'=>'Khusus'),
),
//'hari',
'tanggal',
'waktu_mulai',
'waktu_selesai',
array(
'class'=>'CButtonColumn',
),
),
)); ?>
<?php echo TbHtml::pager(array(
array('label' => 'Back', 'url' => '../site/index'),
)); ?>
示例2: array
<span class="error-label"><?php echo $form->error($model,'jenis_kelamin'); ?></span>
</div>
</div>
<div class="form-group">
<label for="" class="col-sm-2 control-label"><?php echo $form->labelEx($model,'status_aktif'); ?></label>
<div class="col-sm-4">
<?php echo "Aktif " . $form->radioButton($model, 'status_aktif', array('value'=>'1', 'uncheckValue'=>null));
echo " Tidak Aktif " . $form->radioButton($model,'status_aktif', array('value'=>'0', 'uncheckValue'=>null));
?>
<span class="error-label"><?php echo $form->error($model,'status_aktif'); ?></span>
</div>
</div>
<div class="form-actions">
<?php echo TbHtml::submitButton($model->isNewRecord ? 'Create' : 'Save',array(
'color'=>TbHtml::BUTTON_COLOR_PRIMARY,
'size'=>TbHtml::BUTTON_SIZE_LARGE,
)); ?><br>
<br> <?php echo TbHtml::pager(array(
)); ?><?php echo CHtml::link('Back', array('peserta/index')); ?>
</div>
</div>
<?php $this->endWidget(); ?>
</div><!-- form -->
示例3: array
<div class="bs-docs-example">
<?php
echo TbHtml::pager(array(array('label' => '← Older', 'url' => '#', 'previous' => true), array('label' => 'Newer →', 'url' => '#', 'next' => true)));
?>
</div>
<pre class="prettyprint linenums">
<?php echo TbHtml::pager(array(
array('label' => '&larr; Older', 'url' => '#', 'previous' => true),
array('label' => 'Newer &rarr;', 'url' => '#', 'next' => true),
)); ?></pre>
<h3>Optional disabled state</h3>
<div class="bs-docs-example">
<?php
echo TbHtml::pager(array(array('label' => '← Older', 'url' => '#', 'previous' => true, 'disabled' => true), array('label' => 'Newer →', 'url' => '#', 'next' => true)));
?>
</div>
<pre class="prettyprint linenums">
<?php echo TbHtml::pager(array(
array('label' => '&larr; Older', 'url' => '#', 'previous' => true, 'disabled' => true),
...
)); ?></pre>
</section>
<!-- Breadcrumbs
================================================== -->
<section id="breadcrumbs">
<div class="page-header">
示例4: testPager
public function testPager()
{
$I = $this->codeGuy;
$items = array(array('label' => 'Prev', 'url' => '#', 'previous' => true, 'htmlOptions' => array('disabled' => true)), array('label' => 'Next', 'url' => '#', 'next' => true));
$html = TbHtml::pager($items, array('class' => 'list'));
$ul = $I->createNode($html, 'ul.pager');
$I->seeNodeCssClass($ul, 'list');
$I->seeNodeNumChildren($ul, 2);
$prev = $ul->filter('li')->first();
$I->seeNodeCssClass($prev, 'previous disabled');
$a = $prev->filter('a');
$I->seeNodeAttribute($a, 'href', '#');
$I->seeNodeText($a, 'Prev');
$next = $ul->filter('li')->last();
$I->seeNodeCssClass($next, 'next');
$a = $next->filter('a');
$I->seeNodeAttribute($a, 'href', '#');
$I->seeNodeText($a, 'Next');
$html = TbHtml::pager(array());
$this->assertEquals('', $html);
}
示例5: array
?>
</td>
<td>
<?php echo CHtml::activeDropDownList($item,"[$i]id_status",$item->getStatusOption(), array('class' => 'form-control')); ?>
</td>
<td>
<?php echo $form->textField($item,"[$i]alasan", array('class' => 'form-control')); ?>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
<div class="row clearfix">
<div class="col-md-12 column">
<?php echo CHtml::submitButton('Submit',array('class'=>'btn btn-default')); ?>
</div>
<br>
<?php
echo TbHtml::pager(array(
array('label' => 'Back', 'url' => 'site/absensi/'),
));
?>
</div>
</div>
</div>
<?php $this->endWidget(); ?>
</div>