117dd427eSGreg Roach<?php 217dd427eSGreg Roach 317dd427eSGreg Roachuse Fisharebest\Webtrees\Auth; 417dd427eSGreg Roachuse Fisharebest\Webtrees\Functions\FunctionsPrint; 517dd427eSGreg Roachuse Fisharebest\Webtrees\Functions\FunctionsPrintFacts; 62917771cSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\AddNewFact; 722e73debSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesAcceptRecord; 822e73debSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesRejectRecord; 917dd427eSGreg Roachuse Fisharebest\Webtrees\I18N; 1017dd427eSGreg Roachuse Fisharebest\Webtrees\View; 1117dd427eSGreg Roach 1217dd427eSGreg Roach?> 13dd6b2bfcSGreg Roach 14dd6b2bfcSGreg Roach<?php if ($record->isPendingDeletion()) : ?> 15f4afa648SGreg Roach <?php if (Auth::isModerator($record->tree())) : ?> 160973b4d2SGreg Roach <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This family has been deleted. You should review the deletion and then %1$s or %2$s it.', '<a href="#" class="alert-link" data-post-url="' . e(route(PendingChangesAcceptRecord::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref()])) . '">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'accept') . '</a>', '<a href="#" class="alert-link" data-post-url="' . e(route(PendingChangesRejectRecord::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref()])) . '">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'reject') . '</a>') . ' ' . view('help/link', ['topic' => 'pending_changes'])]) ?> 17f4afa648SGreg Roach <?php elseif (Auth::isEditor($record->tree())) : ?> 180973b4d2SGreg Roach <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This family has been deleted. The deletion will need to be reviewed by a moderator.') . ' ' . view('help/link', ['topic' => 'pending_changes'])]) ?> 19dd6b2bfcSGreg Roach <?php endif ?> 20dd6b2bfcSGreg Roach<?php elseif ($record->isPendingAddition()) : ?> 21f4afa648SGreg Roach <?php if (Auth::isModerator($record->tree())) : ?> 220973b4d2SGreg Roach <?= view('components/alert-warning-dismissible', ['alert' => /* I18N: %1$s is “accept”, %2$s is “reject”. These are links. */ I18N::translate('This family has been edited. You should review the changes and then %1$s or %2$s them.', '<a href="#" class="alert-link" data-post-url="' . e(route(PendingChangesAcceptRecord::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref()])) . '">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'accept') . '</a>', '<a href="#" class="alert-link" data-post-url="' . e(route(PendingChangesRejectRecord::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref()])) . '">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'reject') . '</a>') . ' ' . view('help/link', ['topic' => 'pending_changes'])]) ?> 23f4afa648SGreg Roach <?php elseif (Auth::isEditor($record->tree())) : ?> 240973b4d2SGreg Roach <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This family has been edited. The changes need to be reviewed by a moderator.') . ' ' . view('help/link', ['topic' => 'pending_changes'])]) ?> 25dd6b2bfcSGreg Roach <?php endif ?> 26dd6b2bfcSGreg Roach<?php endif ?> 27dd6b2bfcSGreg Roach 28dd6b2bfcSGreg Roach<div class="d-flex mb-4"> 29dd6b2bfcSGreg Roach <h2 class="wt-page-title mx-auto"> 3039ca88baSGreg Roach <?= $record->fullName() ?> 31dd6b2bfcSGreg Roach </h2> 321450f098SGreg Roach <?php if ($record->canEdit()) : ?> 33dd6b2bfcSGreg Roach <?= view('family-page-menu', ['record' => $record]) ?> 34dd6b2bfcSGreg Roach <?php endif ?> 35dd6b2bfcSGreg Roach</div> 36dd6b2bfcSGreg Roach 3717dd427eSGreg Roach<?php View::push('styles') ?> 3817dd427eSGreg Roach<style> 3917dd427eSGreg Roach .wt-family-members .wt-chart-box { 4017dd427eSGreg Roach width: 22.5vw; 4117dd427eSGreg Roach } 4217dd427eSGreg Roach</style> 4317dd427eSGreg Roach<?php View::endpush() ?> 4417dd427eSGreg Roach 45dd6b2bfcSGreg Roach<div class="wt-page-content"> 4617dd427eSGreg Roach <div class="wt-family-members d-flex"> 4717dd427eSGreg Roach <?= view('family-page-children', ['family' => $record]) ?> 4817dd427eSGreg Roach <?= view('family-page-parents', ['family' => $record]) ?> 4917dd427eSGreg Roach </div> 5017dd427eSGreg Roach 5117dd427eSGreg Roach <h3 class="mt-4"><?= I18N::translate('Facts and events') ?></h3> 52dd6b2bfcSGreg Roach <table class="table wt-facts-table"> 5339ca88baSGreg Roach <?php if ($facts->isEmpty()) : ?> 54dd6b2bfcSGreg Roach <tr> 55*d224ae93SGreg Roach <td colspan="2"> 56dd6b2bfcSGreg Roach <?= I18N::translate('No facts exist for this family.') ?> 57dd6b2bfcSGreg Roach </td> 58dd6b2bfcSGreg Roach </tr> 59dd6b2bfcSGreg Roach <?php else : ?> 60dd6b2bfcSGreg Roach <?php foreach ($facts as $fact) : ?> 61dd6b2bfcSGreg Roach <?php FunctionsPrintFacts::printFact($fact, $record) ?> 62dd6b2bfcSGreg Roach <?php endforeach ?> 63dd6b2bfcSGreg Roach <?php endif ?> 64dd6b2bfcSGreg Roach 65f4afa648SGreg Roach <?php if (Auth::isEditor($record->tree())) : ?> 662adcbd9aSGreg Roach <?= view('edit/paste-fact-row', ['record' => $record, 'facts' => $clipboard_facts]) ?> 672adcbd9aSGreg Roach 68dd6b2bfcSGreg Roach <?php FunctionsPrint::printAddNewFact($record, $facts, 'FAM') ?> 69dd6b2bfcSGreg Roach <tr> 70dd6b2bfcSGreg Roach <th scope="row"> 71dd6b2bfcSGreg Roach <?= I18N::translate('Note') ?> 72dd6b2bfcSGreg Roach </th> 73dd6b2bfcSGreg Roach <td> 742917771cSGreg Roach <a href="<?= e(route(AddNewFact::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref(), 'fact' => 'NOTE'])) ?>"> 75dd6b2bfcSGreg Roach <?= I18N::translate('Add a note') ?> 76dd6b2bfcSGreg Roach </a> 77dd6b2bfcSGreg Roach </td> 78dd6b2bfcSGreg Roach </tr> 79dd6b2bfcSGreg Roach 80dd6b2bfcSGreg Roach <tr> 81dd6b2bfcSGreg Roach <th scope="row"> 82dd6b2bfcSGreg Roach <?= I18N::translate('Shared note') ?> 83dd6b2bfcSGreg Roach </th> 84ac1d7be4SGreg Roach <td> 852917771cSGreg Roach <a href="<?= e(route(AddNewFact::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref(), 'fact' => 'SHARED_NOTE'])) ?>"> 86dd6b2bfcSGreg Roach <?= I18N::translate('Add a shared note') ?> 87dd6b2bfcSGreg Roach </a> 88dd6b2bfcSGreg Roach </td> 89dd6b2bfcSGreg Roach </tr> 90dd6b2bfcSGreg Roach 91f4afa648SGreg Roach <?php if ($record->tree()->getPreference('MEDIA_UPLOAD') >= Auth::accessLevel($record->tree())) : ?> 92dd6b2bfcSGreg Roach <tr> 93dd6b2bfcSGreg Roach <th scope="row"> 94dd6b2bfcSGreg Roach <?= I18N::translate('Media object') ?> 95dd6b2bfcSGreg Roach </th> 96ac1d7be4SGreg Roach <td> 972917771cSGreg Roach <a href="<?= e(route(AddNewFact::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref(), 'fact' => 'OBJE'])) ?>"> 98dd6b2bfcSGreg Roach <?= I18N::translate('Add a media object') ?> 99dd6b2bfcSGreg Roach </a> 100dd6b2bfcSGreg Roach </td> 101dd6b2bfcSGreg Roach </tr> 102dd6b2bfcSGreg Roach <?php endif ?> 103dd6b2bfcSGreg Roach 104dd6b2bfcSGreg Roach <tr> 105dd6b2bfcSGreg Roach <th scope="row"> 106dd6b2bfcSGreg Roach <?= I18N::translate('Source') ?> 107dd6b2bfcSGreg Roach </th> 108dd6b2bfcSGreg Roach <td> 1092917771cSGreg Roach <a href="<?= e(route(AddNewFact::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref(), 'fact' => 'SOUR'])) ?>"> 110dd6b2bfcSGreg Roach <?= I18N::translate('Add a source citation') ?> 111dd6b2bfcSGreg Roach </a> 112dd6b2bfcSGreg Roach </td> 113dd6b2bfcSGreg Roach </tr> 114dd6b2bfcSGreg Roach <?php endif ?> 115dd6b2bfcSGreg Roach </table> 116dd6b2bfcSGreg Roach</div> 117dd6b2bfcSGreg Roach 118dd6b2bfcSGreg Roach<?= view('modals/ajax') ?> 119