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