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