xref: /webtrees/resources/views/family-page.phtml (revision 08f0fd1c4b712981efe9f00f3c0143314973411c)
117dd427eSGreg Roach<?php
217dd427eSGreg Roach
317dd427eSGreg Roachuse Fisharebest\Webtrees\Auth;
47c2c99faSGreg Roachuse Fisharebest\Webtrees\Fact;
502467d32SGreg Roachuse Fisharebest\Webtrees\Family;
617dd427eSGreg Roachuse Fisharebest\Webtrees\Functions\FunctionsPrint;
717dd427eSGreg Roachuse Fisharebest\Webtrees\Functions\FunctionsPrintFacts;
817dd427eSGreg Roachuse Fisharebest\Webtrees\I18N;
97c2c99faSGreg Roachuse Illuminate\Support\Collection;
107c2c99faSGreg Roach
117c2c99faSGreg Roach/**
12*08f0fd1cSGreg Roach * @var bool             $can_upload_media
137c2c99faSGreg Roach * @var Collection<Fact> $clipboard_facts
147c2c99faSGreg Roach * @var Collection<Fact> $facts
157c2c99faSGreg Roach * @var Family           $record
167c2c99faSGreg Roach */
1717dd427eSGreg Roach
1817dd427eSGreg Roach?>
19dd6b2bfcSGreg Roach
200f5fd22fSGreg Roach<?= view('family-page-pending', ['record' => $record]) ?>
21dd6b2bfcSGreg Roach
22dd6b2bfcSGreg Roach<div class="d-flex mb-4">
23dd6b2bfcSGreg Roach    <h2 class="wt-page-title mx-auto">
2439ca88baSGreg Roach        <?= $record->fullName() ?>
25dd6b2bfcSGreg Roach    </h2>
261450f098SGreg Roach    <?php if ($record->canEdit()) : ?>
27*08f0fd1cSGreg Roach        <?= view('family-page-menu', ['can_upload_media' => $can_upload_media, 'clipboard_facts' => $clipboard_facts, 'record' => $record]) ?>
28dd6b2bfcSGreg Roach    <?php endif ?>
29dd6b2bfcSGreg Roach</div>
30dd6b2bfcSGreg Roach
31dd6b2bfcSGreg Roach<div class="wt-page-content">
3217dd427eSGreg Roach    <div class="wt-family-members d-flex">
3317dd427eSGreg Roach        <?= view('family-page-children', ['family' => $record]) ?>
3417dd427eSGreg Roach        <?= view('family-page-parents', ['family' => $record]) ?>
3517dd427eSGreg Roach    </div>
3617dd427eSGreg Roach
3717dd427eSGreg Roach    <h3 class="mt-4"><?= I18N::translate('Facts and events') ?></h3>
38dd6b2bfcSGreg Roach    <table class="table wt-facts-table">
3939ca88baSGreg Roach        <?php if ($facts->isEmpty()) : ?>
40dd6b2bfcSGreg Roach            <tr>
41d224ae93SGreg Roach                <td colspan="2">
42dd6b2bfcSGreg Roach                    <?= I18N::translate('No facts exist for this family.') ?>
43dd6b2bfcSGreg Roach                </td>
44dd6b2bfcSGreg Roach            </tr>
45dd6b2bfcSGreg Roach        <?php else : ?>
46dd6b2bfcSGreg Roach            <?php foreach ($facts as $fact) : ?>
47dd6b2bfcSGreg Roach                <?php FunctionsPrintFacts::printFact($fact, $record) ?>
48dd6b2bfcSGreg Roach            <?php endforeach ?>
49dd6b2bfcSGreg Roach        <?php endif ?>
50dd6b2bfcSGreg Roach
51f4afa648SGreg Roach        <?php if (Auth::isEditor($record->tree())) : ?>
520f5fd22fSGreg Roach            <?php FunctionsPrint::printAddNewFact($record) ?>
53dd6b2bfcSGreg Roach        <?php endif ?>
54dd6b2bfcSGreg Roach    </table>
55dd6b2bfcSGreg Roach</div>
56dd6b2bfcSGreg Roach
57dd6b2bfcSGreg Roach<?= view('modals/ajax') ?>
58