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