예제 #1
0
파일: repo.php 프로젝트: jacoline/webtrees
    return (array_key_exists($x->getTag(), $order) ? $order[$x->getTag()] : PHP_INT_MAX) - (array_key_exists($y->getTag(), $order) ? $order[$y->getTag()] : PHP_INT_MAX);
});
// Print the facts
foreach ($facts as $fact) {
    print_fact($fact, $controller->record);
}
// new fact link
if ($controller->record->canEdit()) {
    print_add_new_fact($controller->record->getXref(), $facts, 'REPO');
    // new media
    if (get_gedcom_setting(WT_GED_ID, 'MEDIA_UPLOAD') >= WT_USER_ACCESS_LEVEL) {
        echo '<tr><td class="descriptionbox">';
        echo WT_Gedcom_Tag::getLabel('OBJE');
        echo '</td><td class="optionbox">';
        echo '<a href="#" onclick="window.open(\'addmedia.php?action=showmediaform&amp;linktoid=', $controller->record->getXref(), '\', \'_blank\', edit_window_specs); return false;">', WT_I18N::translate('Add a new media object'), '</a>';
        echo help_link('OBJE');
        echo '<br>';
        echo '<a href="#" onclick="window.open(\'inverselink.php?linktoid=', $controller->record->getXref(), '&amp;linkto=repository\', \'_blank\', find_window_specs); return false;">', WT_I18N::translate('Link to an existing media object'), '</a>';
        echo '</td></tr>';
    }
}
echo '</table>
	</div>';
// Sources linked to this repository
if ($linked_sour) {
    echo '<div id="source-repo">';
    echo format_sour_table($linked_sour);
    echo '</div>';
}
echo '</div>';
echo '</div>';
예제 #2
0
파일: note.php 프로젝트: brambravo/webtrees
echo $text;
?>
</td>
				</tr>
				<?php 
foreach ($facts as $fact) {
    print_fact($fact, $controller->record);
}
if ($controller->record->canEdit()) {
    print_add_new_fact($controller->record->getXref(), $facts, 'NOTE');
}
?>
			</table>
		</div>
		<?php 
if ($linked_indi) {
    echo '<div id="indi-note">', format_indi_table($linked_indi), '</div>';
}
if ($linked_fam) {
    echo '<div id="fam-note">', format_fam_table($linked_fam), '</div>';
}
if ($linked_obje) {
    echo '<div id="media-note">', format_media_table($linked_obje), '</div>';
}
if ($linked_sour) {
    echo '<div id="source-note">', format_sour_table($linked_sour), '</div>';
}
?>
	</div>
</div>
예제 #3
0
    echo '<li><a href="#sources-media"><span id="sourcemedia">', WT_I18N::translate('Sources'), '</span></a></li>';
}
if ($linked_repo) {
    echo '<li><a href="#repo-media"><span id="repomedia">', WT_I18N::translate('Repositories'), '</span></a></li>';
}
if ($linked_note) {
    echo '<li><a href="#notes-media"><span id="notemedia">', WT_I18N::translate('Notes'), '</span></a></li>';
}
echo '</ul>';
// Individuals linked to this media object
if ($linked_indi) {
    echo '<div id="indi-media">', format_indi_table($linked_indi), '</div>';
}
// Families linked to this media object
if ($linked_fam) {
    echo '<div id="fam-media">', format_fam_table($linked_fam), '</div>';
}
// Sources linked to this media object
if ($linked_sour) {
    echo '<div id="sources-media">', format_sour_table($linked_sour), '</div>';
}
// Repositories linked to this media object
if ($linked_repo) {
    echo '<div id="repo-media">', format_repo_table($linked_repo), '</div>';
}
// medias linked to this media object
if ($linked_note) {
    echo '<div id="notes-media">', format_note_table($linked_note), '</div>';
}
echo '</div>';
echo '</div>';
예제 #4
0
파일: repo.php 프로젝트: brambravo/webtrees
    return (array_key_exists($x->getTag(), $order) ? $order[$x->getTag()] : PHP_INT_MAX) - (array_key_exists($y->getTag(), $order) ? $order[$y->getTag()] : PHP_INT_MAX);
});
// Print the facts
foreach ($facts as $fact) {
    print_fact($fact, $controller->record);
}
// new fact link
if ($controller->record->canEdit()) {
    print_add_new_fact($controller->record->getXref(), $facts, 'REPO');
    // new media
    if (get_gedcom_setting(WT_GED_ID, 'MEDIA_UPLOAD') >= WT_USER_ACCESS_LEVEL) {
        echo '<tr><td class="descriptionbox">';
        echo WT_Gedcom_Tag::getLabel('OBJE');
        echo '</td><td class="optionbox">';
        echo '<a href="#" onclick="window.open(\'addmedia.php?action=showmediaform&amp;linktoid=', $controller->record->getXref(), '\', \'_blank\', edit_window_specs); return false;">', WT_I18N::translate('Add a new media object'), '</a>';
        echo help_link('OBJE');
        echo '<br>';
        echo '<a href="#" onclick="window.open(\'inverselink.php?linktoid=', $controller->record->getXref(), '&amp;linkto=repository\', \'_blank\', find_window_specs); return false;">', WT_I18N::translate('Link to an existing media object'), '</a>';
        echo '</td></tr>';
    }
}
echo '</table>
	</div>';
