xref: /webtrees/resources/views/admin/trees-export.phtml (revision 9e3c2cf9009c4c2140f50ddfc80b91f2f82cdce5)
10c0910bfSGreg Roach<?php
2dd6b2bfcSGreg Roach
30c0910bfSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
46d576906SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ExportGedcomClient;
56d576906SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ExportGedcomServer;
66fd01894SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ManageTrees;
70c0910bfSGreg Roachuse Fisharebest\Webtrees\I18N;
87c2c99faSGreg Roachuse Fisharebest\Webtrees\Tree;
97c2c99faSGreg Roach
107c2c99faSGreg Roach/**
1116ecfcafSGreg Roach * @var array<string> $download_filenames
12eb2f4c2aSGreg Roach * @var string        $filename
137c2c99faSGreg Roach * @var string        $title
147c2c99faSGreg Roach * @var Tree          $tree
1516ecfcafSGreg Roach * @var bool          $zip_available
167c2c99faSGreg Roach */
170c0910bfSGreg Roach
180c0910bfSGreg Roach?>
190c0910bfSGreg Roach
206fd01894SGreg Roach<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), route(ManageTrees::class, ['tree' => $tree->name()]) => I18N::translate('Manage family trees'), $title]]) ?>
21dd6b2bfcSGreg Roach
22dd6b2bfcSGreg Roach<h1><?= $title ?></h1>
23dd6b2bfcSGreg Roach
246d576906SGreg Roach<div class="row">
251c6adce8SGreg Roach    <div class="col-sm-6">
266d576906SGreg Roach        <div class="card">
276d576906SGreg Roach            <div class="card-header">
28dd6b2bfcSGreg Roach                <?= I18N::translate('A file on the server') ?>
29dd6b2bfcSGreg Roach            </div>
306d576906SGreg Roach            <div class="card-body">
316d576906SGreg Roach                <form method="post" action="<?= e(route(ExportGedcomServer::class, ['tree' => $tree->name()])) ?>" class="form form-horizontal">
326d576906SGreg Roach                    <?= csrf_field() ?>
336d576906SGreg Roach
34eb2f4c2aSGreg Roach
35*9e3c2cf9SGreg Roach                    <div class="mb-3">
36eb2f4c2aSGreg Roach                        <label for="filename"><?= I18N::translate('Filename') ?></label>
37eb2f4c2aSGreg Roach                        <input type="text" class="form-control" id="filename" name="filename" value="<?= e($filename) ?>">
38eb2f4c2aSGreg Roach                    </div>
39eb2f4c2aSGreg Roach
40dd6b2bfcSGreg Roach                    <button type="submit" class="btn btn-primary">
416d576906SGreg Roach                        <?= view('icons/save') ?>
426d576906SGreg Roach                        <?= /* I18N: A button label. */
4316ecfcafSGreg Roach                        I18N::translate('save') ?>
44dd6b2bfcSGreg Roach                    </button>
45dd6b2bfcSGreg Roach                </form>
466d576906SGreg Roach            </div>
476d576906SGreg Roach        </div>
486d576906SGreg Roach    </div>
49dd6b2bfcSGreg Roach
501c6adce8SGreg Roach    <div class="col-sm-6">
516d576906SGreg Roach        <div class="card">
526d576906SGreg Roach            <div class="card-header">
536d576906SGreg Roach                <?= I18N::translate('A file on your computer') ?>
546d576906SGreg Roach            </div>
551c6adce8SGreg Roach
566d576906SGreg Roach            <div class="card-body">
576d576906SGreg Roach                <form method="post" action="<?= e(route(ExportGedcomClient::class, ['tree' => $tree->name()])) ?>" class="form form-horizontal">
586d576906SGreg Roach                    <?= csrf_field() ?>
59dd6b2bfcSGreg Roach
606d576906SGreg Roach                    <p class="card-title">
61dd6b2bfcSGreg Roach                        <?= I18N::translate('Export preferences') ?>
626d576906SGreg Roach                    </p>
636d576906SGreg Roach
6416ecfcafSGreg Roach                    <?= view('admin/gedcom-export-options', ['download_filenames' =>$download_filenames, 'tree' => $tree, 'zip_available' => $zip_available]) ?>
656d576906SGreg Roach
66dd6b2bfcSGreg Roach                    <button type="submit" class="btn btn-primary">
676d576906SGreg Roach                        <?= view('icons/download') ?>
686d576906SGreg Roach                        <?= /* I18N: A button label. */
6916ecfcafSGreg Roach                        I18N::translate('download') ?>
70dd6b2bfcSGreg Roach                    </button>
71dd6b2bfcSGreg Roach                </form>
726d576906SGreg Roach            </div>
736d576906SGreg Roach        </div>
746d576906SGreg Roach    </div>
756d576906SGreg Roach</div>
766d576906SGreg Roach
776d576906SGreg Roach<?= view('modals/ajax') ?>
78