Example #1
0
function get_associate_relationship_name(WT_Individual $person1, WT_Individual $person2)
{
    if ($person1 === $person2) {
        $label = WT_I18N::translate('self');
    } else {
        $label = get_relationship_name(get_relationship($person1, $person2, true, 4));
    }
    return $label;
}
Example #2
0
	</form>

<?php 
$maxyoffset = $Dbaseyoffset;
if ($person1 && $person2) {
    if (!$disp) {
        echo '<div class="error">', WT_I18N::translate('This information is private and cannot be shown.'), '</div>';
    } elseif (!$node) {
        if ($path_to_find == 0) {
            echo '<p class="error">', WT_I18N::translate('No link between the two individuals could be found.'), '</p>';
        } else {
            echo '<p class="error">', WT_I18N::translate('No other link between the two individuals could be found.'), '</p>';
        }
    } else {
        if ($node) {
            echo '<h3>', WT_I18N::translate('Relationship: %s', get_relationship_name($node)), '</h3>';
            // Use relative layout to position the person boxes.
            echo '<div id="relationship_chart" style="position:relative;">';
            $yoffset = $Dbaseyoffset + 20;
            $xoffset = $Dbasexoffset;
            $colNum = 0;
            $rowNum = 0;
            $previous = '';
            $change_count = '';
            // shift right on alternate change of direction
            $xs = $Dbxspacing + 70;
            $ys = $Dbyspacing + 50;
            // step1 = tree depth calculation
            $dmin = 0;
            $dmax = 0;
            $depth = 0;