<?php
$this->PageTitle = 'prioridades';

$this->menu = array(
	array('label'=>FaHtml::iconNovo(), 'url'=>array('create')),
	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')),
);
?>

<?php
$dataProvider = $model->search();
?>
<div class="search-form" style="display:<?php echo ($dataProvider->totalItemCount > 0) ? 'none' : 'block'; ?>" >
<?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',
	'pager' => Util::getPagerDefaultConfig(),
	'columns' => array(
		'PRI_IDPRIORIDADE',
		'PRI_DESCRICAO',
		array(
			'class' => 'CButtonColumn',
		),
	),
));