record->canDisplayDetails()) { echo ""; } else { ?> getOtherFacts(); foreach ($otheritems as $key => $event) { if ($event->getTag()=="SOUR") print_main_sources($event->getGedcomRecord(), 1, $controller->record->getXref(), $event->getLineNumber()); $FACT_COUNT++; } } // 2nd level sources [ 1712181 ] $controller->record->add_family_facts(false); foreach ($controller->getIndiFacts() as $key => $factrec) { print_main_sources($factrec->getGedcomRecord(), 2, $controller->record->getXref(), $factrec->getLineNumber(), true); } if ($this->get_source_count()==0) echo ""; //-- New Source Link if ($controller->record->canEdit()) { ?>
"; print_privacy_error(); echo "
onclick="jQuery('tr.row_sour2').toggle();" />
".WT_I18N::translate('There are no Source citations for this individual.')."


getName().'_content">'.ob_get_clean().''; } function get_source_count() { global $controller; if ($this->sourceCount===null) { $ct = preg_match_all("/\d SOUR @(.*)@/", $controller->record->getGedcomRecord(), $match, PREG_SET_ORDER); foreach ($controller->record->getSpouseFamilies() as $sfam) $ct += preg_match("/\d SOUR /", $sfam->getGedcomRecord()); $this->sourceCount = $ct; } return $this->sourceCount; } // Implement WT_Module_Tab public function hasTabContent() { return WT_USER_CAN_EDIT || $this->get_source_count()>0; } // Implement WT_Module_Tab public function isGrayedOut() { return $this->get_source_count()==0; } // 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 ''; } // Implement WT_Module_Tab public function getJSCallback() { return ''; } }