1<?php 2 3declare(strict_types=1); 4 5use Fisharebest\Webtrees\Family; 6use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel; 7use Fisharebest\Webtrees\Http\RequestHandlers\ManageTrees; 8use Fisharebest\Webtrees\Http\RequestHandlers\MergeRecordsAction; 9use Fisharebest\Webtrees\I18N; 10use Fisharebest\Webtrees\Individual; 11use Fisharebest\Webtrees\Location; 12use Fisharebest\Webtrees\Media; 13use Fisharebest\Webtrees\Note; 14use Fisharebest\Webtrees\Repository; 15use Fisharebest\Webtrees\Source; 16use Fisharebest\Webtrees\Submitter; 17use Fisharebest\Webtrees\Tree; 18use Fisharebest\Webtrees\View; 19 20/** 21 * @var Family|null $family1 22 * @var Family|null $family2 23 * @var Individual|null $individual1 24 * @var Individual|null $individual2 25 * @var Location|null $location1 26 * @var Location|null $location2 27 * @var Media|null $media1 28 * @var Media|null $media2 29 * @var Note|null $note1 30 * @var Note|null $note2 31 * @var Repository|null $repository1 32 * @var Repository|null $repository2 33 * @var Source|null $source1 34 * @var Source|null $source2 35 * @var Submitter|null $submitter1 36 * @var Submitter|null $submitter2 37 * @var string $title 38 * @var Tree $tree 39 */ 40 41?> 42 43<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), route(ManageTrees::class, ['tree' => $tree->name()]) => I18N::translate('Manage family trees'), $title]]) ?> 44 45<h1><?= $title ?></h1> 46 47<form id="merge-step-1" method="post" action="<?= e(route(MergeRecordsAction::class, ['tree' => $tree->name()])) ?>"> 48 <div class="row mb-3"> 49 <label class="col-sm-3 col-form-label" for="record-type"> 50 <?= I18N::translate('Select two records to merge.') ?> 51 </label> 52 <div class="col-sm-9"> 53 <select class="form-select" id="record-type"> 54 <option value="individual"><?= I18N::translate('Individuals') ?></option> 55 <option value="family"><?= I18N::translate('Families') ?></option> 56 <option value="source"><?= I18N::translate('Sources') ?></option> 57 <option value="repository"><?= I18N::translate('Repositories') ?></option> 58 <option value="note"><?= I18N::translate('Notes') ?></option> 59 <option value="media"><?= I18N::translate('Media objects') ?></option> 60 <option value="submitter"><?= I18N::translate('Submitters') ?></option> 61 <option value="location"><?= I18N::translate('Locations') ?></option> 62 </select> 63 </div> 64 </div> 65 66 <label class="row mb-3"> 67 <span class="col-sm-3 col-form-label"> 68 <?= I18N::translate('First record') ?> 69 </span> 70 71 <span class="col-sm-9 select-record select-individual"> 72 <?= view('components/select-individual', ['name' => 'xref1', 'id' => 'individual-xref-1', 'individual' => $individual1, 'tree' => $tree]) ?> 73 </span> 74 75 <span class="col-sm-9 select-record select-family d-none"> 76 <?= view('components/select-family', ['name' => 'xref1', 'id' => 'family-xref-1', 'family' => $family1, 'tree' => $tree, 'disabled' => true]) ?> 77 </span> 78 79 <span class="col-sm-9 select-record select-source d-none"> 80 <?= view('components/select-source', ['name' => 'xref1', 'id' => 'source-xref-1', 'source' => $source1, 'tree' => $tree, 'disabled' => true]) ?> 81 </span> 82 83 <span class="col-sm-9 select-record select-repository d-none"> 84 <?= view('components/select-repository', ['name' => 'xref1', 'id' => 'repository-xref-1', 'repository' => $repository1, 'tree' => $tree, 'disabled' => true]) ?> 85 </span> 86 87 <span class="col-sm-9 select-record select-note d-none"> 88 <?= view('components/select-note', ['name' => 'xref1', 'id' => 'note-xref-1', 'note' => $note1, 'tree' => $tree, 'disabled' => true]) ?> 89 </span> 90 91 <span class="col-sm-9 select-record select-media d-none"> 92 <?= view('components/select-media', ['name' => 'xref1', 'id' => 'media-xref-1', 'media' => $media1, 'tree' => $tree, 'disabled' => true]) ?> 93 </span> 94 95 <span class="col-sm-9 select-record select-submitter d-none"> 96 <?= view('components/select-submitter', ['name' => 'xref1', 'id' => 'submitter-xref-1', 'submitter' => $submitter1, 'tree' => $tree, 'disabled' => true]) ?> 97 </span> 98 99 <span class="col-sm-9 select-record select-location d-none"> 100 <?= view('components/select-location', ['name' => 'xref1', 'id' => 'location-xref-1', 'location' => $location1, 'tree' => $tree, 'disabled' => true]) ?> 101 </span> 102 </label> 103 104 <label class="row mb-3"> 105 <span class="col-sm-3 col-form-label"> 106 <?= I18N::translate('Second record') ?> 107 </span> 108 109 <span class="col-sm-9 select-record select-individual"> 110 <?= view('components/select-individual', ['name' => 'xref2', 'id' => 'individual-xref-2', 'individual' => $individual2, 'tree' => $tree]) ?> 111 </span> 112 113 <span class="col-sm-9 select-record select-family d-none"> 114 <?= view('components/select-family', ['name' => 'xref2', 'id' => 'family-xref-2', 'family' => $family2, 'tree' => $tree, 'disabled' => true]) ?> 115 </span> 116 117 <span class="col-sm-9 select-record select-source d-none"> 118 <?= view('components/select-source', ['name' => 'xref2', 'id' => 'source-xref-2', 'source' => $source2, 'tree' => $tree, 'disabled' => true]) ?> 119 </span> 120 121 <span class="col-sm-9 select-record select-repository d-none"> 122 <?= view('components/select-repository', ['name' => 'xref2', 'id' => 'repository-xref-2', 'repository' => $repository2, 'tree' => $tree, 'disabled' => true]) ?> 123 </span> 124 125 <span class="col-sm-9 select-record select-note d-none"> 126 <?= view('components/select-note', ['name' => 'xref2', 'id' => 'note-xref-2', 'note' => $note2, 'tree' => $tree, 'disabled' => true]) ?> 127 </span> 128 129 <span class="col-sm-9 select-record select-media d-none"> 130 <?= view('components/select-media', ['name' => 'xref2', 'id' => 'media-xref-2', 'media' => $media2, 'tree' => $tree, 'disabled' => true]) ?> 131 </span> 132 133 <span class="col-sm-9 select-record select-submitter d-none"> 134 <?= view('components/select-submitter', ['name' => 'xref2', 'id' => 'submitter-xref-2', 'submitter' => $submitter2, 'tree' => $tree, 'disabled' => true]) ?> 135 </span> 136 137 <span class="col-sm-9 select-record select-location d-none"> 138 <?= view('components/select-location', ['name' => 'xref2', 'id' => 'location-xref-2', 'location' => $location2, 'tree' => $tree, 'disabled' => true]) ?> 139 </span> 140 </label> 141 142 <div class="row mb-3"> 143 <div class="col-sm-3"> 144 </div> 145 146 <div class="col-sm-9"> 147 <button class="btn btn-primary" type="submit"> 148 <?= view('icons/save') ?> 149 <?= I18N::translate('continue') ?> 150 </button> 151 </div> 152 </div> 153 154 <?= csrf_field() ?> 155</form> 156 157<?php View::push('javascript') ?> 158<script> 159 'use strict'; 160 161 webtrees.initializeIFSRO(document.getElementById('record-type'), document.getElementById('merge-step-1')); 162</script> 163<?php View::endpush() ?> 164