xref: /webtrees/resources/views/admin/trees.phtml (revision aa6f03bb51be5a55a78fe8aed18753116689a6d3)
1dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\Auth; ?>
2dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\Database; ?>
3dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\I18N; ?>
4dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\Site; ?>
5dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\View; ?>
6dd6b2bfcSGreg Roach
7dd6b2bfcSGreg Roach<?php if (!empty($all_trees)): ?>
8dd6b2bfcSGreg Roach    <?= view('components/breadcrumbs', ['links' => [route('admin-control-panel') => I18N::translate('Control panel'), $title]]) ?>
9dd6b2bfcSGreg Roach<?php endif ?>
10dd6b2bfcSGreg Roach
11dd6b2bfcSGreg Roach<h1><?= $title ?></h1>
12dd6b2bfcSGreg Roach
13dd6b2bfcSGreg Roach<?php if (empty($all_trees)) : ?>
14dd6b2bfcSGreg Roach    <div class="alert alert-info">
15dd6b2bfcSGreg Roach        <?= I18N::translate('You need to create a family tree.') ?>
16dd6b2bfcSGreg Roach    </div>
17dd6b2bfcSGreg Roach<?php endif ?>
18dd6b2bfcSGreg Roach
19dd6b2bfcSGreg Roach<div id="accordion" role="tablist" aria-multiselectable="true">
20dd6b2bfcSGreg Roach    <?php foreach ($all_trees as $managed_tree) : ?>
21dd6b2bfcSGreg Roach        <?php if (Auth::isManager($managed_tree)) : ?>
22dd6b2bfcSGreg Roach            <div class="card">
2372cf66d4SGreg Roach                <div class="card-header" role="tab" id="card-tree-header-<?= $managed_tree->id() ?>">
24dd6b2bfcSGreg Roach                    <h2 class="mb-0">
25dd6b2bfcSGreg Roach                        <?= view('icons/tree') ?>
2672cf66d4SGreg Roach                        <a data-toggle="collapse" data-parent="#accordion" href="#card-tree-content-<?= $managed_tree->id() ?>" <?= $managed_tree == $tree || $managed_tree->getPreference('imported') === '0' ? 'aria-expanded="true"' : '' ?> aria-controls="card-tree-content-<?= $managed_tree->id() ?>">
27*aa6f03bbSGreg Roach                            <?= e($managed_tree->name()) ?><?= e($managed_tree->getTitle()) ?>
28dd6b2bfcSGreg Roach                        </a>
29dd6b2bfcSGreg Roach                    </h2>
30dd6b2bfcSGreg Roach                </div>
3172cf66d4SGreg Roach                <div id="card-tree-content-<?= $managed_tree->id() ?>" class="collapse<?= $managed_tree == $tree || $managed_tree->getPreference('imported') === '0' ? ' show' : '' ?>" role="tabpanel" aria-labelledby="panel-tree-header-<?= $managed_tree->id() ?>">
32dd6b2bfcSGreg Roach                    <div class="card-body">
3372cf66d4SGreg Roach                        <?php $importing = Database::prepare("SELECT 1 FROM `##gedcom_chunk` WHERE gedcom_id = ? AND imported = '0' LIMIT 1")->execute([$managed_tree->id()])->fetchOne() ?>
34dd6b2bfcSGreg Roach                        <?php if ($importing) : ?>
3572cf66d4SGreg Roach                            <div id="import<?= $managed_tree->id() ?>" class="col-xs-12">
36dd6b2bfcSGreg Roach                                <div class="progress">
37dd6b2bfcSGreg Roach                                    <?= I18N::translate('Calculating…') ?>
38dd6b2bfcSGreg Roach                                </div>
39dd6b2bfcSGreg Roach                            </div>
40dd6b2bfcSGreg Roach                            <?php View::push('javascript'); ?>
41dd6b2bfcSGreg Roach                            <script>
42*aa6f03bbSGreg Roach                $("#import<?= $managed_tree->id() ?>").load("<?= route('import', ['ged' => $managed_tree->name()]) ?>", {});
43dd6b2bfcSGreg Roach                            </script>
44dd6b2bfcSGreg Roach                            <?php View::endpush() ?>
45dd6b2bfcSGreg Roach                        <?php endif ?>
4672cf66d4SGreg Roach                        <div class="row<?= $importing ? ' d-none' : '' ?>" id="actions<?= $managed_tree->id() ?>">
47dd6b2bfcSGreg Roach                            <div class="col-sm-6 col-md-3">
48dd6b2bfcSGreg Roach                                <h3>
49*aa6f03bbSGreg Roach                                    <a href="<?= e(route('tree-page', ['ged' => $managed_tree->name()])) ?>">
50dd6b2bfcSGreg Roach                                        <?= I18N::translate('Family tree') ?>
51dd6b2bfcSGreg Roach                                    </a>
52dd6b2bfcSGreg Roach                                </h3>
53dd6b2bfcSGreg Roach                                <ul class="fa-ul">
54dd6b2bfcSGreg Roach                                    <!-- PREFERENCES -->
55dd6b2bfcSGreg Roach                                    <li>
56dd6b2bfcSGreg Roach                                        <span class="fa-li"><?= view('icons/preferences') ?></span>
57*aa6f03bbSGreg Roach                                        <a href="<?= e(route('admin-trees-preferences', ['ged' => $managed_tree->name()])) ?>">
58dd6b2bfcSGreg Roach                                            <?= I18N::translate('Preferences') ?>
59dd6b2bfcSGreg Roach                                            <span class="sr-only">
60dd6b2bfcSGreg Roach                                        <?= e($managed_tree->getTitle()) ?>
61dd6b2bfcSGreg Roach                                    </span>
62dd6b2bfcSGreg Roach                                        </a>
63dd6b2bfcSGreg Roach                                    </li>
64dd6b2bfcSGreg Roach                                    <!-- PRIVACY -->
65dd6b2bfcSGreg Roach                                    <li>
66dd6b2bfcSGreg Roach                                        <span class="fa-li"><?= view('icons/lock') ?></span>
67*aa6f03bbSGreg Roach                                        <a href="<?= e(route('tree-privacy', ['ged' => $managed_tree->name()])) ?>">
68dd6b2bfcSGreg Roach                                            <?= I18N::translate('Privacy') ?>
69dd6b2bfcSGreg Roach                                            <span class="sr-only">
70dd6b2bfcSGreg Roach                                        <?= e($managed_tree->getTitle()) ?>
71dd6b2bfcSGreg Roach                                    </span>
72dd6b2bfcSGreg Roach                                        </a>
73dd6b2bfcSGreg Roach                                    </li>
74dd6b2bfcSGreg Roach                                    <!-- HOME PAGE BLOCKS-->
75dd6b2bfcSGreg Roach                                    <li>
76dd6b2bfcSGreg Roach                                        <span class="fa-li"><?= view('icons/block') ?></span>
77*aa6f03bbSGreg Roach                                        <a href="<?= e(route('tree-page-edit', ['ged' => $managed_tree->name()])) ?>">
78dd6b2bfcSGreg Roach                                            <?= I18N::translate('Change the “Home page” blocks') ?>
79dd6b2bfcSGreg Roach                                            <span class="sr-only">
80dd6b2bfcSGreg Roach                                        <?= e($managed_tree->getTitle()) ?>
81dd6b2bfcSGreg Roach                                    </span>
82dd6b2bfcSGreg Roach                                        </a>
83dd6b2bfcSGreg Roach                                    </li>
84dd6b2bfcSGreg Roach                                    <!-- DELETE -->
85dd6b2bfcSGreg Roach                                    <li>
86dd6b2bfcSGreg Roach                                        <span class="fa-li"><?= view('icons/delete') ?></span>
8772cf66d4SGreg Roach                                        <a href="#" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', e($managed_tree->getTitle())) ?>" onclick="if (confirm(this.dataset.confirm)) { document.delete_form<?= $managed_tree->id() ?>.submit(); } return false;">
88dd6b2bfcSGreg Roach                                            <?= I18N::translate('Delete') ?>
89dd6b2bfcSGreg Roach                                            <span class="sr-only">
90dd6b2bfcSGreg Roach                                                <?= e($managed_tree->getTitle()) ?>
91dd6b2bfcSGreg Roach                                            </span>
92dd6b2bfcSGreg Roach                                        </a>
93*aa6f03bbSGreg Roach                                        <form name="delete_form<?= $managed_tree->id() ?>" method="post" action="<?= route('admin-trees-delete', ['ged' => $managed_tree->name()]) ?>">
94dd6b2bfcSGreg Roach                                            <?= csrf_field() ?>
95dd6b2bfcSGreg Roach                                            <!-- A11Y - forms need submit buttons, but they look ugly here -->
96dd6b2bfcSGreg Roach                                            <button class="sr-only" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', e($managed_tree->getTitle())) ?>" onclick="return confirm(this.dataset.confirm)" type="submit">
97dd6b2bfcSGreg Roach                                                <?= I18N::translate('Delete') ?>
98dd6b2bfcSGreg Roach                                            </button>
99dd6b2bfcSGreg Roach                                        </form>
100dd6b2bfcSGreg Roach                                    </li>
101dd6b2bfcSGreg Roach                                    <!-- SET AS DEFAULT -->
102dd6b2bfcSGreg Roach                                    <?php if (count($all_trees) > 1) : ?>
103dd6b2bfcSGreg Roach                                        <li>
104dd6b2bfcSGreg Roach                                            <span class="fa-li"><?= view('icons/favorite') ?></span>
105*aa6f03bbSGreg Roach                                            <?php if ($managed_tree->name() === Site::getPreference('DEFAULT_GEDCOM')) : ?>
106dd6b2bfcSGreg Roach                                                <?= I18N::translate('Default family tree') ?>
107dd6b2bfcSGreg Roach                                            <?php else : ?>
10872cf66d4SGreg Roach                                                <a href="#" onclick="document.defaultform<?= $managed_tree->id() ?>.submit();">
109dd6b2bfcSGreg Roach                                                    <?= I18N::translate('Set as default') ?>
110dd6b2bfcSGreg Roach                                                    <span class="sr-only"><?= e($managed_tree->getTitle()) ?></span>
111dd6b2bfcSGreg Roach                                                </a>
112*aa6f03bbSGreg Roach                                                <form name="defaultform<?= $managed_tree->id() ?>" method="post" action="<?= route('admin-trees-default', ['ged' => $managed_tree->name()]) ?>">
113dd6b2bfcSGreg Roach                                                    <?= csrf_field() ?>
114dd6b2bfcSGreg Roach                                                    <!-- A11Y - forms need submit buttons, but they look ugly here -->
115dd6b2bfcSGreg Roach                                                    <button class="sr-only" type="submit">
116dd6b2bfcSGreg Roach                                                        <?= I18N::translate('Set as default') ?>
117dd6b2bfcSGreg Roach                                                    </button>
118dd6b2bfcSGreg Roach                                                </form>
119dd6b2bfcSGreg Roach                                            <?php endif ?>
120dd6b2bfcSGreg Roach                                        </li>
121dd6b2bfcSGreg Roach                                    <?php endif ?>
122dd6b2bfcSGreg Roach                                </ul>
123dd6b2bfcSGreg Roach                            </div>
124dd6b2bfcSGreg Roach                            <div class="col-sm-6 col-md-3">
125dd6b2bfcSGreg Roach                                <h3>
126dd6b2bfcSGreg Roach                                    <?= /* I18N: Individuals, sources, dates, places, etc. */ I18N::translate('Genealogy data') ?>
127dd6b2bfcSGreg Roach                                </h3>
128dd6b2bfcSGreg Roach                                <ul class="fa-ul">
129dd6b2bfcSGreg Roach                                    <!-- FIND DUPLICATES -->
130dd6b2bfcSGreg Roach                                    <li>
131dd6b2bfcSGreg Roach                                        <span class="fa-li"><?= view('icons/copy') ?></span>
132*aa6f03bbSGreg Roach                                        <a href="<?= e(route('admin-trees-duplicates', ['ged' => $managed_tree->name()])) ?>">
133dd6b2bfcSGreg Roach                                            <?= I18N::translate('Find duplicates') ?>
134dd6b2bfcSGreg Roach                                            <span class="sr-only">
135dd6b2bfcSGreg Roach                                              <?= e($managed_tree->getTitle()) ?>
136dd6b2bfcSGreg Roach                                            </span>
137dd6b2bfcSGreg Roach                                        </a>
138dd6b2bfcSGreg Roach                                    </li>
139dd6b2bfcSGreg Roach                                    <!-- MERGE -->
140dd6b2bfcSGreg Roach                                    <li>
141dd6b2bfcSGreg Roach                                        <span class="fa-li"><?= view('icons/merge') ?></span>
142*aa6f03bbSGreg Roach                                        <a href="<?= e(route('merge-records', ['ged' => $managed_tree->name()])) ?>">
143dd6b2bfcSGreg Roach                                            <?= I18N::translate('Merge records') ?>
144dd6b2bfcSGreg Roach                                            <span class="sr-only">
145dd6b2bfcSGreg Roach                                                <?= e($managed_tree->getTitle()) ?>
146dd6b2bfcSGreg Roach                                          </span>
147dd6b2bfcSGreg Roach                                        </a>
148dd6b2bfcSGreg Roach                                    </li>
149dd6b2bfcSGreg Roach                                    <!-- UPDATE PLACE NAMES -->
150dd6b2bfcSGreg Roach                                    <li>
151dd6b2bfcSGreg Roach                                        <span class="fa-li"><?= view('icons/location') ?></span>
152*aa6f03bbSGreg Roach                                        <a href="<?= e(route('admin-trees-places', ['ged' => $managed_tree->name()])) ?>">
153dd6b2bfcSGreg Roach                                            <?= I18N::translate('Update place names') ?>
154dd6b2bfcSGreg Roach                                            <span class="sr-only">
155dd6b2bfcSGreg Roach                                                <?= e($managed_tree->getTitle()) ?>
156dd6b2bfcSGreg Roach                                            </span>
157dd6b2bfcSGreg Roach                                        </a>
158dd6b2bfcSGreg Roach                                    </li>
159dd6b2bfcSGreg Roach                                    <!-- CHECK FOR ERRORS -->
160dd6b2bfcSGreg Roach                                    <li>
161dd6b2bfcSGreg Roach                                        <span class="fa-li"><?= view('icons/warning') ?></span>
162*aa6f03bbSGreg Roach                                        <a href="<?= e(route('admin-trees-check', ['ged' => $managed_tree->name()])) ?>">
163dd6b2bfcSGreg Roach                                            <?= I18N::translate('Check for errors') ?>
164dd6b2bfcSGreg Roach                                            <span class="sr-only">
165dd6b2bfcSGreg Roach                                                <?= e($managed_tree->getTitle()) ?>
166dd6b2bfcSGreg Roach                                            </span>
167dd6b2bfcSGreg Roach                                        </a>
168dd6b2bfcSGreg Roach                                    </li>
169dd6b2bfcSGreg Roach                                    <!-- UNCONNECTED INDIVIDUALS -->
170dd6b2bfcSGreg Roach                                    <li>
171dd6b2bfcSGreg Roach                                        <span class="fa-li"><?= view('icons/unlink') ?></span>
172*aa6f03bbSGreg Roach                                        <a href="<?= e(route('admin-trees-unconnected', ['ged' => $managed_tree->name()])) ?>">
173dd6b2bfcSGreg Roach                                            <?= I18N::translate('Find unrelated individuals') ?>
174dd6b2bfcSGreg Roach                                            <span class="sr-only">
175dd6b2bfcSGreg Roach                                                <?= e($managed_tree->getTitle()) ?>
176dd6b2bfcSGreg Roach                                            </span>
177dd6b2bfcSGreg Roach                                        </a>
178dd6b2bfcSGreg Roach                                    </li>
179dd6b2bfcSGreg Roach                                    <!-- RENUMBER -->
180dd6b2bfcSGreg Roach                                    <li>
181dd6b2bfcSGreg Roach                                        <span class="fa-li"><?= view('icons/sort') ?></span>
182*aa6f03bbSGreg Roach                                        <a href="<?= e(route('admin-trees-renumber', ['ged' => $managed_tree->name()])) ?>">
183dd6b2bfcSGreg Roach                                            <?= I18N::translate('Renumber') ?>
184dd6b2bfcSGreg Roach                                            <span class="sr-only">
185dd6b2bfcSGreg Roach                                        <?= e($managed_tree->getTitle()) ?>
186dd6b2bfcSGreg Roach                                    </span>
187dd6b2bfcSGreg Roach                                        </a>
188dd6b2bfcSGreg Roach                                    </li>
189dd6b2bfcSGreg Roach                                    <!-- CHANGES -->
190dd6b2bfcSGreg Roach                                    <li>
191dd6b2bfcSGreg Roach                                        <span class="fa-li"><?= view('icons/edit') ?></span>
192*aa6f03bbSGreg Roach                                        <a href="<?= route('admin-changes-log', ['ged' => $managed_tree->name()]) ?>">
193dd6b2bfcSGreg Roach                                            <?= I18N::translate('Changes log') ?>
194dd6b2bfcSGreg Roach                                            <span class="sr-only">
195dd6b2bfcSGreg Roach                                                <?= e($managed_tree->getTitle()) ?>
196dd6b2bfcSGreg Roach                                            </span>
197dd6b2bfcSGreg Roach                                        </a>
198dd6b2bfcSGreg Roach                                    </li>
199dd6b2bfcSGreg Roach                                </ul>
200dd6b2bfcSGreg Roach                            </div>
201dd6b2bfcSGreg Roach                            <div class="clearfix visible-sm-block"></div>
202dd6b2bfcSGreg Roach                            <div class="col-sm-6 col-md-3">
203dd6b2bfcSGreg Roach                                <h3>
204dd6b2bfcSGreg Roach                                    <?= I18N::translate('Add unlinked records') ?>
205dd6b2bfcSGreg Roach                                </h3>
206dd6b2bfcSGreg Roach                                <ul class="fa-ul">
207dd6b2bfcSGreg Roach                                    <!-- UNLINKED INDIVIDUAL -->
208dd6b2bfcSGreg Roach                                    <li>
209dd6b2bfcSGreg Roach                                        <span class="fa-li"><?= view('icons/individual') ?></span>
210*aa6f03bbSGreg Roach                                        <a href="<?= e(route('add-unlinked-individual', ['ged' => $managed_tree->name()])) ?>">
211dd6b2bfcSGreg Roach                                            <?= I18N::translate('Individual') ?>
212dd6b2bfcSGreg Roach                                            <span class="sr-only">
213dd6b2bfcSGreg Roach                                                <?= e($managed_tree->getTitle()) ?>
214dd6b2bfcSGreg Roach                                            </span>
215dd6b2bfcSGreg Roach                                        </a>
216dd6b2bfcSGreg Roach                                    </li>
217dd6b2bfcSGreg Roach                                    <!-- UNLINKED SOURCE -->
218dd6b2bfcSGreg Roach                                    <li>
219dd6b2bfcSGreg Roach                                        <span class="fa-li"><?= view('icons/source') ?></span>
220*aa6f03bbSGreg Roach                                        <a href="#" data-href="<?= e(route('create-source', ['ged' => $managed_tree->name()])) ?>" data-target="#wt-ajax-modal" data-toggle="modal">
221dd6b2bfcSGreg Roach                                            <?= I18N::translate('Source') ?>
222dd6b2bfcSGreg Roach                                            <span class="sr-only">
223dd6b2bfcSGreg Roach                                                <?= e($managed_tree->getTitle()) ?>
224dd6b2bfcSGreg Roach                                            </span>
225dd6b2bfcSGreg Roach                                        </a>
226dd6b2bfcSGreg Roach                                    </li>
227dd6b2bfcSGreg Roach                                    <!-- UNLINKED REPOSITORY -->
228dd6b2bfcSGreg Roach                                    <li>
229dd6b2bfcSGreg Roach                                        <span class="fa-li"><?= view('icons/repository') ?></span>
230*aa6f03bbSGreg Roach                                        <a href="#" data-href="<?= e(route('create-repository', ['ged' => $managed_tree->name()])) ?>" data-target="#wt-ajax-modal" data-toggle="modal">
231dd6b2bfcSGreg Roach                                            <?= I18N::translate('Repository') ?>
232dd6b2bfcSGreg Roach                                            <span class="sr-only">
233dd6b2bfcSGreg Roach                                                <?= e($managed_tree->getTitle()) ?>
234dd6b2bfcSGreg Roach                                            </span>
235dd6b2bfcSGreg Roach                                        </a>
236dd6b2bfcSGreg Roach                                    </li>
237dd6b2bfcSGreg Roach                                    <!-- UNLINKED MEDIA OBJECT -->
238dd6b2bfcSGreg Roach                                    <li>
239dd6b2bfcSGreg Roach                                        <span class="fa-li"><?= view('icons/media') ?></span>
240*aa6f03bbSGreg Roach                                        <a href="#" data-href="<?= e(route('create-media-object', ['ged' => $managed_tree->name()])) ?>" data-target="#wt-ajax-modal" data-toggle="modal">
241dd6b2bfcSGreg Roach
242dd6b2bfcSGreg Roach                                            <?= I18N::translate('Media object') ?>
243dd6b2bfcSGreg Roach                                            <span class="sr-only">
244dd6b2bfcSGreg Roach                                                <?= e($managed_tree->getTitle()) ?>
245dd6b2bfcSGreg Roach                                            </span>
246dd6b2bfcSGreg Roach                                        </a>
247dd6b2bfcSGreg Roach                                    </li>
248dd6b2bfcSGreg Roach                                    <!-- UNLINKED NOTE -->
249dd6b2bfcSGreg Roach                                    <li>
250dd6b2bfcSGreg Roach                                        <span class="fa-li"><?= view('icons/note') ?></span>
251*aa6f03bbSGreg Roach                                        <a href="#" data-href="<?= e(route('create-note-object', ['ged' => $managed_tree->name()])) ?>" data-target="#wt-ajax-modal" data-toggle="modal">
252dd6b2bfcSGreg Roach                                            <span class="sr-only">
253dd6b2bfcSGreg Roach                                                <?= e($managed_tree->getTitle()) ?>
254dd6b2bfcSGreg Roach                                            </span>
255dd6b2bfcSGreg Roach                                            <?= I18N::translate('Shared note') ?>
256dd6b2bfcSGreg Roach                                        </a>
257dd6b2bfcSGreg Roach                                    </li>
258dd6b2bfcSGreg Roach                                    <!-- UNLINKED SUBMITTER -->
259dd6b2bfcSGreg Roach                                    <li>
260dd6b2bfcSGreg Roach                                        <span class="fa-li"><?= view('icons/submitter') ?></span>
261*aa6f03bbSGreg Roach                                        <a href="#" data-href="<?= e(route('create-submitter', ['ged' => $managed_tree->name()])) ?>" data-target="#wt-ajax-modal" data-toggle="modal">
262dd6b2bfcSGreg Roach                                            <span class="sr-only">
263dd6b2bfcSGreg Roach                                                <?= e($managed_tree->getTitle()) ?>
264dd6b2bfcSGreg Roach                                            </span>
265dd6b2bfcSGreg Roach                                            <?= I18N::translate('Submitter') ?>
266dd6b2bfcSGreg Roach                                        </a>
267dd6b2bfcSGreg Roach                                    </li>
268dd6b2bfcSGreg Roach                                </ul>
269dd6b2bfcSGreg Roach                            </div>
270dd6b2bfcSGreg Roach                            <div class="col-sm-6 col-md-3">
271dd6b2bfcSGreg Roach                                <h3>
272dd6b2bfcSGreg Roach                                    <?= I18N::translate('GEDCOM file') ?>
273dd6b2bfcSGreg Roach                                </h3>
274dd6b2bfcSGreg Roach                                <ul class="fa-ul">
275dd6b2bfcSGreg Roach                                    <!-- DOWNLOAD/Export -->
276dd6b2bfcSGreg Roach                                    <li>
277dd6b2bfcSGreg Roach                                        <span class="fa-li"><?= view('icons/download') ?></span>
278*aa6f03bbSGreg Roach                                        <a href="<?= e(route('admin-trees-export', ['ged' => $managed_tree->name()])) ?>">
279dd6b2bfcSGreg Roach                                            <?= I18N::translate('Export') ?>
280dd6b2bfcSGreg Roach                                            <span class="sr-only">
281dd6b2bfcSGreg Roach                                        <?= e($managed_tree->getTitle()) ?>
282dd6b2bfcSGreg Roach                                    </span>
283dd6b2bfcSGreg Roach                                        </a>
284dd6b2bfcSGreg Roach                                    </li>
285dd6b2bfcSGreg Roach                                    <!-- UPLOAD/IMPORT -->
286dd6b2bfcSGreg Roach                                    <li>
287dd6b2bfcSGreg Roach                                        <span class="fa-li"><?= view('icons/upload') ?></span>
288*aa6f03bbSGreg Roach                                        <a href="<?= e(route('admin-trees-import', ['ged' => $managed_tree->name()])) ?>">
289dd6b2bfcSGreg Roach                                            <?= I18N::translate('Import') ?>
290dd6b2bfcSGreg Roach                                            <span class="sr-only">
291dd6b2bfcSGreg Roach                                        <?= e($managed_tree->getTitle()) ?>
292dd6b2bfcSGreg Roach                                    </span>
293dd6b2bfcSGreg Roach                                        </a>
294dd6b2bfcSGreg Roach                                    </li>
295dd6b2bfcSGreg Roach                                </ul>
296dd6b2bfcSGreg Roach                            </div>
297dd6b2bfcSGreg Roach                        </div>
298dd6b2bfcSGreg Roach                    </div>
299dd6b2bfcSGreg Roach                </div>
300dd6b2bfcSGreg Roach            </div>
301dd6b2bfcSGreg Roach        <?php endif ?>
302dd6b2bfcSGreg Roach    <?php endforeach ?>
303dd6b2bfcSGreg Roach
304dd6b2bfcSGreg Roach    <?php if (Auth::isAdmin()) : ?>
305dd6b2bfcSGreg Roach        <div class="card">
306dd6b2bfcSGreg Roach            <div class="card-header" id="card-tree-create-header">
307dd6b2bfcSGreg Roach                <h2 class="mb-0">
308dd6b2bfcSGreg Roach            <?= view('icons/add') ?>
309dd6b2bfcSGreg Roach                    <a data-toggle="collapse" data-parent="#accordion" href="#card-tree-create-content" aria-controls="card-tree-create-content">
310dd6b2bfcSGreg Roach                        <?= I18N::translate('Create a family tree') ?>
311dd6b2bfcSGreg Roach                    </a>
312dd6b2bfcSGreg Roach                </h2>
313dd6b2bfcSGreg Roach            </div>
314dd6b2bfcSGreg Roach            <div id="card-tree-create-content" class="collapse<?= empty($all_trees) ? ' show' : '' ?>" role="tabpanel" aria-labelledby="card-tree-create-header">
315dd6b2bfcSGreg Roach                <div class="card-body">
316dd6b2bfcSGreg Roach                    <form class="form-horizontal" method="post" action="<?= e(route('admin-trees-create')) ?>">
317dd6b2bfcSGreg Roach                        <?= csrf_field() ?>
318dd6b2bfcSGreg Roach                        <div class="row form-group">
319dd6b2bfcSGreg Roach                            <label for="tree_title" class="col-sm-2 col-form-label">
320dd6b2bfcSGreg Roach                                <?= I18N::translate('Family tree title') ?>
321dd6b2bfcSGreg Roach                            </label>
322dd6b2bfcSGreg Roach                            <div class="col-sm-10">
323dd6b2bfcSGreg Roach                                <input class="form-control" id="tree_title" maxlength="255" name="tree_title" required type="text" placeholder="<?= $default_tree_title ?>">
324dd6b2bfcSGreg Roach                            </div>
325dd6b2bfcSGreg Roach                        </div>
326dd6b2bfcSGreg Roach                        <div class="row form-group">
327dd6b2bfcSGreg Roach                            <label for="tree_name" class="col-sm-2 col-form-label">
328dd6b2bfcSGreg Roach                                <?= I18N::translate('URL') ?>
329dd6b2bfcSGreg Roach                            </label>
330dd6b2bfcSGreg Roach                            <div class="col-sm-10">
331dd6b2bfcSGreg Roach                                <div class="input-group" dir="ltr">
332dd6b2bfcSGreg Roach                                    <div class="input-group-prepend">
333dd6b2bfcSGreg Roach                                    <span class="input-group-text">
334dd6b2bfcSGreg Roach                                        <?= WT_BASE_URL ?>?ged=
335dd6b2bfcSGreg Roach                                    </span>
336dd6b2bfcSGreg Roach                                    </div>
337dd6b2bfcSGreg Roach                                    <input class="form-control" id="tree_name" maxlength="31" name="tree_name" pattern="[^&lt;&gt;&amp;&quot;#^$*?{}()\[\]/\\]*" required type="text" value="<?= $default_tree_name ?>">
338dd6b2bfcSGreg Roach                                </div>
339dd6b2bfcSGreg Roach                                <p class="small text-muted">
340dd6b2bfcSGreg Roach                                    <?= I18N::translate('Avoid spaces and punctuation. A family name might be a good choice.') ?>
341dd6b2bfcSGreg Roach                                </p>
342dd6b2bfcSGreg Roach                            </div>
343dd6b2bfcSGreg Roach                        </div>
344dd6b2bfcSGreg Roach                        <div class="row form-group">
345dd6b2bfcSGreg Roach                            <div class="offset-sm-2 col-sm-10">
346dd6b2bfcSGreg Roach                                <button type="submit" class="btn btn-primary">
347dd6b2bfcSGreg Roach                                    <?= view('icons/save') ?>
348dd6b2bfcSGreg Roach                                    <?= /* I18N: A button label. */ I18N::translate('create') ?>
349dd6b2bfcSGreg Roach                                </button>
350dd6b2bfcSGreg Roach                                <p class="small text-muted">
351dd6b2bfcSGreg Roach                                    <?= I18N::translate('After creating the family tree, you will be able to import data from a GEDCOM file.') ?>
352dd6b2bfcSGreg Roach                                </p>
353dd6b2bfcSGreg Roach                            </div>
354dd6b2bfcSGreg Roach                        </div>
355dd6b2bfcSGreg Roach                    </form>
356dd6b2bfcSGreg Roach                </div>
357dd6b2bfcSGreg Roach            </div>
358dd6b2bfcSGreg Roach        </div>
359dd6b2bfcSGreg Roach    <?php endif ?>
360dd6b2bfcSGreg Roach
361dd6b2bfcSGreg Roach    <!-- display link to PhpGedView-WT transfer wizard on first visit to this page, before any GEDCOM is loaded -->
362dd6b2bfcSGreg Roach    <?php if (empty($all_trees) && count($all_users) === 1) : ?>
363dd6b2bfcSGreg Roach        <div class="card">
364dd6b2bfcSGreg Roach            <div class="card-header" id="card-pgv-wizard-header">
365dd6b2bfcSGreg Roach                <h2 class="mb-0">
366dd6b2bfcSGreg Roach                    <?= view('icons/wizard') ?>
367dd6b2bfcSGreg Roach                    <a data-toggle="collapse" data-parent="#accordion" href="#card-pgv-wizard-content" aria-controls="card-pgv-wizard-content">
368dd6b2bfcSGreg Roach                        <?= I18N::translate('PhpGedView to webtrees transfer wizard') ?>
369dd6b2bfcSGreg Roach                    </a>
370dd6b2bfcSGreg Roach                </h2>
371dd6b2bfcSGreg Roach            </div>
372dd6b2bfcSGreg Roach            <div id="card-pgv-wizard-content" class="collapse show" role="tabpanel" aria-labelledby="card-pgv-wizard-header">
373dd6b2bfcSGreg Roach                <div class="card-body">
374dd6b2bfcSGreg Roach                    <p>
375dd6b2bfcSGreg Roach                        <?= I18N::translate('The PhpGedView to webtrees wizard is an automated process to assist administrators make the move from a PhpGedView installation to a new webtrees one. It will transfer all PhpGedView GEDCOM and other database information directly to your new webtrees database. The following requirements are necessary:') ?>
376dd6b2bfcSGreg Roach                    </p>
377dd6b2bfcSGreg Roach                    <ul>
378dd6b2bfcSGreg Roach                        <li>
379dd6b2bfcSGreg Roach                            <?= I18N::translate('webtrees’ database must be on the same server as PhpGedView’s') ?>
380dd6b2bfcSGreg Roach                        </li>
381dd6b2bfcSGreg Roach                        <li>
382dd6b2bfcSGreg Roach                            <?= /* I18N: %s is a number */ I18N::translate('PhpGedView must be version 4.2.3, or any SVN up to #%s', I18N::digits(7101)) ?>
383dd6b2bfcSGreg Roach                        </li>
384dd6b2bfcSGreg Roach                        <li>
385dd6b2bfcSGreg Roach                            <?= I18N::translate('All changes in PhpGedView must be accepted') ?>
386dd6b2bfcSGreg Roach                        </li>
387dd6b2bfcSGreg Roach                        <li>
388dd6b2bfcSGreg Roach                            <?= I18N::translate('All existing PhpGedView users must have distinct email addresses') ?>
389dd6b2bfcSGreg Roach                        </li>
390dd6b2bfcSGreg Roach                    </ul>
391dd6b2bfcSGreg Roach                    <p>
392dd6b2bfcSGreg Roach                        <?= I18N::translate('<b>Important note:</b> The transfer wizard is not able to assist with moving media items. You will need to set up and move or copy your media configuration and objects separately after the transfer wizard is finished.') ?>
393dd6b2bfcSGreg Roach                    </p>
394dd6b2bfcSGreg Roach                    <p>
395dd6b2bfcSGreg Roach                        <a href="<?= route('phpgedview-wizard') ?>">
396dd6b2bfcSGreg Roach                            <?= I18N::translate('PhpGedView to webtrees transfer wizard') ?>
397dd6b2bfcSGreg Roach                        </a>
398dd6b2bfcSGreg Roach                    </p>
399dd6b2bfcSGreg Roach                </div>
400dd6b2bfcSGreg Roach            </div>
401dd6b2bfcSGreg Roach        </div>
402dd6b2bfcSGreg Roach    <?php endif ?>
403dd6b2bfcSGreg Roach
404dd6b2bfcSGreg Roach    <!-- BULK LOAD/SYNCHRONISE GEDCOM FILES -->
405dd6b2bfcSGreg Roach    <?php if (count($gedcom_files) >= $multiple_tree_threshold) : ?>
406dd6b2bfcSGreg Roach        <div class="card">
407dd6b2bfcSGreg Roach            <div class="card-header" id="card-tree-create-header">
408dd6b2bfcSGreg Roach                <h2 class="mb-0">
409dd6b2bfcSGreg Roach                    <?= view('icons/sync') ?>
410dd6b2bfcSGreg Roach                    <a data-toggle="collapse" data-parent="#accordion" href="#synchronize-gedcom-files">
411dd6b2bfcSGreg Roach                        <?= I18N::translate('Synchronize family trees with GEDCOM files') ?>
412dd6b2bfcSGreg Roach                    </a>
413dd6b2bfcSGreg Roach                </h2>
414dd6b2bfcSGreg Roach            </div>
415dd6b2bfcSGreg Roach
416dd6b2bfcSGreg Roach            <div id="synchronize-gedcom-files" class="panel-collapse collapse">
417dd6b2bfcSGreg Roach                <div class="card-body">
418dd6b2bfcSGreg Roach                    <p>
419dd6b2bfcSGreg Roach                        <?= I18N::translate('Create, update, and delete a family tree for every GEDCOM file in the data folder.') ?>
420dd6b2bfcSGreg Roach                    </p>
421*aa6f03bbSGreg Roach                    <form method="post" class="form form-horizontal" action="<?= e(route('admin-trees-sync', ['ged' => $tree->name()])) ?>">
422dd6b2bfcSGreg Roach                        <?= csrf_field() ?>
423dd6b2bfcSGreg Roach                        <button type="submit" class="btn btn-danger">
424dd6b2bfcSGreg Roach                <?= view('icons/save') ?>
425dd6b2bfcSGreg Roach                            <?= /* I18N: A button label. */ I18N::translate('continue') ?>
426dd6b2bfcSGreg Roach                        </button>
427dd6b2bfcSGreg Roach                        <p class="small text-muted">
428dd6b2bfcSGreg Roach                            <?= I18N::translate('Caution! This may take a long time. Be patient.') ?>
429dd6b2bfcSGreg Roach                        </p>
430dd6b2bfcSGreg Roach                    </form>
431dd6b2bfcSGreg Roach                </div>
432dd6b2bfcSGreg Roach            </div>
433dd6b2bfcSGreg Roach        </div>
434dd6b2bfcSGreg Roach    <?php endif ?>
435dd6b2bfcSGreg Roach</div>
436dd6b2bfcSGreg Roach
437dd6b2bfcSGreg Roach<?= view('modals/ajax') ?>
438