xref: /webtrees/resources/views/admin/trees-export.phtml (revision 08b5db2af7b56fafdef6563369bf89966bc0e451)
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 string $title
12 * @var Tree   $tree
13 */
14
15?>
16
17<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), route(ManageTrees::class, ['tree' => $tree->name()]) => I18N::translate('Manage family trees'), $title]]) ?>
18
19<h1><?= $title ?></h1>
20
21<div class="row">
22    <div class="col-sm-4">
23        <div class="card">
24            <div class="card-header">
25                <?= I18N::translate('A file on the server') ?>
26            </div>
27            <div class="card-body">
28                <form method="post" action="<?= e(route(ExportGedcomServer::class, ['tree' => $tree->name()])) ?>" class="form form-horizontal">
29                    <?= csrf_field() ?>
30
31                    <button type="submit" class="btn btn-primary">
32                        <?= view('icons/save') ?>
33                        <?= /* I18N: A button label. */
34                        I18N::translate('continue') ?>
35                    </button>
36                </form>
37            </div>
38        </div>
39    </div>
40
41    <div class="col-sm-8">
42        <div class="card">
43            <div class="card-header">
44                <?= I18N::translate('A file on your computer') ?>
45            </div>
46            <div class="card-body">
47                <form method="post" action="<?= e(route(ExportGedcomClient::class, ['tree' => $tree->name()])) ?>" class="form form-horizontal">
48                    <?= csrf_field() ?>
49
50                    <p class="card-title">
51                        <?= I18N::translate('Export preferences') ?>
52                    </p>
53
54                    <div class="form-check">
55                        <label class="form-check-label">
56                            <input class="form-check-input" type="checkbox" name="zip">
57                            <?= I18N::translate('Compress the GEDCOM file') ?>
58                        </label>
59                        <?= view('help/link', ['topic' => 'zip-gedcom']) ?>
60                    </div>
61
62                    <div class="form-check">
63                        <label class="form-check-label">
64                            <input class="form-check-input" type="checkbox" name="media">
65                            <?= I18N::translate('Include media (automatically zips files)') ?>
66                        </label>
67                    </div>
68
69                   <div class="form-check">
70                        <label class="form-check-label">
71                            <input class="form-check-input" type="checkbox" name="convert">
72                            <?= I18N::translate('Convert from UTF-8 to ISO-8859-1') ?>
73                        </label>
74                       <?= view('help/link', ['topic' => 'iso-8859-1']) ?>
75                    </div>
76
77                    <?php if ($tree->getPreference('GEDCOM_MEDIA_PATH')) : ?>
78                        <hr>
79
80                        <label>
81                            <input type="checkbox" name="media-path" value="<?= e($tree->getPreference('GEDCOM_MEDIA_PATH')) ?>">
82                            <?= /* I18N: A media path (e.g. C:\aaa\bbb\ccc\) in a GEDCOM file */
83                            I18N::translate('Add the GEDCOM media path to filenames') ?>
84                        </label>
85                        <p>
86                            <?= /* I18N: %s is the name of a folder. */
87                            I18N::translate('Media filenames will be prefixed by %s.', '<code dir="ltr">' . e($tree->getPreference('GEDCOM_MEDIA_PATH')) . '</code>') ?>
88                        </p>
89                    <?php endif ?>
90
91                    <hr>
92
93                    <p class="card-title">
94                        <?= I18N::translate('Apply privacy settings') ?>
95                    </p>
96
97                    <fieldset class="form-group">
98                        <div class="form-check form-check-inline">
99                            <label>
100                                <input type="radio" name="privatize_export" value="none" checked>
101                                <?= I18N::translate('None') ?>
102                            </label>
103                        </div>
104                        <div class="form-check form-check-inline">
105                            <label>
106                                <input type="radio" name="privatize_export" value="gedadmin">
107                                <?= I18N::translate('Manager') ?>
108                            </label>
109                        </div>
110                        <div class="form-check form-check-inline">
111                            <label>
112                                <input type="radio" name="privatize_export" value="user">
113                                <?= I18N::translate('Member') ?>
114                            </label>
115                        </div>
116                        <div class="form-check form-check-inline">
117                            <label>
118                                <input type="radio" name="privatize_export" value="visitor">
119                                <?= I18N::translate('Visitor') ?>
120                            </label>
121                        </div>
122                    </fieldset>
123
124                    <button type="submit" class="btn btn-primary">
125                        <?= view('icons/download') ?>
126                        <?= /* I18N: A button label. */
127                        I18N::translate('continue') ?>
128                    </button>
129                </form>
130            </div>
131        </div>
132    </div>
133</div>
134
135<?= view('modals/ajax') ?>
136