summaryrefslogtreecommitdiff
path: root/resources/views/admin/trees-export.phtml
blob: dc1f4f8a9fb58b0e252ea14dab7372df79495ca9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<?php

use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
use Fisharebest\Webtrees\Http\RequestHandlers\ExportGedcomClient;
use Fisharebest\Webtrees\Http\RequestHandlers\ExportGedcomServer;
use Fisharebest\Webtrees\Http\RequestHandlers\ManageTrees;
use Fisharebest\Webtrees\I18N;
use Fisharebest\Webtrees\Tree;

/**
 * @var string $title
 * @var Tree   $tree
 */

?>

<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), route(ManageTrees::class, ['tree' => $tree->name()]) => I18N::translate('Manage family trees'), $title]]) ?>

<h1><?= $title ?></h1>

<div class="row">
    <div class="col-sm-4">
        <div class="card">
            <div class="card-header">
                <?= I18N::translate('A file on the server') ?>
            </div>
            <div class="card-body">
                <form method="post" action="<?= e(route(ExportGedcomServer::class, ['tree' => $tree->name()])) ?>" class="form form-horizontal">
                    <?= csrf_field() ?>

                    <button type="submit" class="btn btn-primary">
                        <?= view('icons/save') ?>
                        <?= /* I18N: A button label. */
                        I18N::translate('continue') ?>
                    </button>
                </form>
            </div>
        </div>
    </div>

    <div class="col-sm-8">
        <div class="card">
            <div class="card-header">
                <?= I18N::translate('A file on your computer') ?>
            </div>
            <div class="card-body">
                <form method="post" action="<?= e(route(ExportGedcomClient::class, ['tree' => $tree->name()])) ?>" class="form form-horizontal">
                    <?= csrf_field() ?>

                    <p class="card-title">
                        <?= I18N::translate('Export preferences') ?>
                    </p>

                    <div class="form-check">
                        <label class="form-check-label">
                            <input class="form-check-input" type="checkbox" name="zip">
                            <?= I18N::translate('Compress the GEDCOM file') ?>
                        </label>
                        <?= view('help/link', ['topic' => 'zip-gedcom']) ?>
                    </div>

                    <div class="form-check">
                        <label class="form-check-label">
                            <input class="form-check-input" type="checkbox" name="media">
                            <?= I18N::translate('Include media (automatically zips files)') ?>
                        </label>
                    </div>

                   <div class="form-check">
                        <label class="form-check-label">
                            <input class="form-check-input" type="checkbox" name="convert">
                            <?= I18N::translate('Convert from UTF-8 to ISO-8859-1') ?>
                        </label>
                       <?= view('help/link', ['topic' => 'iso-8859-1']) ?>
                    </div>

                    <?php if ($tree->getPreference('GEDCOM_MEDIA_PATH')) : ?>
                        <hr>

                        <label>
                            <input type="checkbox" name="media-path" value="<?= e($tree->getPreference('GEDCOM_MEDIA_PATH')) ?>">
                            <?= /* I18N: A media path (e.g. C:\aaa\bbb\ccc\) in a GEDCOM file */
                            I18N::translate('Add the GEDCOM media path to filenames') ?>
                        </label>
                        <p>
                            <?= /* I18N: %s is the name of a folder. */
                            I18N::translate('Media filenames will be prefixed by %s.', '<code dir="ltr">' . e($tree->getPreference('GEDCOM_MEDIA_PATH')) . '</code>') ?>
                        </p>
                    <?php endif ?>

                    <hr>

                    <p class="card-title">
                        <?= I18N::translate('Apply privacy settings') ?>
                    </p>

                    <fieldset class="form-group">
                        <div class="form-check form-check-inline">
                            <label>
                                <input type="radio" name="privatize_export" value="none" checked>
                                <?= I18N::translate('None') ?>
                            </label>
                        </div>
                        <div class="form-check form-check-inline">
                            <label>
                                <input type="radio" name="privatize_export" value="gedadmin">
                                <?= I18N::translate('Manager') ?>
                            </label>
                        </div>
                        <div class="form-check form-check-inline">
                            <label>
                                <input type="radio" name="privatize_export" value="user">
                                <?= I18N::translate('Member') ?>
                            </label>
                        </div>
                        <div class="form-check form-check-inline">
                            <label>
                                <input type="radio" name="privatize_export" value="visitor">
                                <?= I18N::translate('Visitor') ?>
                            </label>
                        </div>
                    </fieldset>

                    <button type="submit" class="btn btn-primary">
                        <?= view('icons/download') ?>
                        <?= /* I18N: A button label. */
                        I18N::translate('continue') ?>
                    </button>
                </form>
            </div>
        </div>
    </div>
</div>

<?= view('modals/ajax') ?>