1*17dd427eSGreg Roach<?php 2*17dd427eSGreg Roach 3*17dd427eSGreg Roachuse Fisharebest\Webtrees\Auth; 4*17dd427eSGreg Roachuse Fisharebest\Webtrees\Functions\FunctionsCharts; 5*17dd427eSGreg Roachuse Fisharebest\Webtrees\Functions\FunctionsPrint; 6*17dd427eSGreg Roachuse Fisharebest\Webtrees\Functions\FunctionsPrintFacts; 7*17dd427eSGreg Roachuse Fisharebest\Webtrees\I18N; 8*17dd427eSGreg Roachuse Fisharebest\Webtrees\Module\ModuleThemeInterface; 9*17dd427eSGreg Roachuse Fisharebest\Webtrees\View; 10*17dd427eSGreg Roach 11*17dd427eSGreg Roach?> 12dd6b2bfcSGreg Roach 13dd6b2bfcSGreg Roach<?php if ($record->isPendingDeletion()) : ?> 14f4afa648SGreg Roach <?php if (Auth::isModerator($record->tree())) : ?> 15f4afa648SGreg 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" onclick="accept_changes(\'' . e($record->xref()) . '\', \'' . e($record->tree()->name()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($record->xref()) . '\', \'' . e($record->tree()->name()) . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> 16f4afa648SGreg Roach <?php elseif (Auth::isEditor($record->tree())) : ?> 17dd6b2bfcSGreg Roach <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This family has been deleted. The deletion will need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> 18dd6b2bfcSGreg Roach <?php endif ?> 19dd6b2bfcSGreg Roach<?php elseif ($record->isPendingAddition()) : ?> 20f4afa648SGreg Roach <?php if (Auth::isModerator($record->tree())) : ?> 21f4afa648SGreg 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" onclick="accept_changes(\'' . e($record->xref()) . '\', \'' . e($record->tree()->name()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'accept') . '</a>', '<a href="#" class="alert-link" onclick="reject_changes(\'' . e($record->xref()) . '\', \'' . e($record->tree()->name()) . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> 22f4afa648SGreg Roach <?php elseif (Auth::isEditor($record->tree())) : ?> 23dd6b2bfcSGreg Roach <?= view('components/alert-warning-dismissible', ['alert' => I18N::translate('This family has been edited. The changes need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes')]) ?> 24dd6b2bfcSGreg Roach <?php endif ?> 25dd6b2bfcSGreg Roach<?php endif ?> 26dd6b2bfcSGreg Roach 27dd6b2bfcSGreg Roach<div class="d-flex mb-4"> 28dd6b2bfcSGreg Roach <h2 class="wt-page-title mx-auto"> 2939ca88baSGreg Roach <?= $record->fullName() ?> 30dd6b2bfcSGreg Roach </h2> 31dd6b2bfcSGreg Roach <?php if ($record->canEdit() && !$record->isPendingDeletion()) : ?> 32dd6b2bfcSGreg Roach <?= view('family-page-menu', ['record' => $record]) ?> 33dd6b2bfcSGreg Roach <?php endif ?> 34dd6b2bfcSGreg Roach</div> 35dd6b2bfcSGreg Roach 36*17dd427eSGreg Roach<?php View::push('styles') ?> 37*17dd427eSGreg Roach<style> 38*17dd427eSGreg Roach .wt-family-members .wt-chart-box { 39*17dd427eSGreg Roach width: 22.5vw; 40*17dd427eSGreg Roach } 41*17dd427eSGreg Roach</style> 42*17dd427eSGreg Roach<?php View::endpush() ?> 43*17dd427eSGreg Roach 44dd6b2bfcSGreg Roach<div class="wt-page-content"> 45*17dd427eSGreg Roach <div class="wt-family-members d-flex"> 46*17dd427eSGreg Roach <?= view('family-page-children', ['family' => $record]) ?> 47*17dd427eSGreg Roach <?= view('family-page-parents', ['family' => $record]) ?> 48*17dd427eSGreg Roach </div> 49*17dd427eSGreg Roach 50*17dd427eSGreg Roach <h3 class="mt-4"><?= I18N::translate('Facts and events') ?></h3> 51dd6b2bfcSGreg Roach <table class="table wt-facts-table"> 5239ca88baSGreg Roach <?php if ($facts->isEmpty()) : ?> 53dd6b2bfcSGreg Roach <tr> 54dd6b2bfcSGreg Roach <td class="messagebox" colspan="2"> 55dd6b2bfcSGreg Roach <?= I18N::translate('No facts exist for this family.') ?> 56dd6b2bfcSGreg Roach </td> 57dd6b2bfcSGreg Roach </tr> 58dd6b2bfcSGreg Roach <?php else : ?> 59dd6b2bfcSGreg Roach <?php foreach ($facts as $fact) : ?> 60dd6b2bfcSGreg Roach <?php FunctionsPrintFacts::printFact($fact, $record) ?> 61dd6b2bfcSGreg Roach <?php endforeach ?> 62dd6b2bfcSGreg Roach <?php endif ?> 63dd6b2bfcSGreg Roach 64f4afa648SGreg Roach <?php if (Auth::isEditor($record->tree())) : ?> 652adcbd9aSGreg Roach <?= view('edit/paste-fact-row', ['record' => $record, 'facts' => $clipboard_facts]) ?> 662adcbd9aSGreg Roach 67dd6b2bfcSGreg Roach <?php FunctionsPrint::printAddNewFact($record, $facts, 'FAM') ?> 68dd6b2bfcSGreg Roach <tr> 69dd6b2bfcSGreg Roach <th scope="row"> 70dd6b2bfcSGreg Roach <?= I18N::translate('Note') ?> 71dd6b2bfcSGreg Roach </th> 72dd6b2bfcSGreg Roach <td> 73f4afa648SGreg Roach <a href="<?= e(route('add-fact', ['ged' => $record->tree()->name(), 'xref' => $record->xref(), 'fact' => 'NOTE'])) ?>"> 74dd6b2bfcSGreg Roach <?= I18N::translate('Add a note') ?> 75dd6b2bfcSGreg Roach </a> 76dd6b2bfcSGreg Roach </td> 77dd6b2bfcSGreg Roach </tr> 78dd6b2bfcSGreg Roach 79dd6b2bfcSGreg Roach <tr> 80dd6b2bfcSGreg Roach <th scope="row"> 81dd6b2bfcSGreg Roach <?= I18N::translate('Shared note') ?> 82dd6b2bfcSGreg Roach </th> 83dd6b2bfcSGreg Roach <td class="optionbox"> 84f4afa648SGreg Roach <a href="<?= e(route('add-fact', ['ged' => $record->tree()->name(), 'xref' => $record->xref(), 'fact' => 'SHARED_NOTE'])) ?>"> 85dd6b2bfcSGreg Roach <?= I18N::translate('Add a shared note') ?> 86dd6b2bfcSGreg Roach </a> 87dd6b2bfcSGreg Roach </td> 88dd6b2bfcSGreg Roach </tr> 89dd6b2bfcSGreg Roach 90f4afa648SGreg Roach <?php if ($record->tree()->getPreference('MEDIA_UPLOAD') >= Auth::accessLevel($record->tree())) : ?> 91dd6b2bfcSGreg Roach <tr> 92dd6b2bfcSGreg Roach <th scope="row"> 93dd6b2bfcSGreg Roach <?= I18N::translate('Media object') ?> 94dd6b2bfcSGreg Roach </th> 95dd6b2bfcSGreg Roach <td class="optionbox"> 96f4afa648SGreg Roach <a href="<?= e(route('add-fact', ['ged' => $record->tree()->name(), 'xref' => $record->xref(), 'fact' => 'OBJE'])) ?>"> 97dd6b2bfcSGreg Roach <?= I18N::translate('Add a media object') ?> 98dd6b2bfcSGreg Roach </a> 99dd6b2bfcSGreg Roach </td> 100dd6b2bfcSGreg Roach </tr> 101dd6b2bfcSGreg Roach <?php endif ?> 102dd6b2bfcSGreg Roach 103dd6b2bfcSGreg Roach <tr> 104dd6b2bfcSGreg Roach <th scope="row"> 105dd6b2bfcSGreg Roach <?= I18N::translate('Source') ?> 106dd6b2bfcSGreg Roach </th> 107dd6b2bfcSGreg Roach <td> 108f4afa648SGreg Roach <a href="<?= e(route('add-fact', ['ged' => $record->tree()->name(), 'xref' => $record->xref(), 'fact' => 'SOUR'])) ?>"> 109dd6b2bfcSGreg Roach <?= I18N::translate('Add a source citation') ?> 110dd6b2bfcSGreg Roach </a> 111dd6b2bfcSGreg Roach </td> 112dd6b2bfcSGreg Roach </tr> 113dd6b2bfcSGreg Roach <?php endif ?> 114dd6b2bfcSGreg Roach </table> 115dd6b2bfcSGreg Roach</div> 116dd6b2bfcSGreg Roach 117dd6b2bfcSGreg Roach<?= view('modals/ajax') ?> 118