Example #1
0
                 echo '<li>', I18N::translate('This media object is not linked to any other record.'), '</li>';
             }
             echo '</ul>';
             echo '</div>';
             // close div="find-media-media"
         }
     } else {
         echo '<p>', I18N::translate('No results found.'), '</p>';
     }
     echo '</div>';
 }
 // Output Places
 if ($type == "place") {
     echo '<div id="find-output">';
     if (!$filter || $all) {
         $places = Place::allPlaces($WT_TREE);
     } else {
         $places = Place::findPlaces($filter, $WT_TREE);
     }
     if ($places) {
         echo '<ul>';
         foreach ($places as $place) {
             echo '<li><a href="#" onclick="pasteid(\'', Filter::escapeJs($place->getGedcomName()), '\');">';
             if (!$filter || $all) {
                 echo $place->getReverseName();
                 // When displaying all names, sort/display by the country, then region, etc.
             } else {
                 echo $place->getFullName();
                 // When we’ve searched for a place, sort by this place
             }
             echo '</a></li>';
Example #2
0
$level = count($parent);
if ($display == 'hierarchy') {
    if ($level) {
        $controller->setPageTitle(I18N::translate('Place hierarchy') . ' - <span dir="auto">' . Filter::escapeHtml(end($parent)) . '</span>');
    } else {
        $controller->setPageTitle(I18N::translate('Place hierarchy'));
    }
} else {
    $controller->setPageTitle(I18N::translate('Place list'));
}
$controller->pageHeader();
echo '<div id="place-hierarchy">';
switch ($display) {
    case 'list':
        echo '<h2>', $controller->getPageTitle(), '</h2>';
        $list_places = Place::allPlaces($WT_TREE);
        $num_places = count($list_places);
        if ($num_places == 0) {
            echo '<b>', I18N::translate('No results found.'), '</b><br>';
        } else {
            echo '<table class="list_table">';
            echo '<tr><td class="list_label" ';
            echo ' colspan="', $num_places > 20 ? 3 : 2, '"><i class="icon-place"></i> ';
            echo I18N::translate('Place list');
            echo '</td></tr><tr><td class="list_value_wrap"><ul>';
            foreach ($list_places as $n => $list_place) {
                echo '<li><a href="', $list_place->getURL(), '">', $list_place->getReverseName(), '</a></li>';
                if ($num_places > 20) {
                    if ($n == (int) ($num_places / 3)) {
                        echo '</ul></td><td class="list_value_wrap"><ul>';
                    }