get_facts(); } // Implement WT_Module_Tab public function isGrayedOut() { return !$this->get_facts(); } // Implement WT_Module_Tab public function getTabContent() { global $SHOW_LEVEL2_NOTES, $NAV_SOURCES, $controller; ob_start(); echo ''; ?> get_facts() as $fact) { if ($fact->getTag() == 'SOUR') { print_main_sources($fact, 1); } else { for ($i=2; $i<4; ++$i) { print_main_sources($fact, $i); } } } if (!$this->get_facts()) { echo ''; } // New Source Link if ($controller->record->canEdit()) { ?>
onclick="jQuery('tr.row_sour2').toggle();">
', WT_I18N::translate('There are no Source citations for this individual.'), '
jQuery("tr.row_sour2").toggle();'; } return '
'.ob_get_clean().'
'; } function get_facts() { global $controller; if ($this->facts === null) { $facts = $controller->record->getFacts(); foreach ($controller->record->getSpouseFamilies() as $family) { if ($family->canShow()) { foreach ($family->getFacts() as $fact) { $facts[] = $fact; } } } $this->facts = array(); foreach ($facts as $fact) { if (preg_match('/(?:^1|\n\d) SOUR/', $fact->getGedcom())) { $this->facts[] = $fact; } } sort_facts($this->facts); } return $this->facts; } // Implement WT_Module_Tab public function canLoadAjax() { global $SEARCH_SPIDER; return !$SEARCH_SPIDER; // Search engines cannot use AJAX } // Implement WT_Module_Tab public function getPreLoadContent() { return ''; } }