xref: /webtrees/resources/views/modules/sitemap/config.phtml (revision afa67798854828b1edc33dd077960ec2b18e6140)
1<?php
2
3use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
4use Fisharebest\Webtrees\Http\RequestHandlers\ModulesAllPage;
5use Fisharebest\Webtrees\I18N;
6use Fisharebest\Webtrees\Tree;
7use Illuminate\Support\Collection;
8
9/**
10 * @var Collection<Tree>     $all_trees
11 * @var string               $sitemap_url
12 * @var array<string,string> $submit_urls
13 * @var string               $title
14 */
15
16?>
17
18<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), route(ModulesAllPage::class) => I18N::translate('Modules'), $title]]) ?>
19
20<h1><?= $title ?></h1>
21
22<p>
23    <?= /* I18N: The www.sitemaps.org site is translated into many languages (e.g. http://www.sitemaps.org/fr/) - choose an appropriate URL. */ I18N::translate('Sitemaps are a way for webmasters to tell search engines about the pages on a website that are available for crawling. All major search engines support sitemaps. For more information, see <a href="http://www.sitemaps.org/">www.sitemaps.org</a>.') ?>
24</p>
25
26<p>
27    <?= /* I18N: Label for a configuration option */ I18N::translate('Which family trees should be included in the sitemaps') ?>
28</p>
29
30<form method="post" action="<?= e(route('module', ['module' => 'sitemap', 'action' => 'Admin'])) ?>">
31    <?= csrf_field() ?>
32
33    <?php foreach ($all_trees as $tree) : ?>
34        <?= view('components/checkbox', ['label' => $tree->title(), 'name' => 'sitemap' . $tree->id(), 'checked' => (bool) $tree->getPreference('include_in_sitemap')]) ?>
35    <?php endforeach ?>
36
37<button type="submit" class="btn btn-primary">
38    <?= I18N::translate('save') ?>
39</button>
40
41</form>
42
43<hr>
44
45<p>
46    <?= I18N::translate('URL') ?> — <a href="<?= e($sitemap_url) ?>"><?= e($sitemap_url) ?></a>
47</p>
48
49<p>
50    <?= I18N::translate('To tell search engines that sitemaps are available, you can use the following links.') ?>
51</p>
52
53<ul>
54    <?php foreach ($submit_urls as $search_engine => $url) : ?>
55    <li>
56        <a href="<?= e($url) ?>">
57            <?= e($search_engine) ?>
58        </a>
59    </li>
60    <?php endforeach ?>
61</ul>
62