// Sources linked to this repository
if ($linked_sour) {
    echo '<div id="source-repo">';
    echo format_sour_table($linked_sour, $controller->record->getFullName());
    echo '</div>';
}
echo '</div>';
echo '</div>';
예제 #5
0
    function printResults()
    {
        require_once WT_ROOT . 'includes/functions/functions_print_lists.php';
        global $GEDCOM;
        $somethingPrinted = false;
        // whether anything printed
        // ---- section to search and display results on a general keyword search
        if ($this->action == "general" || $this->action == "soundex" || $this->action == "replace") {
            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">&nbsp;</div>';
                echo '<div id="search-result-tabs"><ul>';
                if ($this->myindilist) {
                    echo '<li><a href="#searchAccordion-indi"><span id="indisource">', WT_I18N::translate('Individuals'), '</span></a></li>';
                }
                if ($this->myfamlist) {
                    echo '<li><a href="#searchAccordion-fam"><span id="famsource">', WT_I18N::translate('Families'), '</span></a></li>';
                }
                if ($this->mysourcelist) {
                    echo '<li><a href="#searchAccordion-source"><span id="mediasource">', WT_I18N::translate('Sources'), '</span></a></li>';
                }
                if ($this->mynotelist) {
                    echo '<li><a href="#searchAccordion-note"><span id="notesource">', WT_I18N::translate('Notes'), '</span></a></li>';
                }
                echo '</ul>';
                // individual results
                echo '<div id="searchAccordion-indi">';
                // Split individuals by tree
                $trees = WT_Tree::getAll();
                foreach ($this->sgeds as $ged_id => $gedcom) {
                    $datalist = array();
                    foreach ($this->myindilist as $individual) {
                        if ($individual->getGedcomId() == $ged_id) {
                            $datalist[] = $individual;
                        }
                    }
                    if ($datalist) {
                        $somethingPrinted = true;
                        usort($datalist, array('WT_GedcomRecord', 'compare'));
                        $GEDCOM = $gedcom;
                        load_gedcom_settings($ged_id);
                        echo '<h3 class="indi-acc-header"><a href="#"><span class="search_item" dir="auto">', $this->myquery, '</span> @ <span>', $trees[$ged_id]->tree_title_html, '</span></a></h3>
							<div class="indi-acc_content">', format_indi_table($datalist);
                        echo '</div>';
                        //indi-acc_content
                    }
                }
                echo '</div>';
                //#searchAccordion-indi
                $this->addInlineJavascript('jQuery("#searchAccordion-indi").accordion({heightStyle: "content", collapsible: true});');
                // family results
                echo '<div id="searchAccordion-fam">';
                // Split families by gedcom
                foreach ($this->sgeds as $ged_id => $gedcom) {
                    $datalist = array();
                    foreach ($this->myfamlist as $family) {
                        if ($family->getGedcomId() == $ged_id) {
                            $datalist[] = $family;
                        }
                    }
                    if ($datalist) {
                        $somethingPrinted = true;
                        usort($datalist, array('WT_GedcomRecord', 'compare'));
                        $GEDCOM = $gedcom;
                        load_gedcom_settings($ged_id);
                        echo '<h3 class="fam-acc-header"><a href="#"><span class="search_item" dir="auto">', $this->myquery, '</span> @ <span>', $trees[$ged_id]->tree_title_html, '</span></a></h3>
							<div class="fam-acc_content">', format_fam_table($datalist);
                        echo '</div>';
                        //fam-acc_content
                    }
                }
                echo '</div>';
                //#searchAccordion-fam
                $this->addInlineJavascript('jQuery("#searchAccordion-fam").accordion({heightStyle: "content", collapsible: true});');
                // source results
                echo '<div id="searchAccordion-source">';
                // Split sources by gedcom
                foreach ($this->sgeds as $ged_id => $gedcom) {
                    $datalist = array();
                    foreach ($this->mysourcelist as $source) {
                        if ($source->getGedcomId() == $ged_id) {
                            $datalist[] = $source;
                        }
                    }
                    if ($datalist) {
                        $somethingPrinted = true;
                        usort($datalist, array('WT_GedcomRecord', 'compare'));
                        $GEDCOM = $gedcom;
                        load_gedcom_settings($ged_id);
                        echo '<h3 class="source-acc-header"><a href="#"><span class="search_item" dir="auto">', $this->myquery, '</span> @ <span>', $trees[$ged_id]->tree_title_html, '</span></a></h3>
							<div class="source-acc_content">', format_sour_table($datalist);
                        echo '</div>';
                        //fam-acc_content
                    }
                }
                echo '</div>';
                //#searchAccordion-source
                $this->addInlineJavascript('jQuery("#searchAccordion-source").accordion({heightStyle: "content", collapsible: true});');
                // note results
                echo '<div id="searchAccordion-note">';
                // Split notes by gedcom
                foreach ($this->sgeds as $ged_id => $gedcom) {
                    $datalist = array();
                    foreach ($this->mynotelist as $note) {
                        if ($note->getGedcomId() == $ged_id) {
                            $datalist[] = $note;
                        }
                    }
                    if ($datalist) {
                        $somethingPrinted = true;
                        usort($datalist, array('WT_GedcomRecord', 'compare'));
                        $GEDCOM = $gedcom;
                        load_gedcom_settings($ged_id);
                        echo '<h3 class="note-acc-header"><a href="#"><span class="search_item" dir="auto">', $this->myquery, '</span> @ <span>', $trees[$ged_id]->tree_title_html, '</span></a></h3>
							<div class="note-acc_content">', format_note_table($datalist);
                        echo '</div>';
                        //note-acc_content
                    }
                }
                echo '</div>';
                //#searchAccordion-note
                $this->addInlineJavascript('jQuery("#searchAccordion-note").accordion({heightStyle: "content", collapsible: true});');
                $GEDCOM = WT_GEDCOM;
                load_gedcom_settings(WT_GED_ID);
                echo '</div>';
                //#search-result-tabs
            } elseif (isset($this->query)) {
                echo '<br><div class="warning center"><em>' . WT_I18N::translate('No results found.') . '</em><br>';
                if (!isset($this->srindi) && !isset($this->srfams) && !isset($this->srsour) && !isset($this->srnote)) {
                    echo '<em>' . WT_I18N::translate('Be sure to select an option to search for.') . '</em><br>';
                }
                echo '</div>';
            }
        }
        return $somethingPrinted;
        // whether anything printed
    }
예제 #6
0
// Parses gedcom file and displays a list of the sources in the file.
//
// webtrees: Web based Family History software
// Copyright (C) 2014 webtrees development team.
//
// Derived from PhpGedView
// Copyright (C) 2002 to 2009 PGV Development Team.  All rights reserved.
//
// 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 2 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, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
define('WT_SCRIPT_NAME', 'sourcelist.php');
require './includes/session.php';
require_once WT_ROOT . 'includes/functions/functions_print_lists.php';
$controller = new WT_Controller_Page();
$controller->setPageTitle(WT_I18N::translate('Sources'));
$controller->pageHeader();
echo '<div id="sourcelist-page">', '<h2>', WT_I18N::translate('Sources'), '</h2>';
echo format_sour_table(get_source_list(WT_GED_ID));
echo '</div>';