<?php if ($is_wing_leader) { ?> <a href="#" class="link-de-activate"><?php echo link_to('de-activate', 'wingleader/delete?id=' . $is_wing_leader->getId() . '&person_id=' . $person->getId(), array('post' => true, 'confirm' => 'Are you sure want to de-activate')); ?> </a> <?php } ?> </tr> <tr class="alt"> <td class="cell-1">Wing Role</td> <?php $is_wing_role = WingJobPeer::getByPersonId($person->getId()); ?> <?php if (!$is_wing_role) { ?> <?php $linkb = 'add'; ?> <?php } else { ?> <?php $linkb = 'active'; ?> <?php }