<h2>短信列表</h2><?php echo CHtml::link('发送短信', array('message/group'));?>
<?php $this->widget('admin.widgets.TableCover');?>
<?php $this->renderPartial('_search');?>

<?php
$this->widget(
    'zii.widgets.grid.CGridView',
    array(
        'dataProvider' => $dataProvider,
        'itemsCssClass' => 'widefat post',
        'summaryText'=>'显示{start}-{end}条 总共{count}条',
        'ajaxUpdate' => false,
        'columns' => array(
            'mid',
            array(
                'name' => '标题',
                'type' => 'raw',
                'value' => 'CHtml::link($data->data->subject, array("message/view","mid"=>$data->mid), array("class"=>"view"))',
            ),
            array(
                'name' => '接收者',
                'value' => '$data->member->username',
            ),
            array(
                'name' => '状态',
                'value' => '$data->getIsNew()'
            ),
            'msgtoid',
            'msgfrom',
            'msgfromid',
            array(
                'name' => 'createdate',
                'value' => 'date("Y-m-d H:i:s", $data->createdate)',
            )
        ),
        'afterAjaxUpdate' => "function(id,data){ $('a.view').fancybox({'titleShow':false,'scrolling':false,'mouseEnabled':false,'gallery':false}); }",
    )
);
?>
<?php
$this->widget('application.extensions.fancybox.EFancyBox', array(
    'target'=>'a.view',
    'config'=>array(
            'titleShow' => false,
            'scrolling' => false,
            'mouseEnabled' => false,
            'gallery' => false,
        ),
    )
);
?>