Ejemplo n.º 1
0
                            break;
                    }
                    if ($count) {
                        if ($show === 'indi' && $givn_initial === $falpha && $show_all_firstnames === 'no') {
                            $list[] = '<a class="warning" href="' . $url . '&amp;falpha=' . rawurlencode($givn_initial) . '" title="' . I18N::number($count) . '">' . $html . '</a>';
                        } else {
                            $list[] = '<a href="' . $url . '&amp;falpha=' . rawurlencode($givn_initial) . '" title="' . I18N::number($count) . '">' . $html . '</a>';
                        }
                    } else {
                        $list[] = $html;
                    }
                }
                // Search spiders don't get the "show all" option as the other links give them everything.
                if (!Auth::isSearchEngine()) {
                    if ($show_all_firstnames === 'yes') {
                        $list[] = '<span class="warning">' . I18N::translate('All') . '</span>';
                    } else {
                        $list[] = '<a href="' . $url . '&amp;show_all_firstnames=yes">' . I18N::translate('All') . '</a>';
                    }
                }
                if ($show_all === 'no') {
                    echo '<h2 class="center">', I18N::translate('Individuals with surname %s', $legend), '</h2>';
                }
                echo '<p class="center alpha_index">', implode(' | ', $list), '</p>';
            }
        }
        if ($show === 'indi') {
            echo FunctionsPrintLists::familyTable(QueryName::families($WT_TREE, $surname, $alpha, $falpha, $show_marnm === 'yes'));
        }
    }
}
 /**
  * Get a list of surnames.
  *
  * @param Tree   $tree
  * @param string $alpha
  * @param string $surname
  *
  * @return string
  */
 public function getSurnameFams(Tree $tree, $alpha, $surname)
 {
     $families = QueryName::families($tree, $surname, $alpha, '', true);
     $out = '<ul>';
     foreach ($families as $family) {
         if ($family->canShowName()) {
             $out .= '<li><a href="' . $family->getHtmlUrl() . '">' . $family->getFullName() . ' ';
             if ($family->canShow()) {
                 $marriage_year = $family->getMarriageYear();
                 if ($marriage_year) {
                     $out .= ' (' . $marriage_year . ')';
                 }
             }
             $out .= '</a></li>';
         }
     }
     $out .= '</ul>';
     return $out;
 }