 <?php
 /* @var $this PaperController */
 /* @var $model Paper */
 $this->pageTitle = 'Semua Notifikasi';

 ?>

 <?php $this->widget('zii.widgets.grid.CGridView', array(
    'id' => 'paper-grid',
    'dataProvider' => $dataProvider,
                                        // 'filter' => $model,
    'itemsCssClass' => 'table-responsive table table-striped table-hover table-vcenter',
    'columns' => array(

        array(
            'header' => 'No',
            'value' => '$this->grid->dataProvider->pagination->currentPage*$this->grid->dataProvider->pagination->pageSize + $row+1',
            'htmlOptions' => array(
                'width' => '10px',
                'style' => 'text-align: center;'
            )
        ),


        'created_date',
        'description',
        array(
            'name'=>'status',
            'value'=>'$data->status == 0 ? "Belum di Lihat" : "Sudah di Lihat" '
        ),


        array(
            'class' => 'CButtonColumn',
            'template' => '{view}',
            'buttons' => array(
                'view' =>
                array(
                    'url' => 'Yii::app()->createUrl("main/paper/update", array("id"=>$data->user_id))',
                        // 'options' => array(
                        //     'ajax' => array(
                        //         'type' => 'POST',
                        //         'url' => "js:$(this).attr('href')",
                        //         'success' => 'function(data) { $("#viewModal .modal-body p").html(data); $("#viewModal").modal(); }'
                        //     ),
                        // ),
                ),
            ),
        ),
    ),
    )); ?>