/** * XML <Footnote > start element * Collect the Footnote links * GEDCOM Records that are protected by Privacy setting will be ignore * * @param array $attrs an array of key value pairs for the attributes */ private function footnoteStartHandler($attrs) { global $WT_TREE; $id = ""; if (preg_match("/[0-9] (.+) @(.+)@/", $this->gedrec, $match)) { $id = $match[2]; } $record = GedcomRecord::GetInstance($id, $WT_TREE); if ($record && $record->canShow()) { array_push($this->print_data_stack, $this->print_data); $this->print_data = true; $style = ""; if (!empty($attrs['style'])) { $style = $attrs['style']; } $this->footnote_element = $this->current_element; $this->current_element = $this->report_root->createFootnote($style); } else { $this->print_data = false; $this->process_footnote = false; } }
/** * Format a list of facts for display * * @param Fact[] $list * @param string $tag1 * @param string $tag2 * @param bool $show_sex_symbols * * @return string */ function calendar_list_text($list, $tag1, $tag2, $show_sex_symbols) { global $males, $females, $WT_TREE; $html = ''; foreach ($list as $id => $facts) { $tmp = GedcomRecord::GetInstance($id, $WT_TREE); $html .= $tag1 . '<a href="' . $tmp->getHtmlUrl() . '">' . $tmp->getFullName() . '</a> '; if ($show_sex_symbols && $tmp instanceof Individual) { switch ($tmp->getSex()) { case 'M': $html .= '<i class="icon-sex_m_9x9" title="' . I18N::translate('Male') . '"></i>'; ++$males; break; case 'F': $html .= '<i class="icon-sex_f_9x9" title="' . I18N::translate('Female') . '"></i>'; ++$females; break; default: $html .= '<i class="icon-sex_u_9x9" title="' . I18N::translateContext('unknown gender', 'Unknown') . '"></i>'; break; } } $html .= '<div class="indent">' . $facts . '</div>' . $tag2; } return $html; }