1<?php 2 3use Fisharebest\Webtrees\GedcomRecord; 4use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel; 5use Fisharebest\Webtrees\I18N; 6 7?> 8 9<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), route('manage-trees') => I18N::translate('Manage family trees'), $title]]) ?> 10 11<h1><?= $title ?></h1> 12 13<form method="post" action="<?= e(route('merge-records', ['ged' => $tree->name(), 'xref1' => $record1->xref(), 'xref2' => $record2->xref()])) ?>"> 14 <?= csrf_field() ?> 15 <p> 16 <?= I18N::translate('Select the facts and events to keep from both records.') ?> 17 </p> 18 <div class="card mb-4"> 19 <div class="card-header"> 20 <h2 class="card-title"> 21 <?= I18N::translate('The following facts and events were found in both records.') ?> 22 </h2> 23 </div> 24 <div class="card-body"> 25 <?php if (!empty($facts)) : ?> 26 <table class="table table-bordered table-sm"> 27 <thead> 28 <tr> 29 <th> 30 <?= I18N::translate('Select') ?> 31 </th> 32 <th> 33 <?= I18N::translate('Details') ?> 34 </th> 35 </tr> 36 </thead> 37 <tbody> 38 <?php foreach ($facts as $fact_id => $fact) : ?> 39 <tr> 40 <td> 41 <input type="checkbox" name="keep1[]" value="<?= $fact->id() ?>" checked> 42 </td> 43 <td> 44 <div class="gedcom-data" dir="ltr"><?= e($fact->gedcom()) ?></div> 45 <?php if ($fact->target() instanceof GedcomRecord) : ?> 46 <a href="<?= e($fact->target()->url()) ?>"> 47 <?= $fact->target()->fullName() ?> 48 </a> 49 <?php endif ?> 50 </td> 51 </tr> 52 <?php endforeach ?> 53 </tbody> 54 </table> 55 <?php else : ?> 56 <p> 57 <?= I18N::translate('No matching facts found') ?> 58 </p> 59 <?php endif ?> 60 </div> 61 </div> 62 63 <div class="row"> 64 <div class="col-sm-6"> 65 <div class="card"> 66 <div class="card-header"> 67 <h2 class="card-title"> 68 <?= /* 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>' ?> 69 </h2> 70 </div> 71 <div class="card-body"> 72 <?php if (!empty($facts1)) : ?> 73 <table class="table table-bordered table-sm"> 74 <thead> 75 <tr> 76 <th> 77 <?= I18N::translate('Select') ?> 78 </th> 79 <th> 80 <?= I18N::translate('Details') ?> 81 </th> 82 </tr> 83 </thead> 84 <tbody> 85 <?php foreach ($facts1 as $fact_id => $fact) : ?> 86 <tr> 87 <td> 88 <input type="checkbox" name="keep1[]" value="<?= $fact->id() ?>" checked> 89 </td> 90 <td> 91 <div class="gedcom-data" dir="ltr"><?= e($fact->gedcom()) ?></div> 92 <?php if ($fact->target() instanceof GedcomRecord) : ?> 93 <a href="<?= e($fact->target()->url()) ?>"> 94 <?= $fact->target()->fullName() ?> 95 </a> 96 <?php endif ?> 97 </td> 98 </tr> 99 <?php endforeach ?> 100 </tbody> 101 </table> 102 <?php else : ?> 103 <p> 104 <?= I18N::translate('No matching facts found') ?> 105 </p> 106 <?php endif ?> 107 </div> 108 </div> 109 </div> 110 <div class="col-sm-6"> 111 <div class="card"> 112 <div class="card-header"> 113 <h2 class="card-title"> 114 <?= /* 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>' ?> 115 </h2> 116 </div> 117 <div class="card-body"> 118 <?php if (!empty($facts2)) : ?> 119 <table class="table table-bordered table-sm"> 120 <thead> 121 <tr> 122 <th> 123 <?= I18N::translate('Select') ?> 124 </th> 125 <th> 126 <?= I18N::translate('Details') ?> 127 </th> 128 </tr> 129 </thead> 130 <tbody> 131 <?php foreach ($facts2 as $fact_id => $fact) : ?> 132 <tr> 133 <td> 134 <input type="checkbox" name="keep2[]" value="<?= $fact->id() ?>" checked> 135 </td> 136 <td> 137 <div class="gedcom-data" dir="ltr"><?= e($fact->gedcom()) ?></div> 138 <?php if ($fact->target() instanceof GedcomRecord) : ?> 139 <a href="<?= e($fact->target()->url()) ?>"> 140 <?= $fact->target()->fullName() ?> 141 </a> 142 <?php endif ?> 143 </td> 144 </tr> 145 <?php endforeach ?> 146 </tbody> 147 </table> 148 <?php else : ?> 149 <p> 150 <?= I18N::translate('No matching facts found') ?> 151 </p> 152 <?php endif ?> 153 </div> 154 </div> 155 </div> 156 </div> 157 158 <button type="submit" class="btn btn-primary"> 159 <?= view('icons/save') ?> 160 <?= I18N::translate('save') ?> 161 </button> 162</form> 163