<?php $this->beginContent('//layouts/default'); ?>

<?php 

$candidatoId = (isset($this->actionParams['cid'])) ? $this->actionParams['cid'] : $this->actionParams['id'];

$editImg = CHtml::image(
        Yii::app()->baseUrl . '/images/icons/small/white/edit.png', 
        Yii::t('intranet', 'Modificar'), 
        array('class' => 'mgright5'));

$deleteImg = CHtml::image(
        Yii::app()->baseUrl . '/images/icons/small/white/close.png', 
        Yii::t('intranet', 'Eliminar'), 
        array('class' => 'mgright5'));

$botonesPrincipales = array(
    array(
        'label'         => $editImg . Yii::t('intranet', 'Modificar'),
        'url'           => $this->createUrl('candidato/update', array('id'=>$candidatoId)),
        'linkOptions'   => array('class'=>'iconlink'),
    ),
    array(
        'label'         => $deleteImg . Yii::t('intranet', 'Eliminar'),
        'url'           => '#', 
        'linkOptions'   => array(
            'class'     => 'iconlink',
            'submit'    => $this->createUrl('candidato/delete', array('id'=>$candidatoId)),
            'confirm'   => Yii::t('intranet', '¿Desea eliminar este candidato?')
        ),
    ),
);

$pestañas = array(
    array(
        'label'         => Yii::t('intranet', 'Resumen'),                
        'url'           => $this->createUrl('candidato/view',array('id' => $candidatoId)),
        'linkOptions'   => array('class'=>'candidatos'),
        'active'        => ($this->action->id == 'view'),
    ),
    array(
        'label'         => Yii::t('intranet', 'Capacidades profesionales'), 
        'url'           => $this->createUrl('candidatoCapacidad/index', array('cid'=>$candidatoId)),
        'active'        => ($this->id == 'candidatoCapacidad'),
    ),
    array(
        'label'         => Yii::t('intranet', 'Currículums'), 
        'url'           => $this->createUrl('candidatoDocumento/index', array('cid'=>$candidatoId)),
        'linkOptions'   => array('class'=>'curriculum'),
        'active'        => ($this->id == 'candidatoDocumento')
    ),     
    array(
        'label'         => Yii::t('intranet', 'Historial'), 
        'url'           => $this->createUrl('candidato/historial',array('id' => $candidatoId)),
        'linkOptions'   => array('class'=>'historial'),
        'active'        => ($this->action->id == 'historial'),
    ),
);

$this->menu=array(
    'principal' => $botonesPrincipales,
    'pestañas' => $pestañas,
);

?>
<div class="clear"></div>

<div class="two_third last">        
    <div id="tabs" class="tabs">
        <?php if (isset($this->menu['pestañas'])) : ?>
        <?php $this->widget('zii.widgets.CMenu',array(
            'htmlOptions'=>array(
                'class' => 'tabs-nav',
            ),
            'activeCssClass'=>'current',
            'linkLabelWrapper' => 'span',
            'items' => $this->menu['pestañas'],
        )); 
        ?>
        <?php endif ?>
        <div class="tabs-panel">
            <?php echo $content; ?>
        </div>
    </div>
</div><!-- two_third last -->
<?php $this->endContent(); ?>
