<?php
$this->PageTitle = false;

$this->renderPartial('_menu', array('model' => $model, 'active' => 'situacao'));

?>
<h1>Funcionários &raquo; Ativar/Inativar &raquo; <small><?php echo $model->FUN_NOME; ?></small></h1>

<?php 
    $this->renderPartial('_formsituacao', array('model' => $model, 'model_situacoes' => $model_situacoes));
?>

<h2>Histórico</h2>
<?php
$this->widget('ext.Utils.widgets.CrmGridView', array(
    'id' => 'situacao-grid',
    'dataProvider' => $situacoes->search(),
    'afterAjaxUpdate'=>'updated',
    'selectableRows' => 1,
    'columns' => array(
        array(
            'name' => 'Autor.FUN_NOME',
            'header' => 'Autor',
            'value' => '$data->Autor',
        ),
        array(
            'name' => 'FUS_SITUACAO',
            'value' => '$data->FUS_SITUACAO == "A" ? "Ativo" : "Inativo"',
            'cssClassExpression' => '"registro-situacao"',
        ),
        'FUS_DATA',
        'FUS_OBSERVACOES'
    ),
));