controller->indi->canDisplayDetails()) { print ""; } else { ?> controller->getOtherFacts(); foreach ($otherfacts as $key => $event) { $fact = $event->getTag(); if ($fact=="NOTE") { print_main_notes($event->getGedcomRecord(), 1, $this->controller->pid, $event->getLineNumber()); } $FACT_COUNT++; } // 2nd to 5th level notes/sources $this->controller->indi->add_family_facts(false); foreach ($this->controller->getIndiFacts() as $key => $factrec) { for ($i=2; $i<6; $i++) { print_main_notes($factrec->getGedcomRecord(), $i, $this->controller->pid, $factrec->getLineNumber(), true); } } if ($this->get_note_count()==0) echo "\n"; //-- New Note Link if ($this->controller->canedit) { ?>
"; print_privacy_error(); print "
onclick="toggleByClassName('TR', 'row_note2');" />
".i18n::translate('There are no Notes for this individual.')."



getName().'_content">'.ob_get_clean().''; } function get_note_count() { if ($this->noteCount===null) { $ct = preg_match_all("/\d NOTE /", $this->controller->indi->getGedcomRecord(), $match, PREG_SET_ORDER); foreach ($this->controller->indi->getSpouseFamilies() as $k => $sfam) $ct += preg_match("/\d NOTE /", $sfam->getGedcomRecord()); $this->noteCount = $ct; } return $this->noteCount; } // Implement WT_Module_Tab public function hasTabContent() { return WT_USER_CAN_EDIT || $this->get_note_count()>0; } // Implement WT_Module_Tab public function canLoadAjax() { return true; } // Implement WT_Module_Tab public function getPreLoadContent() { return ''; } // Implement WT_Module_Tab public function getJSCallback() { return ''; } }