xref: /webtrees/resources/views/admin/gedcom-export-options.phtml (revision 1c6adce825f16611bd8b75a22114302de4b41cfe)
1<?php
2
3use Fisharebest\Webtrees\Auth;
4use Fisharebest\Webtrees\Encodings\ANSEL;
5use Fisharebest\Webtrees\Encodings\ASCII;
6use Fisharebest\Webtrees\Encodings\UTF16BE;
7use Fisharebest\Webtrees\Encodings\UTF8;
8use Fisharebest\Webtrees\I18N;
9
10?>
11
12<div class="row mb-3">
13    <label class="col-sm-3" for="format">
14        <?= I18N::translate('Format') ?>
15    </label>
16
17    <div class="col-sm-9">
18        <div class="form-check">
19            <input class="form-check-input" type="radio" name="format" id="format-gedcom" value="gedcom" checked="checked">
20
21            <label class="form-check-label" for="format-gedcom">
22                <?= I18N::translate('GEDCOM') ?>
23            </label>
24        </div>
25
26        <div class="form-check">
27            <input class="form-check-input" type="radio" name="format" id="format-zip" value="zip">
28
29            <label class="form-check-label" for="format-zip">
30                <?= /* I18N: ZIP = file format */ I18N::translate('ZIP (includes media files)') ?>
31            </label>
32        </div>
33    </div>
34</div>
35
36<div class="row mb-3">
37    <label class="col-sm-3" for="encoding">
38        <?= I18N::translate('Character encoding') ?>
39    </label>
40
41    <div class="col-sm-9">
42        <?= view('components/select', ['name' => 'encoding', 'id' => 'encoding', 'selected' => UTF8::NAME, 'options' => [UTF8::NAME => 'UTF-8', UTF16BE::NAME => 'UNICODE (UTF16-BE)', ANSEL::NAME => 'ANSEL', ASCII::NAME => 'ASCII', 'CP1252' => 'ANSI (CP1252)']]) ?>
43    </div>
44</div>
45
46<div class="row mb-3">
47    <label class="col-sm-3" for="line_endings">
48        <?= I18N::translate('Line endings') ?>
49    </label>
50
51    <div class="col-sm-9">
52        <?= view('components/radios-inline', ['name' => 'line_endings', 'options' => ['CRLF' => 'CR/LF (windows)', 'LF' => 'LF (unix)'], 'selected' => 'CRLF']) ?>
53    </div>
54</div>
55
56<div class="row mb-3">
57    <label class="col-sm-3" for="privacy">
58        <?= I18N::translate('Apply privacy settings') ?>
59    </label>
60
61    <div class="col-sm-9">
62        <?php if (Auth::isAdmin()) : ?>
63            <?= view('components/radios-inline', ['name' => 'privacy', 'options' => ['none' => I18N::translate('None'), 'gedadmin' => I18N::translate('Manager'), 'user' => I18N::translate('Member'), 'visitor' => I18N::translate('Visitor')], 'selected' => 'none']) ?>
64        <?php elseif (Auth::isManager($tree)) : ?>
65            <?= view('components/radios-inline', ['name' => 'privacy', 'options' => ['gedadmin' => I18N::translate('Manager'), 'user' => I18N::translate('Member'), 'visitor' => I18N::translate('Visitor')], 'selected' => 'gedadmin']) ?>
66        <?php elseif (Auth::isMember($tree)) : ?>
67            <?= view('components/radios-inline', ['name' => 'privacy', 'options' => ['user' => I18N::translate('Member'), 'visitor' => I18N::translate('Visitor')], 'selected' => 'user']) ?>
68        <?php else : ?>
69            <input type="hidden" name="privacy" value="visitor">
70        <?php endif ?>
71    </div>
72</div>
73
74