sourceTable() public static method

Print a table of sources
public static sourceTable ( Fisharebest\Webtrees\Source[] $sources ) : string
$sources Fisharebest\Webtrees\Source[]
return string
Beispiel #1
0
 /**
  * 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>';
         }
     }
 }
Beispiel #2
0
    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>';
Beispiel #3
0
 * 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', 'sourcelist.php');
require './includes/session.php';
$controller = new PageController();
$controller->setPageTitle(I18N::translate('Sources'));
$controller->pageHeader();
echo '<div id="sourcelist-page">', '<h2>', I18N::translate('Sources'), '</h2>';
echo FunctionsPrintLists::sourceTable(FunctionsDb::getSourceList($WT_TREE));
echo '</div>';
Beispiel #4
0
    ?>
			<div id="linked-media">
				<?php 
    echo FunctionsPrintLists::mediaTable($linked_obje);
    ?>
			</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