<?php slot('share_text'); echo entity_link($relationship['Entity1']); ?> <?php echo $current === NULL ? "is/was" : ($current == '1' ? "is" : "was"); ?> a member of <?php echo entity_link($relationship['Entity2']); end_slot(); echo get_slot('share_text'); slot('share_text', RelationshipTable::formatSentenceForShare(get_slot('share_text'))); ?> </span> <br /> <br /> <?php $data = array('Title' => $relationship['description1'], 'Start date' => Dateable::convertForDisplay($relationship['start_date']), 'End date' => Dateable::convertForDisplay($relationship['end_date']), 'Is current' => LsLogic::nullOrBoolean($relationship['is_current']), 'Dues' => readable_number($relationship['dues'], '$'), 'Notes' => $relationship['notes'] ? nl2br($relationship['notes']) : null); ?> <?php include_partial('global/section', array('title' => 'Details')); ?> <div class="padded"> <?php include_partial('global/datatable', array('data' => $data)); ?> </div>
<?php $data[ucfirst($desc1)] = entity_link($relationship['Entity1']); ?> <?php } ?> <?php if ($desc2 = $relationship['description2']) { ?> <?php $data[' ' . ucfirst($desc2)] = entity_link($relationship['Entity2']); ?> <?php } } ?> <?php $data = array_merge($data, array('Start date' => Dateable::convertForDisplay($relationship['start_date']), 'End date' => Dateable::convertForDisplay($relationship['end_date']), 'Is current' => LsLogic::nullOrBoolean($relationship['is_current']), 'Notes' => $relationship['notes'] ? nl2br($relationship['notes']) : null)); ?> <?php include_partial('global/section', array('title' => 'Details')); ?> <div class="padded"> <?php include_partial('global/datatable', array('data' => $data)); ?> </div>
static function birthDatesAreCompatible(LsDate $d1, LsDate $d2, $maxYearDiff = 1) { if ($d1->isblank() || $d2->isBlank()) { return true; } elseif (abs($d1->getYear() - $d2->getYear()) <= $maxYearDiff && LsLogic::areCompatible($d1->getMonth(true), $d2->getMonth(true)) && LsLogic::areCompatible($d1->getDay(true), $d2->getDay(true))) { return true; } else { return false; } }
<?php slot('share_text'); echo entity_link($relationship['Entity1']); ?> <?php echo $current === NULL ? "is/was" : ($current == '1' ? "is" : "was"); ?> a student of <?php echo entity_link($relationship['Entity2']); end_slot(); echo get_slot('share_text'); slot('share_text', RelationshipTable::formatSentenceForShare(get_slot('share_text'))); ?> </span> <br /> <br /> <?php $data = array('Type' => $relationship['description1'], 'Start date' => Dateable::convertForDisplay($relationship['start_date']), 'End date' => Dateable::convertForDisplay($relationship['end_date']), 'Is current' => LsLogic::nullOrBoolean($relationship['is_current']), 'Degree' => RelationshipTable::getDegreeNameById($relationship['id']), 'Field' => $relationship['field'], 'Is dropout' => LsLogic::nullOrBoolean($relationship['is_dropout']), 'Notes' => $relationship['notes'] ? nl2br($relationship['notes']) : null); ?> <?php include_partial('global/section', array('title' => 'Details')); ?> <div class="padded"> <?php include_partial('global/datatable', array('data' => $data)); ?> </div>
<?php echo RelationshipTable::getDisplayDescription($relationship) ? '(' . RelationshipTable::getDisplayDescription($relationship) . ')' : ''; ?> <?php echo $relationship['Entity2']['primary_ext'] == 'Person' ? 'under' : 'at'; ?> <?php echo entity_link($relationship['Entity2']); end_slot(); echo get_slot('share_text'); slot('share_text', RelationshipTable::formatSentenceForShare(get_slot('share_text'))); ?> </span> <br /> <br /> <?php $data = array('Title' => $relationship['description1'], 'Start date' => Dateable::convertForDisplay($relationship['start_date']), 'End date' => Dateable::convertForDisplay($relationship['end_date']), 'Is current' => LsLogic::nullOrBoolean($relationship['is_current']), 'Board member' => LsLogic::nullOrBoolean($relationship['is_board']), 'Executive' => LsLogic::nullOrBoolean($relationship['is_executive']), 'Employee' => LsLogic::nullOrBoolean($relationship['is_employee']), 'Compensation' => readable_number($relationship['compensation'], '$'), 'Notes' => $relationship['notes'] ? nl2br($relationship['notes']) : null); ?> <?php include_partial('global/section', array('title' => 'Details')); ?> <div class="padded"> <?php include_partial('global/datatable', array('data' => $data)); ?> </div>