<?php
$this->PageTitle = 'Especificação Funcional &raquo; Visualizar &raquo; ' . GxHtml::encode(GxHtml::valueEx($model));
$this->widget('zii.widgets.CDetailView', array(
    'data' => $model,
    'attributes' => array(
        'ESP_IDESPECIFICACAO',
        'ESP_DATA',
        array(
            'name' => 'Projeto',
            'type' => 'raw',
            'value' => $model->Projeto !== null ? GxHtml::link(GxHtml::encode(GxHtml::valueEx($model->Projeto)), array('projetos/view', 'id' => GxActiveRecord::extractPkValue($model->Projeto, true))) : null,
        ),
        array(
            'name' => 'Solicitacao',
            'type' => 'raw',
            'value' => $model->Solicitacao !== null ? GxHtml::link(GxHtml::encode(GxHtml::valueEx($model->Solicitacao)), array('solicitacoes/view', 'id' => GxActiveRecord::extractPkValue($model->Solicitacao, true))) : null,
        ),
        'ESP_OBJETIVO',
        array(
            'name' => 'Analista',
            'type' => 'raw',
            'value' => $model->Analista !== null ? GxHtml::link(GxHtml::encode(GxHtml::valueEx($model->Analista)), array('funcionarios/view', 'id' => GxActiveRecord::extractPkValue($model->Analista, true))) : null,
        ),
        array(
            'name' => 'Programador',
            'type' => 'raw',
            'value' => $model->Programador !== null ? GxHtml::link(GxHtml::encode(GxHtml::valueEx($model->Programador)), array('funcionarios/view', 'id' => GxActiveRecord::extractPkValue($model->Programador, true))) : null,
        ),
        array(
            'name' => 'Tester',
            'type' => 'raw',
            'value' => $model->Tester !== null ? GxHtml::link(GxHtml::encode(GxHtml::valueEx($model->Tester)), array('funcionarios/view', 'id' => GxActiveRecord::extractPkValue($model->Tester, true))) : null,
        ),
        'ESP_FOMRSALTERADOS',
        'ESP_FORMSCRIADOS',
        'ESP_INFORMACOESADICIONAIS',
    ),
));
?>

<h2><?php echo GxHtml::encode($model->getRelationLabel('Requisitos')); ?></h2>
<?php
echo GxHtml::openTag('ul');
foreach ($model->Requisitos as $relatedModel) {
    echo GxHtml::openTag('li');
    echo GxHtml::link(GxHtml::encode(GxHtml::valueEx($relatedModel)), array('especificacaoFuncionalRequisitos/view', 'id' => GxActiveRecord::extractPkValue($relatedModel, true)));
    echo GxHtml::closeTag('li');
}
echo GxHtml::closeTag('ul');
?><h2><?php echo GxHtml::encode($model->getRelationLabel('Simulacoes')); ?></h2>
<?php
echo GxHtml::openTag('ul');
foreach ($model->Simulacoes as $relatedModel) {
    echo GxHtml::openTag('li');
    echo GxHtml::link(GxHtml::encode(GxHtml::valueEx($relatedModel)), array('especificacaoFuncionalSimulacao/view', 'id' => GxActiveRecord::extractPkValue($relatedModel, true)));
    echo GxHtml::closeTag('li');
}
echo GxHtml::closeTag('ul');
?>
<h2><?php echo GxHtml::encode($model->getRelationLabel('Tabelas')); ?></h2>
<?php
echo GxHtml::openTag('ul');
foreach ($model->Tabelas as $relatedModel) {
    echo GxHtml::openTag('li');
    echo GxHtml::link(GxHtml::encode(GxHtml::valueEx($relatedModel)), array('especificacaoFuncionalTabelas/view', 'id' => GxActiveRecord::extractPkValue($relatedModel, true)));
    echo GxHtml::closeTag('li');
}
echo GxHtml::closeTag('ul');