<?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'), )); ?>
<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 -->
<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">
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); }
?> </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>