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