<?php
/* @var $this RelatorioCancelamentosController */
/* @var $model RelatorioCancelamentos */

$botoes = User::isAdmin() ? '{view}{update}{delete}' : '';


$this->menu = array(
	array('label'=>'Exportar', 'url'=>array('excel')),
	array('label' => FaHtml::iconSetaClose(), 'url' => '#', 'linkOptions' => array('class' => 'search-button')),
	array('label' => FaHtml::iconRefresh(), 'url' => 'javascript:void(0);', 'linkOptions' => array('onclick' => 'reloadFrame();', 'class' => 'refresh-button'))
);
?>

<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->

<?php $this->widget('ext.Utils.widgets.CrmGridView', array(
	'id' => 'admin-grid',
	'dataProvider' => $model->search(),
	'afterAjaxUpdate'=>'updated',
	'selectableRows'=>1,
	'pager' => Util::getPagerDefaultConfig(),
	'columns'=>array(
		'RCC_MES',
		'RCC_ANO',
		'RCC_CNPJ',
		'RCC_RAZAO',
		'RCC_CONTRATACAO',
		'RCC_VALOR',
		'RCC_USUARIOS',
		'RCC_CIDADE',
		'RCC_UF',
		'RCC_REVENDA',
		'RCC_OBSERVACAO',
		'RCC_TERMINO',
		'RCC_MOTIVO',
		'RCC_MOTIVOVENDEDOR',
		'RCC_EMPRESA',
		'RCC_VENCIMENTO',
		'Lista.RCL_NOME',
		'Acao.RCA_ACAO',
		array(
			'class'=>'CButtonColumn',
			'template'=>$botoes,
		),
	),
)); ?>
