xref: /webtrees/resources/views/admin/merge-records-step-1.phtml (revision 10e0649788c8d7d4974d81c048ca2b225df8f22e)
10c0910bfSGreg Roach<?php
2dd6b2bfcSGreg Roach
3*10e06497SGreg Roachdeclare(strict_types=1);
4*10e06497SGreg Roach
57c2c99faSGreg Roachuse Fisharebest\Webtrees\Family;
60c0910bfSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
76fd01894SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ManageTrees;
85bbfbb82SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\MergeRecordsAction;
90c0910bfSGreg Roachuse Fisharebest\Webtrees\I18N;
107c2c99faSGreg Roachuse Fisharebest\Webtrees\Individual;
119d28ed8bSGreg Roachuse Fisharebest\Webtrees\Location;
127c2c99faSGreg Roachuse Fisharebest\Webtrees\Media;
137c2c99faSGreg Roachuse Fisharebest\Webtrees\Note;
147c2c99faSGreg Roachuse Fisharebest\Webtrees\Repository;
157c2c99faSGreg Roachuse Fisharebest\Webtrees\Source;
167c2c99faSGreg Roachuse Fisharebest\Webtrees\Submitter;
177c2c99faSGreg Roachuse Fisharebest\Webtrees\Tree;
180c0910bfSGreg Roachuse Fisharebest\Webtrees\View;
190c0910bfSGreg Roach
207c2c99faSGreg Roach/**
217c2c99faSGreg Roach * @var Family|null     $family1
227c2c99faSGreg Roach * @var Family|null     $family2
237c2c99faSGreg Roach * @var Individual|null $individual1
247c2c99faSGreg Roach * @var Individual|null $individual2
259d28ed8bSGreg Roach * @var Location|null   $location1
264886ba1dSGreg Roach * @var Location|null   $location2
277c2c99faSGreg Roach * @var Media|null      $media1
287c2c99faSGreg Roach * @var Media|null      $media2
297c2c99faSGreg Roach * @var Note|null       $note1
307c2c99faSGreg Roach * @var Note|null       $note2
317c2c99faSGreg Roach * @var Repository|null $repository1
327c2c99faSGreg Roach * @var Repository|null $repository2
337c2c99faSGreg Roach * @var Source|null     $source1
347c2c99faSGreg Roach * @var Source|null     $source2
357c2c99faSGreg Roach * @var Submitter|null  $submitter1
367c2c99faSGreg Roach * @var Submitter|null  $submitter2
377c2c99faSGreg Roach * @var string          $title
387c2c99faSGreg Roach * @var Tree            $tree
397c2c99faSGreg Roach */
407c2c99faSGreg Roach
410c0910bfSGreg Roach?>
420c0910bfSGreg Roach
436fd01894SGreg Roach<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), route(ManageTrees::class, ['tree' => $tree->name()]) => I18N::translate('Manage family trees'), $title]]) ?>
44dd6b2bfcSGreg Roach
45dd6b2bfcSGreg Roach<h1><?= $title ?></h1>
46dd6b2bfcSGreg Roach
47c8d78f19SGreg Roach<form id="merge-step-1" method="post" action="<?= e(route(MergeRecordsAction::class, ['tree' => $tree->name()])) ?>">
489e3c2cf9SGreg Roach    <div class="row mb-3">
49dd6b2bfcSGreg Roach        <label class="col-sm-3 col-form-label" for="record-type">
50dd6b2bfcSGreg Roach            <?= I18N::translate('Select two records to merge.') ?>
51dd6b2bfcSGreg Roach        </label>
52dd6b2bfcSGreg Roach        <div class="col-sm-9">
534b9213b3SGreg Roach            <select class="form-select" id="record-type">
54dd6b2bfcSGreg Roach                <option value="individual"><?= I18N::translate('Individuals') ?></option>
55dd6b2bfcSGreg Roach                <option value="family"><?= I18N::translate('Families') ?></option>
56dd6b2bfcSGreg Roach                <option value="source"><?= I18N::translate('Sources') ?></option>
57dd6b2bfcSGreg Roach                <option value="repository"><?= I18N::translate('Repositories') ?></option>
58dd6b2bfcSGreg Roach                <option value="note"><?= I18N::translate('Notes') ?></option>
59dd6b2bfcSGreg Roach                <option value="media"><?= I18N::translate('Media objects') ?></option>
6070fa8906SGreg Roach                <option value="submitter"><?= I18N::translate('Submitters') ?></option>
619d28ed8bSGreg Roach                <option value="location"><?= I18N::translate('Locations') ?></option>
62dd6b2bfcSGreg Roach            </select>
63dd6b2bfcSGreg Roach        </div>
64dd6b2bfcSGreg Roach    </div>
65dd6b2bfcSGreg Roach
669e3c2cf9SGreg Roach    <label class="row mb-3">
67dd6b2bfcSGreg Roach        <span class="col-sm-3 col-form-label">
68dd6b2bfcSGreg Roach            <?= I18N::translate('First record') ?>
69dd6b2bfcSGreg Roach        </span>
705bbfbb82SGreg Roach
71dd6b2bfcSGreg Roach        <span class="col-sm-9 select-record select-individual">
72d2814fbcSGreg Roach            <?= view('components/select-individual', ['name' => 'xref1', 'id' => 'individual-xref-1', 'individual' => $individual1, 'tree' => $tree]) ?>
73dd6b2bfcSGreg Roach        </span>
745bbfbb82SGreg Roach
75dd6b2bfcSGreg Roach        <span class="col-sm-9 select-record select-family d-none">
76d2814fbcSGreg Roach            <?= view('components/select-family', ['name' => 'xref1', 'id' => 'family-xref-1', 'family' => $family1, 'tree' => $tree, 'disabled' => true]) ?>
77dd6b2bfcSGreg Roach        </span>
785bbfbb82SGreg Roach
79dd6b2bfcSGreg Roach        <span class="col-sm-9 select-record select-source d-none">
80d2814fbcSGreg Roach            <?= view('components/select-source', ['name' => 'xref1', 'id' => 'source-xref-1', 'source' => $source1, 'tree' => $tree, 'disabled' => true]) ?>
81dd6b2bfcSGreg Roach        </span>
825bbfbb82SGreg Roach
83dd6b2bfcSGreg Roach        <span class="col-sm-9 select-record select-repository d-none">
84d2814fbcSGreg Roach            <?= view('components/select-repository', ['name' => 'xref1', 'id' => 'repository-xref-1', 'repository' => $repository1, 'tree' => $tree, 'disabled' => true]) ?>
85dd6b2bfcSGreg Roach        </span>
865bbfbb82SGreg Roach
87dd6b2bfcSGreg Roach        <span class="col-sm-9 select-record select-note d-none">
88b6c326d8SGreg Roach            <?= view('components/select-note', ['name' => 'xref1', 'id' => 'note-xref-1', 'note' => $note1, 'tree' => $tree, 'disabled' => true]) ?>
89dd6b2bfcSGreg Roach        </span>
905bbfbb82SGreg Roach
91dd6b2bfcSGreg Roach        <span class="col-sm-9 select-record select-media d-none">
92b6c326d8SGreg Roach            <?= view('components/select-media', ['name' => 'xref1', 'id' => 'media-xref-1', 'media' => $media1, 'tree' => $tree, 'disabled' => true]) ?>
93dd6b2bfcSGreg Roach        </span>
9470fa8906SGreg Roach
9570fa8906SGreg Roach        <span class="col-sm-9 select-record select-submitter d-none">
9670fa8906SGreg Roach            <?= view('components/select-submitter', ['name' => 'xref1', 'id' => 'submitter-xref-1', 'submitter' => $submitter1, 'tree' => $tree, 'disabled' => true]) ?>
9770fa8906SGreg Roach        </span>
989d28ed8bSGreg Roach
999d28ed8bSGreg Roach        <span class="col-sm-9 select-record select-location d-none">
1009d28ed8bSGreg Roach            <?= view('components/select-location', ['name' => 'xref1', 'id' => 'location-xref-1', 'location' => $location1, 'tree' => $tree, 'disabled' => true]) ?>
1019d28ed8bSGreg Roach        </span>
102dd6b2bfcSGreg Roach    </label>
103dd6b2bfcSGreg Roach
1049e3c2cf9SGreg Roach    <label class="row mb-3">
105dd6b2bfcSGreg Roach        <span class="col-sm-3 col-form-label">
106dd6b2bfcSGreg Roach            <?= I18N::translate('Second record') ?>
107dd6b2bfcSGreg Roach        </span>
1085bbfbb82SGreg Roach
109dd6b2bfcSGreg Roach        <span class="col-sm-9 select-record select-individual">
110d2814fbcSGreg Roach            <?= view('components/select-individual', ['name' => 'xref2', 'id' => 'individual-xref-2', 'individual' => $individual2, 'tree' => $tree]) ?>
111dd6b2bfcSGreg Roach        </span>
1125bbfbb82SGreg Roach
113dd6b2bfcSGreg Roach        <span class="col-sm-9 select-record select-family d-none">
114d2814fbcSGreg Roach            <?= view('components/select-family', ['name' => 'xref2', 'id' => 'family-xref-2', 'family' => $family2, 'tree' => $tree, 'disabled' => true]) ?>
115dd6b2bfcSGreg Roach        </span>
1165bbfbb82SGreg Roach
117dd6b2bfcSGreg Roach        <span class="col-sm-9 select-record select-source d-none">
118d2814fbcSGreg Roach            <?= view('components/select-source', ['name' => 'xref2', 'id' => 'source-xref-2', 'source' => $source2, 'tree' => $tree, 'disabled' => true]) ?>
119dd6b2bfcSGreg Roach        </span>
1205bbfbb82SGreg Roach
121dd6b2bfcSGreg Roach        <span class="col-sm-9 select-record select-repository d-none">
122d2814fbcSGreg Roach            <?= view('components/select-repository', ['name' => 'xref2', 'id' => 'repository-xref-2', 'repository' => $repository2, 'tree' => $tree, 'disabled' => true]) ?>
123dd6b2bfcSGreg Roach        </span>
1245bbfbb82SGreg Roach
125dd6b2bfcSGreg Roach        <span class="col-sm-9 select-record select-note d-none">
126b6c326d8SGreg Roach            <?= view('components/select-note', ['name' => 'xref2', 'id' => 'note-xref-2', 'note' => $note2, 'tree' => $tree, 'disabled' => true]) ?>
127dd6b2bfcSGreg Roach        </span>
1285bbfbb82SGreg Roach
129dd6b2bfcSGreg Roach        <span class="col-sm-9 select-record select-media d-none">
130d2814fbcSGreg Roach            <?= view('components/select-media', ['name' => 'xref2', 'id' => 'media-xref-2', 'media' => $media2, 'tree' => $tree, 'disabled' => true]) ?>
131dd6b2bfcSGreg Roach        </span>
13270fa8906SGreg Roach
13370fa8906SGreg Roach        <span class="col-sm-9 select-record select-submitter d-none">
134d2814fbcSGreg Roach            <?= view('components/select-submitter', ['name' => 'xref2', 'id' => 'submitter-xref-2', 'submitter' => $submitter2, 'tree' => $tree, 'disabled' => true]) ?>
13570fa8906SGreg Roach        </span>
1369d28ed8bSGreg Roach
1379d28ed8bSGreg Roach        <span class="col-sm-9 select-record select-location d-none">
1389d28ed8bSGreg Roach            <?= view('components/select-location', ['name' => 'xref2', 'id' => 'location-xref-2', 'location' => $location2, 'tree' => $tree, 'disabled' => true]) ?>
1399d28ed8bSGreg Roach        </span>
140dd6b2bfcSGreg Roach    </label>
141dd6b2bfcSGreg Roach
1429e3c2cf9SGreg Roach    <div class="row mb-3">
143dd6b2bfcSGreg Roach        <div class="col-sm-3">
144dd6b2bfcSGreg Roach        </div>
1455bbfbb82SGreg Roach
146dd6b2bfcSGreg Roach        <div class="col-sm-9">
147dd6b2bfcSGreg Roach            <button class="btn btn-primary" type="submit">
148dd6b2bfcSGreg Roach                <?= view('icons/save') ?>
149dd6b2bfcSGreg Roach                <?= I18N::translate('continue') ?>
150dd6b2bfcSGreg Roach            </button>
151dd6b2bfcSGreg Roach        </div>
152dd6b2bfcSGreg Roach    </div>
15381443e3cSGreg Roach
15481443e3cSGreg Roach    <?= csrf_field() ?>
155dd6b2bfcSGreg Roach</form>
156dd6b2bfcSGreg Roach
157dd6b2bfcSGreg Roach<?php View::push('javascript') ?>
158dd6b2bfcSGreg Roach<script>
159ffb44950SGreg Roach  'use strict';
160dd6b2bfcSGreg Roach
161c8d78f19SGreg Roach  webtrees.initializeIFSRO(document.getElementById('record-type'), document.getElementById('merge-step-1'));
162dd6b2bfcSGreg Roach</script>
163dd6b2bfcSGreg Roach<?php View::endpush() ?>
164