1dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\Auth; ?> 2dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\Functions\FunctionsCharts; ?> 3dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\Functions\FunctionsPrint; ?> 4dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\Functions\FunctionsPrintFacts; ?> 5dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\I18N; ?> 68136679eSGreg Roach<?php use Fisharebest\Webtrees\Module\ModuleThemeInterface; ?> 7dd6b2bfcSGreg Roach 8dd6b2bfcSGreg Roach<?php if ($record->isPendingDeletion()) : ?> 9f4afa648SGreg Roach <?php if (Auth::isModerator($record->tree())) : ?> 10f4afa648SGreg 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')]) ?> 11f4afa648SGreg Roach <?php elseif (Auth::isEditor($record->tree())) : ?> 12dd6b2bfcSGreg 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')]) ?> 13dd6b2bfcSGreg Roach <?php endif ?> 14dd6b2bfcSGreg Roach<?php elseif ($record->isPendingAddition()) : ?> 15f4afa648SGreg Roach <?php if (Auth::isModerator($record->tree())) : ?> 16f4afa648SGreg 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')]) ?> 17f4afa648SGreg Roach <?php elseif (Auth::isEditor($record->tree())) : ?> 18dd6b2bfcSGreg 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')]) ?> 19dd6b2bfcSGreg Roach <?php endif ?> 20dd6b2bfcSGreg Roach<?php endif ?> 21dd6b2bfcSGreg Roach 22dd6b2bfcSGreg Roach<div class="d-flex mb-4"> 23dd6b2bfcSGreg Roach <h2 class="wt-page-title mx-auto"> 24*39ca88baSGreg Roach <?= $record->fullName() ?> 25dd6b2bfcSGreg Roach </h2> 26dd6b2bfcSGreg Roach <?php if ($record->canEdit() && !$record->isPendingDeletion()) : ?> 27dd6b2bfcSGreg Roach <?= view('family-page-menu', ['record' => $record]) ?> 28dd6b2bfcSGreg Roach <?php endif ?> 29dd6b2bfcSGreg Roach</div> 30dd6b2bfcSGreg Roach 31dd6b2bfcSGreg Roach<div class="wt-page-content"> 32dd6b2bfcSGreg Roach <table id="family-table" class="w-100" role="presentation"> 33dd6b2bfcSGreg Roach <tr style="vertical-align:top;"> 348136679eSGreg Roach <td style="width: <?= app()->make(ModuleThemeInterface::class)->parameter('chart-box-x') + 30 ?>px;"> 35dd6b2bfcSGreg Roach <?php FunctionsCharts::printFamilyChildren($record) ?> 36dd6b2bfcSGreg Roach </td> 37dd6b2bfcSGreg Roach <td> 38dd6b2bfcSGreg Roach <table class="w-100" role="presentation"> 39dd6b2bfcSGreg Roach <tr> 40dd6b2bfcSGreg Roach <td class="subheaders"><?= I18N::translate('Parents') ?></td> 41dd6b2bfcSGreg Roach <td class="subheaders"><?= I18N::translate('Grandparents') ?></td> 42dd6b2bfcSGreg Roach </tr> 43dd6b2bfcSGreg Roach <tr> 44dd6b2bfcSGreg Roach <td colspan="2"> 45dd6b2bfcSGreg Roach <?php FunctionsCharts::printFamilyParents($record) ?> 46f4afa648SGreg Roach <?php if (Auth::isEditor($record->tree())) : ?> 47*39ca88baSGreg Roach <?php if ($record->husband() === null) : ?> 48f4afa648SGreg Roach <a href="<?= e(route('add-spouse-to-family', ['ged=' => $record->tree()->name(), 'xref' => $record->xref(), 'famtag' => 'HUSB'])) ?>"> 49dd6b2bfcSGreg Roach <?= I18N::translate('Add a father') ?> 50dd6b2bfcSGreg Roach </a> 51dd6b2bfcSGreg Roach <br> 52dd6b2bfcSGreg Roach <?php endif ?> 53*39ca88baSGreg Roach <?php if ($record->wife() === null) : ?> 54f4afa648SGreg Roach <a href="<?= e(route('add-spouse-to-family', ['ged=' => $record->tree()->name(), 'xref' => $record->xref(), 'famtag' => 'WIFE'])) ?>"> 55dd6b2bfcSGreg Roach <?= I18N::translate('Add a mother') ?> 56dd6b2bfcSGreg Roach </a> 57dd6b2bfcSGreg Roach <br> 58dd6b2bfcSGreg Roach <?php endif ?> 59dd6b2bfcSGreg Roach <?php endif ?> 60dd6b2bfcSGreg Roach </td> 61dd6b2bfcSGreg Roach </tr> 62dd6b2bfcSGreg Roach </table> 63dd6b2bfcSGreg Roach </td> 64dd6b2bfcSGreg Roach </tr> 65dd6b2bfcSGreg Roach </table> 66dd6b2bfcSGreg Roach <span class="subheaders"><?= I18N::translate('Family group information') ?></span> 67dd6b2bfcSGreg Roach <table class="table wt-facts-table"> 68*39ca88baSGreg Roach <?php if ($facts->isEmpty()) : ?> 69dd6b2bfcSGreg Roach <tr> 70dd6b2bfcSGreg Roach <td class="messagebox" colspan="2"> 71dd6b2bfcSGreg Roach <?= I18N::translate('No facts exist for this family.') ?> 72dd6b2bfcSGreg Roach </td> 73dd6b2bfcSGreg Roach </tr> 74dd6b2bfcSGreg Roach <?php else : ?> 75dd6b2bfcSGreg Roach <?php foreach ($facts as $fact) : ?> 76dd6b2bfcSGreg Roach <?php FunctionsPrintFacts::printFact($fact, $record) ?> 77dd6b2bfcSGreg Roach <?php endforeach ?> 78dd6b2bfcSGreg Roach <?php endif ?> 79dd6b2bfcSGreg Roach 80f4afa648SGreg Roach <?php if (Auth::isEditor($record->tree())) : ?> 812adcbd9aSGreg Roach <?= view('edit/paste-fact-row', ['record' => $record, 'facts' => $clipboard_facts]) ?> 822adcbd9aSGreg Roach 83dd6b2bfcSGreg Roach <?php FunctionsPrint::printAddNewFact($record, $facts, 'FAM') ?> 84dd6b2bfcSGreg Roach <tr> 85dd6b2bfcSGreg Roach <th scope="row"> 86dd6b2bfcSGreg Roach <?= I18N::translate('Note') ?> 87dd6b2bfcSGreg Roach </th> 88dd6b2bfcSGreg Roach <td> 89f4afa648SGreg Roach <a href="<?= e(route('add-fact', ['ged' => $record->tree()->name(), 'xref' => $record->xref(), 'fact' => 'NOTE'])) ?>"> 90dd6b2bfcSGreg Roach <?= I18N::translate('Add a note') ?> 91dd6b2bfcSGreg Roach </a> 92dd6b2bfcSGreg Roach </td> 93dd6b2bfcSGreg Roach </tr> 94dd6b2bfcSGreg Roach 95dd6b2bfcSGreg Roach <tr> 96dd6b2bfcSGreg Roach <th scope="row"> 97dd6b2bfcSGreg Roach <?= I18N::translate('Shared note') ?> 98dd6b2bfcSGreg Roach </th> 99dd6b2bfcSGreg Roach <td class="optionbox"> 100f4afa648SGreg Roach <a href="<?= e(route('add-fact', ['ged' => $record->tree()->name(), 'xref' => $record->xref(), 'fact' => 'SHARED_NOTE'])) ?>"> 101dd6b2bfcSGreg Roach <?= I18N::translate('Add a shared note') ?> 102dd6b2bfcSGreg Roach </a> 103dd6b2bfcSGreg Roach </td> 104dd6b2bfcSGreg Roach </tr> 105dd6b2bfcSGreg Roach 106f4afa648SGreg Roach <?php if ($record->tree()->getPreference('MEDIA_UPLOAD') >= Auth::accessLevel($record->tree())) : ?> 107dd6b2bfcSGreg Roach <tr> 108dd6b2bfcSGreg Roach <th scope="row"> 109dd6b2bfcSGreg Roach <?= I18N::translate('Media object') ?> 110dd6b2bfcSGreg Roach </th> 111dd6b2bfcSGreg Roach <td class="optionbox"> 112f4afa648SGreg Roach <a href="<?= e(route('add-fact', ['ged' => $record->tree()->name(), 'xref' => $record->xref(), 'fact' => 'OBJE'])) ?>"> 113dd6b2bfcSGreg Roach <?= I18N::translate('Add a media object') ?> 114dd6b2bfcSGreg Roach </a> 115dd6b2bfcSGreg Roach </td> 116dd6b2bfcSGreg Roach </tr> 117dd6b2bfcSGreg Roach <?php endif ?> 118dd6b2bfcSGreg Roach 119dd6b2bfcSGreg Roach <tr> 120dd6b2bfcSGreg Roach <th scope="row"> 121dd6b2bfcSGreg Roach <?= I18N::translate('Source') ?> 122dd6b2bfcSGreg Roach </th> 123dd6b2bfcSGreg Roach <td> 124f4afa648SGreg Roach <a href="<?= e(route('add-fact', ['ged' => $record->tree()->name(), 'xref' => $record->xref(), 'fact' => 'SOUR'])) ?>"> 125dd6b2bfcSGreg Roach <?= I18N::translate('Add a source citation') ?> 126dd6b2bfcSGreg Roach </a> 127dd6b2bfcSGreg Roach </td> 128dd6b2bfcSGreg Roach </tr> 129dd6b2bfcSGreg Roach <?php endif ?> 130dd6b2bfcSGreg Roach </table> 131dd6b2bfcSGreg Roach</div> 132dd6b2bfcSGreg Roach 133dd6b2bfcSGreg Roach<?= view('modals/ajax') ?> 134