/** * Display the search results */ public function printResults() { if ($this->action !== 'replace' && ($this->query || $this->firstname || $this->lastname || $this->place)) { if ($this->myindilist || $this->myfamlist || $this->mysourcelist || $this->mynotelist) { $this->addInlineJavascript('jQuery("#search-result-tabs").tabs();'); $this->addInlineJavascript('jQuery("#search-result-tabs").css("visibility", "visible");'); $this->addInlineJavascript('jQuery(".loading-image").css("display", "none");'); echo '<br>'; echo '<div class="loading-image"></div>'; echo '<div id="search-result-tabs"><ul>'; if (!empty($this->myindilist)) { echo '<li><a href="#individual-results-tab">', I18N::translate('Individuals'), '</a></li>'; } if (!empty($this->myfamlist)) { echo '<li><a href="#families-results-tab">', I18N::translate('Families'), '</a></li>'; } if (!empty($this->mysourcelist)) { echo '<li><a href="#sources-results-tab">', I18N::translate('Sources'), '</a></li>'; } if (!empty($this->mynotelist)) { echo '<li><a href="#notes-results-tab">', I18N::translate('Notes'), '</a></li>'; } echo '</ul>'; if (!empty($this->myindilist)) { echo '<div id="individual-results-tab">', FunctionsPrintLists::individualTable($this->myindilist), '</div>'; } if (!empty($this->myfamlist)) { echo '<div id="families-results-tab">', FunctionsPrintLists::familyTable($this->myfamlist), '</div>'; } if (!empty($this->mysourcelist)) { echo '<div id="sources-results-tab">', FunctionsPrintLists::sourceTable($this->mysourcelist), '</div>'; } if (!empty($this->mynotelist)) { echo '<div id="notes-results-tab">', FunctionsPrintLists::noteTable($this->mynotelist), '</div>'; } echo '</div>'; } else { // One or more search terms were specified, but no results were found. echo '<div class="warning center">' . I18N::translate('No results found.') . '</div>'; } } }
echo '<li><a href="#sources-media"><span id="sourcemedia">', I18N::translate('Sources'), '</span></a></li>'; } if ($linked_repo) { echo '<li><a href="#repo-media"><span id="repomedia">', I18N::translate('Repositories'), '</span></a></li>'; } if ($linked_note) { echo '<li><a href="#notes-media"><span id="notemedia">', I18N::translate('Notes'), '</span></a></li>'; } echo '</ul>'; // Individuals linked to this media object if ($linked_indi) { echo '<div id="indi-media">', FunctionsPrintLists::individualTable($linked_indi), '</div>'; } // Families linked to this media object if ($linked_fam) { echo '<div id="fam-media">', FunctionsPrintLists::familyTable($linked_fam), '</div>'; } // Sources linked to this media object if ($linked_sour) { echo '<div id="sources-media">', FunctionsPrintLists::sourceTable($linked_sour), '</div>'; } // Repositories linked to this media object if ($linked_repo) { echo '<div id="repo-media">', FunctionsPrintLists::repositoryTable($linked_repo), '</div>'; } // medias linked to this media object if ($linked_note) { echo '<div id="notes-media">', FunctionsPrintLists::noteTable($linked_note), '</div>'; } echo '</div>'; echo '</div>';
</div> <?php } ?> <?php if ($linked_sour) { ?> <div id="linked-sources"> <?php echo FunctionsPrintLists::sourceTable($linked_sour); ?> </div> <?php } ?> <?php if ($linked_note) { ?> <div id="linked-notes"> <?php echo FunctionsPrintLists::noteTable($linked_note); ?> </div> <?php } ?> </div> </div> <?php
* webtrees: online genealogy * Copyright (C) 2015 webtrees development team * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ namespace Fisharebest\Webtrees; /** * Defined in session.php * * @global Tree $WT_TREE */ global $WT_TREE; use Fisharebest\Webtrees\Controller\PageController; use Fisharebest\Webtrees\Functions\FunctionsDb; use Fisharebest\Webtrees\Functions\FunctionsPrintLists; define('WT_SCRIPT_NAME', 'notelist.php'); require './includes/session.php'; $controller = new PageController(); $controller->setPageTitle(I18N::translate('Shared notes')); $controller->pageHeader(); echo '<div id="notelist-page">', '<h2>', I18N::translate('Shared notes'), '</h2>', FunctionsPrintLists::noteTable(FunctionsDb::getNoteList($WT_TREE)); echo '</div>';
echo GedcomTag::getLabel('OBJE'); echo '</td><td class="optionbox">'; echo '<a href="#" onclick="window.open(\'addmedia.php?action=showmediaform&linktoid=', $controller->record->getXref(), '\', \'_blank\', edit_window_specs); return false;">', I18N::translate('Add a new media object'), '</a>'; echo FunctionsPrint::helpLink('OBJE'); echo '<br>'; echo '<a href="#" onclick="window.open(\'inverselink.php?linktoid=', $controller->record->getXref(), '&linkto=source\', \'_blank\', find_window_specs); return false;">', I18N::translate('Link to an existing media object'), '</a>'; echo '</td></tr>'; } } echo '</table> </div>'; // Individuals linked to this source if ($linked_indi) { echo '<div id="indi-sources">', FunctionsPrintLists::individualTable($linked_indi), '</div>'; } // Families linked to this source if ($linked_fam) { echo '<div id="fam-sources">', FunctionsPrintLists::familyTable($linked_fam), '</div>'; } // Media Items linked to this source if ($linked_obje) { echo '<div id="media-sources">', FunctionsPrintLists::mediaTable($linked_obje), '</div>'; } // Shared Notes linked to this source if ($linked_note) { echo '<div id="note-sources">', FunctionsPrintLists::noteTable($linked_note), '</div>'; } echo '</div>'; //close div "source-tabs" echo '</div>'; //close div "source-details"