VaKeR CYBER ARMY
Logo of a company Server : Apache/2.4.41 (Ubuntu)
System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /var/www/html/webtrees/resources/views/modules/relatives/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/webtrees/resources/views/modules/relatives/tab.phtml
<?php

declare(strict_types=1);

use Fisharebest\Webtrees\Family;
use Fisharebest\Webtrees\Http\RequestHandlers\AddChildToIndividualPage;
use Fisharebest\Webtrees\Http\RequestHandlers\AddParentToIndividualPage;
use Fisharebest\Webtrees\Http\RequestHandlers\AddSpouseToIndividualPage;
use Fisharebest\Webtrees\Http\RequestHandlers\LinkChildToFamilyPage;
use Fisharebest\Webtrees\Http\RequestHandlers\LinkSpouseToIndividualPage;
use Fisharebest\Webtrees\Http\RequestHandlers\ReorderFamiliesPage;
use Fisharebest\Webtrees\I18N;
use Fisharebest\Webtrees\Individual;
use Illuminate\Support\Collection;

/**
 * @var bool                   $can_edit
 * @var int                    $fam_access_level
 * @var Individual             $individual
 * @var Collection<int,Family> $parent_families
 * @var Collection<int,Family> $spouse_families
 * @var Collection<int,Family> $step_child_families
 * @var Collection<int,Family> $step_parent_families
 */

?>
<?php
?>

<div class="wt-tab-relatives">
    <table class="table table-sm wt-facts-table" role="presentation">
    <tbody>
        <tr>
            <td>
                <label>
                    <input id="show-date-differences" type="checkbox" data-bs-toggle="collapse" data-bs-target=".wt-date-difference" data-wt-persist="date-differences" autocomplete="off">
                    <?= I18N::translate('Date differences') ?>
                </label>
            </td>
        </tr>
    </tbody>
</table>

<!-- Parents -->
<?php foreach ($parent_families as $family) : ?>
    <?= view('modules/relatives/family', [
        'individual'       => $individual,
        'family'           => $family,
        'type'             => 'FAMC',
        'label'            => $individual->getChildFamilyLabel($family),
        'fam_access_level' => $fam_access_level,
    ]) ?>
<?php endforeach ?>

<!-- step-parents -->
<?php foreach ($step_parent_families as $family) : ?>
    <?= view('modules/relatives/family', [
        'individual'       => $individual,
        'family'           => $family,
        'type'             => 'FAMC',
        'label'            => $individual->getStepFamilyLabel($family),
        'fam_access_level' => $fam_access_level,
    ]) ?>
<?php endforeach ?>

<!-- spouses -->
<?php foreach ($spouse_families as $family) : ?>
    <?= view('modules/relatives/family', [
        'individual'       => $individual,
        'family'           => $family,
        'type'             => 'FAMS',
        'label'            => $individual->getSpouseFamilyLabel($family),
        'fam_access_level' => $fam_access_level,
    ]) ?>
<?php endforeach ?>

<!-- step-children -->
<?php foreach ($step_child_families as $family) : ?>
    <?= view('modules/relatives/family', [
        'individual'       => $individual,
        'family'           => $family,
        'type'             => 'FAMS',
        'label'            => $family->fullName(),
        'fam_access_level' => $fam_access_level,
    ]) ?>
<?php endforeach ?>

<?php if ($can_edit) : ?>
    <br>
    <table class="table table-sm wt-facts-table" role="presentation">
        <tbody>
            <?php if ($spouse_families->count() > 1) : ?>
                <tr>
                    <td>
                        <a href="<?= e(route(ReorderFamiliesPage::class, ['tree' => $individual->tree()->name(), 'xref' => $individual->xref()])) ?>">
                            <?= view('icons/reorder') ?>
                            <?= I18N::translate('Re-order families') ?>
                        </a>
                    </td>
                </tr>
            <?php endif ?>

            <?php if ($parent_families->isEmpty()) : ?>
                <tr>
                    <td>
                        <a href="<?= e(route(AddParentToIndividualPage::class, ['tree' => $individual->tree()->name(), 'xref' => $individual->xref(), 'sex' => 'M', 'url' => $individual->url() . '#tab-relatives'])) ?>">
                            <?= I18N::translate('Add a father') ?>
                        </a>
                    </td>
                </tr>
                <tr>
                    <td>
                        <a href="<?= e(route(AddParentToIndividualPage::class, ['tree' => $individual->tree()->name(), 'xref' => $individual->xref(), 'sex' => 'F', 'url' => $individual->url() . '#tab-relatives'])) ?>">
                            <?= I18N::translate('Add a mother') ?>
                        </a>
                    </td>
                </tr>
            <?php endif ?>

            <tr>
                <td>
                    <a href="<?= e(route(LinkChildToFamilyPage::class, ['tree' => $individual->tree()->name(), 'xref' => $individual->xref()])) ?>">
                        <?= I18N::translate('Link this individual to an existing family as a child') ?>
                    </a>
                </td>
            </tr>

            <tr>
                <td>
                    <a href="<?= e(route(AddSpouseToIndividualPage::class, ['tree' => $individual->tree()->name(), 'xref' => $individual->xref(), 'url' => $individual->url() . '#tab-relatives'])) ?>">
                        <?php if ($individual->sex() !== 'F') : ?>
                            <?= I18N::translate('Add a wife') ?>
                        <?php else : ?>
                            <?= I18N::translate('Add a husband') ?>
                        <?php endif ?>
                    </a>
                </td>
            </tr>

            <tr>
                <td>
                    <a href="<?= e(route(LinkSpouseToIndividualPage::class, ['tree' => $individual->tree()->name(), 'xref' => $individual->xref()])) ?>">
                        <?php if ($individual->sex() !== 'F') : ?>
                            <?= I18N::translate('Add a wife using an existing individual') ?>
                        <?php else : ?>
                            <?= I18N::translate('Add a husband using an existing individual') ?>
                        <?php endif ?>
                    </a>
                </td>
            </tr>

            <tr>
                <td>
                    <a href="<?= e(route(AddChildToIndividualPage::class, ['tree' => $individual->tree()->name(), 'xref' => $individual->xref(), 'sex' => 'U'])) ?>">
                        <?= I18N::translate('Add a child to create a one-parent family') ?>
                    </a>
                </td>
            </tr>
        </tbody>
    </table>
<?php endif ?>
</div>

VaKeR 2022