10c0910bfSGreg Roach<?php 2dd6b2bfcSGreg Roach 3*10e06497SGreg Roachdeclare(strict_types=1); 4*10e06497SGreg Roach 57c2c99faSGreg Roachuse Fisharebest\Webtrees\Fact; 60c0910bfSGreg Roachuse Fisharebest\Webtrees\GedcomRecord; 70c0910bfSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel; 86fd01894SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ManageTrees; 95bbfbb82SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\MergeFactsAction; 100c0910bfSGreg Roachuse Fisharebest\Webtrees\I18N; 117c2c99faSGreg Roachuse Fisharebest\Webtrees\Tree; 127c2c99faSGreg Roach 137c2c99faSGreg Roach/** 147c2c99faSGreg Roach * @var array<Fact> $facts 157c2c99faSGreg Roach * @var array<Fact> $facts1 167c2c99faSGreg Roach * @var array<Fact> $facts2 177c2c99faSGreg Roach * @var string $title 187c2c99faSGreg Roach * @var GedcomRecord $record1 197c2c99faSGreg Roach * @var GedcomRecord $record2 207c2c99faSGreg Roach * @var Tree $tree 217c2c99faSGreg Roach */ 220c0910bfSGreg Roach 230c0910bfSGreg Roach?> 240c0910bfSGreg Roach 256fd01894SGreg Roach<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), route(ManageTrees::class, ['tree' => $tree->name()]) => I18N::translate('Manage family trees'), $title]]) ?> 26dd6b2bfcSGreg Roach 27dd6b2bfcSGreg Roach<h1><?= $title ?></h1> 28dd6b2bfcSGreg Roach 295bbfbb82SGreg Roach<form method="post" action="<?= e(route(MergeFactsAction::class, ['tree' => $tree->name()])) ?>"> 305bbfbb82SGreg Roach <input type="hidden" name="xref1" value="<?= e($record1->xref()) ?>"> 315bbfbb82SGreg Roach <input type="hidden" name="xref2" value="<?= e($record2->xref()) ?>"> 325bbfbb82SGreg Roach 33dd6b2bfcSGreg Roach <p> 34dd6b2bfcSGreg Roach <?= I18N::translate('Select the facts and events to keep from both records.') ?> 35dd6b2bfcSGreg Roach </p> 36dd6b2bfcSGreg Roach <div class="card mb-4"> 37dd6b2bfcSGreg Roach <div class="card-header"> 38dd6b2bfcSGreg Roach <h2 class="card-title"> 39dd6b2bfcSGreg Roach <?= I18N::translate('The following facts and events were found in both records.') ?> 40dd6b2bfcSGreg Roach </h2> 41dd6b2bfcSGreg Roach </div> 42dd6b2bfcSGreg Roach <div class="card-body"> 43075d1a05SGreg Roach <?php if ($facts !== []) : ?> 44dd6b2bfcSGreg Roach <table class="table table-bordered table-sm"> 45dd6b2bfcSGreg Roach <thead> 46dd6b2bfcSGreg Roach <tr> 47dd6b2bfcSGreg Roach <th> 48dd6b2bfcSGreg Roach <?= I18N::translate('Select') ?> 49dd6b2bfcSGreg Roach </th> 50dd6b2bfcSGreg Roach <th> 51dd6b2bfcSGreg Roach <?= I18N::translate('Details') ?> 52dd6b2bfcSGreg Roach </th> 53dd6b2bfcSGreg Roach </tr> 54dd6b2bfcSGreg Roach </thead> 55dd6b2bfcSGreg Roach <tbody> 56dd6b2bfcSGreg Roach <?php foreach ($facts as $fact_id => $fact) : ?> 57dd6b2bfcSGreg Roach <tr> 58dd6b2bfcSGreg Roach <td> 59905ab80aSGreg Roach <input type="checkbox" name="keep1[]" value="<?= $fact->id() ?>" checked> 60dd6b2bfcSGreg Roach </td> 61dd6b2bfcSGreg Roach <td> 627d0db648SGreg Roach <div class="gedcom-data" dir="ltr"><?= e($fact->gedcom()) ?></div> 63dc124885SGreg Roach <?php if ($fact->target() instanceof GedcomRecord) : ?> 64dc124885SGreg Roach <a href="<?= e($fact->target()->url()) ?>"> 6539ca88baSGreg Roach <?= $fact->target()->fullName() ?> 66dd6b2bfcSGreg Roach </a> 67dd6b2bfcSGreg Roach <?php endif ?> 68dd6b2bfcSGreg Roach </td> 69dd6b2bfcSGreg Roach </tr> 70dd6b2bfcSGreg Roach <?php endforeach ?> 71dd6b2bfcSGreg Roach </tbody> 72dd6b2bfcSGreg Roach </table> 73dd6b2bfcSGreg Roach <?php else : ?> 74dd6b2bfcSGreg Roach <p> 75dd6b2bfcSGreg Roach <?= I18N::translate('No matching facts found') ?> 76dd6b2bfcSGreg Roach </p> 77dd6b2bfcSGreg Roach <?php endif ?> 78dd6b2bfcSGreg Roach </div> 79dd6b2bfcSGreg Roach </div> 80dd6b2bfcSGreg Roach 81dd6b2bfcSGreg Roach <div class="row"> 82dd6b2bfcSGreg Roach <div class="col-sm-6"> 83dd6b2bfcSGreg Roach <div class="card"> 84dd6b2bfcSGreg Roach <div class="card-header"> 85dd6b2bfcSGreg Roach <h2 class="card-title"> 8639ca88baSGreg Roach <?= /* I18N: the name of an individual, source, etc. */ I18N::translate('The following facts and events were only found in the record of %s.', '<a href="' . e($record1->url()) . '">' . $record1->fullName()) . '</a>' ?> 87dd6b2bfcSGreg Roach </h2> 88dd6b2bfcSGreg Roach </div> 89dd6b2bfcSGreg Roach <div class="card-body"> 90075d1a05SGreg Roach <?php if ($facts1 !== []) : ?> 91dd6b2bfcSGreg Roach <table class="table table-bordered table-sm"> 92dd6b2bfcSGreg Roach <thead> 93dd6b2bfcSGreg Roach <tr> 94dd6b2bfcSGreg Roach <th> 95dd6b2bfcSGreg Roach <?= I18N::translate('Select') ?> 96dd6b2bfcSGreg Roach </th> 97dd6b2bfcSGreg Roach <th> 98dd6b2bfcSGreg Roach <?= I18N::translate('Details') ?> 99dd6b2bfcSGreg Roach </th> 100dd6b2bfcSGreg Roach </tr> 101dd6b2bfcSGreg Roach </thead> 102dd6b2bfcSGreg Roach <tbody> 103dd6b2bfcSGreg Roach <?php foreach ($facts1 as $fact_id => $fact) : ?> 104dd6b2bfcSGreg Roach <tr> 105dd6b2bfcSGreg Roach <td> 106905ab80aSGreg Roach <input type="checkbox" name="keep1[]" value="<?= $fact->id() ?>" checked> 107dd6b2bfcSGreg Roach </td> 108dd6b2bfcSGreg Roach <td> 1097d0db648SGreg Roach <div class="gedcom-data" dir="ltr"><?= e($fact->gedcom()) ?></div> 110dc124885SGreg Roach <?php if ($fact->target() instanceof GedcomRecord) : ?> 111dc124885SGreg Roach <a href="<?= e($fact->target()->url()) ?>"> 11239ca88baSGreg Roach <?= $fact->target()->fullName() ?> 113dd6b2bfcSGreg Roach </a> 114dd6b2bfcSGreg Roach <?php endif ?> 115dd6b2bfcSGreg Roach </td> 116dd6b2bfcSGreg Roach </tr> 117dd6b2bfcSGreg Roach <?php endforeach ?> 118dd6b2bfcSGreg Roach </tbody> 119dd6b2bfcSGreg Roach </table> 120dd6b2bfcSGreg Roach <?php else : ?> 121dd6b2bfcSGreg Roach <p> 122dd6b2bfcSGreg Roach <?= I18N::translate('No matching facts found') ?> 123dd6b2bfcSGreg Roach </p> 124dd6b2bfcSGreg Roach <?php endif ?> 125dd6b2bfcSGreg Roach </div> 126dd6b2bfcSGreg Roach </div> 127dd6b2bfcSGreg Roach </div> 128dd6b2bfcSGreg Roach <div class="col-sm-6"> 129dd6b2bfcSGreg Roach <div class="card"> 130dd6b2bfcSGreg Roach <div class="card-header"> 131dd6b2bfcSGreg Roach <h2 class="card-title"> 13239ca88baSGreg Roach <?= /* I18N: the name of an individual, source, etc. */ I18N::translate('The following facts and events were only found in the record of %s.', '<a href="' . e($record2->url()) . '">' . $record2->fullName()) . '</a>' ?> 133dd6b2bfcSGreg Roach </h2> 134dd6b2bfcSGreg Roach </div> 135dd6b2bfcSGreg Roach <div class="card-body"> 136075d1a05SGreg Roach <?php if ($facts2 !== []) : ?> 137dd6b2bfcSGreg Roach <table class="table table-bordered table-sm"> 138dd6b2bfcSGreg Roach <thead> 139dd6b2bfcSGreg Roach <tr> 140dd6b2bfcSGreg Roach <th> 141dd6b2bfcSGreg Roach <?= I18N::translate('Select') ?> 142dd6b2bfcSGreg Roach </th> 143dd6b2bfcSGreg Roach <th> 144dd6b2bfcSGreg Roach <?= I18N::translate('Details') ?> 145dd6b2bfcSGreg Roach </th> 146dd6b2bfcSGreg Roach </tr> 147dd6b2bfcSGreg Roach </thead> 148dd6b2bfcSGreg Roach <tbody> 149dd6b2bfcSGreg Roach <?php foreach ($facts2 as $fact_id => $fact) : ?> 150dd6b2bfcSGreg Roach <tr> 151dd6b2bfcSGreg Roach <td> 152905ab80aSGreg Roach <input type="checkbox" name="keep2[]" value="<?= $fact->id() ?>" checked> 153dd6b2bfcSGreg Roach </td> 154dd6b2bfcSGreg Roach <td> 1557d0db648SGreg Roach <div class="gedcom-data" dir="ltr"><?= e($fact->gedcom()) ?></div> 156dc124885SGreg Roach <?php if ($fact->target() instanceof GedcomRecord) : ?> 157dc124885SGreg Roach <a href="<?= e($fact->target()->url()) ?>"> 15839ca88baSGreg Roach <?= $fact->target()->fullName() ?> 159dd6b2bfcSGreg Roach </a> 160dd6b2bfcSGreg Roach <?php endif ?> 161dd6b2bfcSGreg Roach </td> 162dd6b2bfcSGreg Roach </tr> 163dd6b2bfcSGreg Roach <?php endforeach ?> 164dd6b2bfcSGreg Roach </tbody> 165dd6b2bfcSGreg Roach </table> 166dd6b2bfcSGreg Roach <?php else : ?> 167dd6b2bfcSGreg Roach <p> 168dd6b2bfcSGreg Roach <?= I18N::translate('No matching facts found') ?> 169dd6b2bfcSGreg Roach </p> 170dd6b2bfcSGreg Roach <?php endif ?> 171dd6b2bfcSGreg Roach </div> 172dd6b2bfcSGreg Roach </div> 173dd6b2bfcSGreg Roach </div> 174dd6b2bfcSGreg Roach </div> 175dd6b2bfcSGreg Roach 176dd6b2bfcSGreg Roach <button type="submit" class="btn btn-primary"> 177dd6b2bfcSGreg Roach <?= view('icons/save') ?> 178dd6b2bfcSGreg Roach <?= I18N::translate('save') ?> 179dd6b2bfcSGreg Roach </button> 18081443e3cSGreg Roach 18181443e3cSGreg Roach <?= csrf_field() ?> 182dd6b2bfcSGreg Roach</form> 183