show_thumbs = WT_Filter::getBool('show_thumbs'); if ($this->root && $this->root->canShowName()) { $this->setPageTitle( /* I18N: %s is an individual’s name */ WT_I18N::translate('Compact tree of %s', $this->root->getFullName()) ); } else { $this->setPageTitle(WT_I18N::translate('Compact tree')); } $this->treeid = $this->sosaAncestors(5); } public function sosaIndividual($n) { global $SHOW_HIGHLIGHT_IMAGES; $indi = $this->treeid[$n]; if ($indi && $indi->canShowName()) { $name=$indi->getFullName(); $addname=$indi->getAddName(); if ($this->show_thumbs && $SHOW_HIGHLIGHT_IMAGES) { $html=$indi->displayImage(); } else { $html=''; } $html .= ''; $html .= $name; if ($addname) $html .= '
' . $addname; $html .= '
'; $html .= '
'; if ($indi->canShow()) { $html.='
'.$indi->getLifeSpan().'
'; } } else { // Empty box $html = ' '; } // -- box color $isF=''; if ($n==1) { if ($indi && $indi->getSex()=='F') { $isF='F'; } } elseif ($n%2) { $isF='F'; } // -- box size if ($n==1) { return ''.$html.''; } else { return ''.$html.''; } } public function sosaArrow($n, $arrow_dir) { global $TEXT_DIRECTION; $indi = $this->treeid[$n]; $arrow_dir = substr($arrow_dir, 0, 1); if ($TEXT_DIRECTION == 'rtl') { if ($arrow_dir=='l') { $arrow_dir = 'r'; } elseif ($arrow_dir == 'r') { $arrow_dir = 'l'; } } if ($indi) { $title = WT_I18N::translate('Compact tree of %s', $indi->getFullName()); $text = '"; } else { $text = ''; } return $text; } }