xref: /webtrees/resources/views/admin/trees-export.phtml (revision b108908174bafa493667672cfb8e9510f0750f22)
1<?php
2
3use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
4use Fisharebest\Webtrees\Http\RequestHandlers\ExportGedcomClient;
5use Fisharebest\Webtrees\Http\RequestHandlers\ExportGedcomServer;
6use Fisharebest\Webtrees\Http\RequestHandlers\ManageTrees;
7use Fisharebest\Webtrees\I18N;
8use Fisharebest\Webtrees\Tree;
9
10/**
11 * @var array<string> $download_filenames
12 * @var string        $filename
13 * @var string        $title
14 * @var Tree          $tree
15 * @var bool          $zip_available
16 */
17
18?>
19
20<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), route(ManageTrees::class, ['tree' => $tree->name()]) => I18N::translate('Manage family trees'), $title]]) ?>
21
22<h1><?= $title ?></h1>
23
24<div class="row">
25    <div class="col-sm-6">
26        <div class="card">
27            <div class="card-header">
28                <?= I18N::translate('A file on the server') ?>
29            </div>
30            <div class="card-body">
31                <form method="post" action="<?= e(route(ExportGedcomServer::class, ['tree' => $tree->name()])) ?>" class="form form-horizontal">
32                    <div class="mb-3">
33                        <label for="filename"><?= I18N::translate('Filename') ?></label>
34                        <input type="text" class="form-control" id="filename" name="filename" value="<?= e($filename) ?>">
35                    </div>
36
37                    <button type="submit" class="btn btn-primary">
38                        <?= view('icons/save') ?>
39                        <?= /* I18N: A button label. */
40                        I18N::translate('save') ?>
41                    </button>
42
43                    <?= csrf_field() ?>
44                </form>
45            </div>
46        </div>
47    </div>
48
49    <div class="col-sm-6">
50        <div class="card">
51            <div class="card-header">
52                <?= I18N::translate('A file on your computer') ?>
53            </div>
54
55            <div class="card-body">
56                <form method="post" action="<?= e(route(ExportGedcomClient::class, ['tree' => $tree->name()])) ?>" class="form form-horizontal">
57                    <p class="card-title">
58                        <?= I18N::translate('Export preferences') ?>
59                    </p>
60
61                    <?= view('admin/gedcom-export-options', ['download_filenames' => $download_filenames, 'tree' => $tree, 'zip_available' => $zip_available]) ?>
62
63                    <button type="submit" class="btn btn-primary">
64                        <?= view('icons/download') ?>
65                        <?= /* I18N: A button label. */
66                        I18N::translate('download') ?>
67                    </button>
68
69                    <?= csrf_field() ?>
70                </form>
71            </div>
72        </div>
73    </div>
74</div>
75
76<?= view('modals/ajax') ?>
77