summaryrefslogtreecommitdiff
path: root/resources/views/modules/sitemap
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@webtrees.net>2018-10-04 09:54:02 +0100
committerGreg Roach <fisharebest@webtrees.net>2018-10-04 12:18:05 +0100
commit081147b95980645ee0f905276120bd50aff10f67 (patch)
treeb7333db94426f20e974d91794ebdc706bfd697ae /resources/views/modules/sitemap
parentc00af032bcec4ac69ae67ec87ad5e38535ed522b (diff)
downloadwebtrees-081147b95980645ee0f905276120bd50aff10f67.tar.gz
webtrees-081147b95980645ee0f905276120bd50aff10f67.tar.bz2
webtrees-081147b95980645ee0f905276120bd50aff10f67.zip
Code style
Diffstat (limited to 'resources/views/modules/sitemap')
-rw-r--r--resources/views/modules/sitemap/config.php32
-rw-r--r--resources/views/modules/sitemap/sitemap-file.xml.php16
-rw-r--r--resources/views/modules/sitemap/sitemap-index.xml.php124
3 files changed, 86 insertions, 86 deletions
diff --git a/resources/views/modules/sitemap/config.php b/resources/views/modules/sitemap/config.php
index 412a1f0e9a..5f3f12e255 100644
--- a/resources/views/modules/sitemap/config.php
+++ b/resources/views/modules/sitemap/config.php
@@ -6,22 +6,22 @@
<h1><?= $title ?></h1>
<p>
- <?= /* 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>.') ?>
+ <?= /* 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>.') ?>
</p>
<p>
- <?= /* I18N: Label for a configuration option */ I18N::translate('Which family trees should be included in the sitemaps') ?>
+ <?= /* I18N: Label for a configuration option */ I18N::translate('Which family trees should be included in the sitemaps') ?>
</p>
<form action="<?= e(route('module', ['module' => 'sitemap', 'action' => 'Admin'])) ?>" method="post">
- <?= csrf_field() ?>
+ <?= csrf_field() ?>
- <?php foreach ($all_trees as $tree): ?>
- <?= Bootstrap4::checkbox($tree->getTitle(), false, ['name' => 'sitemap' . $tree->getTreeId(), 'checked' => (bool) $tree->getPreference('include_in_sitemap')]) ?>
-<?php endforeach ?>
+ <?php foreach ($all_trees as $tree) : ?>
+ <?= Bootstrap4::checkbox($tree->getTitle(), false, ['name' => 'sitemap' . $tree->getTreeId(), 'checked' => (bool) $tree->getPreference('include_in_sitemap')]) ?>
+ <?php endforeach ?>
<button type="submit" class="btn btn-primary">
- <?= I18N::translate('save') ?>
+ <?= I18N::translate('save') ?>
</button>
</form>
@@ -29,7 +29,7 @@
<hr>
<p>
- <?= I18N::translate('To tell search engines that sitemaps are available, you should add the following line to your robots.txt file.') ?>
+ <?= I18N::translate('To tell search engines that sitemaps are available, you should add the following line to your robots.txt file.') ?>
</p>
<pre>Sitemap: <?= e($sitemap_url) ?></pre>
@@ -37,15 +37,15 @@
<hr>
<p>
- <?= I18N::translate('To tell search engines that sitemaps are available, you can use the following links.') ?>
+ <?= I18N::translate('To tell search engines that sitemaps are available, you can use the following links.') ?>
</p>
<ul>
- <?php foreach ($submit_urls as $search_engine => $url): ?>
- <li>
- <a href="<?= e($url) ?>">
- <?= e($search_engine) ?>
- </a>
- </li>
- <?php endforeach ?>
+ <?php foreach ($submit_urls as $search_engine => $url) : ?>
+ <li>
+ <a href="<?= e($url) ?>">
+ <?= e($search_engine) ?>
+ </a>
+ </li>
+ <?php endforeach ?>
</ul>
diff --git a/resources/views/modules/sitemap/sitemap-file.xml.php b/resources/views/modules/sitemap/sitemap-file.xml.php
index d81137909b..451ff3cc32 100644
--- a/resources/views/modules/sitemap/sitemap-file.xml.php
+++ b/resources/views/modules/sitemap/sitemap-file.xml.php
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
- <?php foreach ($records as $record): ?>
- <url>
- <loc><?= e($record->url()) ?></loc>
- <?php if ($record->getFirstFact('CHAN') !== null): ?>
- <lastmod><?= $record->getFirstFact('CHAN')->getDate()->minimumDate()->Format('%Y-%m-%d') ?></lastmod>
- <?php endif ?>
- </url>
- <?php endforeach ?>
+ <?php foreach ($records as $record) : ?>
+ <url>
+ <loc><?= e($record->url()) ?></loc>
+ <?php if ($record->getFirstFact('CHAN') !== null) : ?>
+ <lastmod><?= $record->getFirstFact('CHAN')->getDate()->minimumDate()->Format('%Y-%m-%d') ?></lastmod>
+ <?php endif ?>
+ </url>
+ <?php endforeach ?>
</urlset>
diff --git a/resources/views/modules/sitemap/sitemap-index.xml.php b/resources/views/modules/sitemap/sitemap-index.xml.php
index 4daf2fe59c..62b5e79643 100644
--- a/resources/views/modules/sitemap/sitemap-index.xml.php
+++ b/resources/views/modules/sitemap/sitemap-index.xml.php
@@ -1,68 +1,68 @@
<?xml version="1.0" encoding="UTF-8" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
- <?php foreach ($count_individuals as $tree_id => $count): ?>
- <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i): ?>
- <sitemap>
- <loc>
- <?= e(route('module', ['module' => 'sitemap', 'action' => 'File', 'file' => $tree_id . '-i-' . $i])) ?>
- </loc>
- <lastmod>
- <?= $last_mod ?>
- </lastmod>
- </sitemap>
- <?php endfor ?>
- <?php endforeach ?>
-
- <?php foreach ($count_media as $tree_id => $count): ?>
- <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i): ?>
- <sitemap>
- <loc>
- <?= e(route('module', ['module' => 'sitemap', 'action' => 'File', 'file' => $tree_id . '-m-' . $i])) ?>
- </loc>
- <lastmod>
- <?= $last_mod ?>
- </lastmod>
- </sitemap>
- <?php endfor ?>
- <?php endforeach ?>
+ <?php foreach ($count_individuals as $tree_id => $count) : ?>
+ <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i) : ?>
+ <sitemap>
+ <loc>
+ <?= e(route('module', ['module' => 'sitemap', 'action' => 'File', 'file' => $tree_id . '-i-' . $i])) ?>
+ </loc>
+ <lastmod>
+ <?= $last_mod ?>
+ </lastmod>
+ </sitemap>
+ <?php endfor ?>
+ <?php endforeach ?>
+
+ <?php foreach ($count_media as $tree_id => $count) : ?>
+ <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i) : ?>
+ <sitemap>
+ <loc>
+ <?= e(route('module', ['module' => 'sitemap', 'action' => 'File', 'file' => $tree_id . '-m-' . $i])) ?>
+ </loc>
+ <lastmod>
+ <?= $last_mod ?>
+ </lastmod>
+ </sitemap>
+ <?php endfor ?>
+ <?php endforeach ?>
- <?php foreach ($count_notes as $tree_id => $count): ?>
- <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i): ?>
- <sitemap>
- <loc>
- <?= e(route('module', ['module' => 'sitemap', 'action' => 'File', 'file' => $tree_id . '-i-' . $i])) ?>
- </loc>
- <lastmod>
- <?= $last_mod ?>
- </lastmod>
- </sitemap>
- <?php endfor ?>
- <?php endforeach ?>
-
- <?php foreach ($count_repositories as $tree_id => $count): ?>
- <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i): ?>
- <sitemap>
- <loc>
- <?= e(route('module', ['module' => 'sitemap', 'action' => 'File', 'file' => $tree_id . '-r-' . $i])) ?>
- </loc>
- <lastmod>
- <?= $last_mod ?>
- </lastmod>
- </sitemap>
- <?php endfor ?>
- <?php endforeach ?>
+ <?php foreach ($count_notes as $tree_id => $count) : ?>
+ <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i) : ?>
+ <sitemap>
+ <loc>
+ <?= e(route('module', ['module' => 'sitemap', 'action' => 'File', 'file' => $tree_id . '-i-' . $i])) ?>
+ </loc>
+ <lastmod>
+ <?= $last_mod ?>
+ </lastmod>
+ </sitemap>
+ <?php endfor ?>
+ <?php endforeach ?>
+
+ <?php foreach ($count_repositories as $tree_id => $count) : ?>
+ <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i) : ?>
+ <sitemap>
+ <loc>
+ <?= e(route('module', ['module' => 'sitemap', 'action' => 'File', 'file' => $tree_id . '-r-' . $i])) ?>
+ </loc>
+ <lastmod>
+ <?= $last_mod ?>
+ </lastmod>
+ </sitemap>
+ <?php endfor ?>
+ <?php endforeach ?>
- <?php foreach ($count_sources as $tree_id => $count): ?>
- <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i): ?>
- <sitemap>
- <loc>
- <?= e(route('module', ['module' => 'sitemap', 'action' => 'File', 'file' => $tree_id . '-s-' . $i])) ?>
- </loc>
- <lastmod>
- <?= $last_mod ?>
- </lastmod>
- </sitemap>
- <?php endfor ?>
- <?php endforeach ?>
+ <?php foreach ($count_sources as $tree_id => $count) : ?>
+ <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i) : ?>
+ <sitemap>
+ <loc>
+ <?= e(route('module', ['module' => 'sitemap', 'action' => 'File', 'file' => $tree_id . '-s-' . $i])) ?>
+ </loc>
+ <lastmod>
+ <?= $last_mod ?>
+ </lastmod>
+ </sitemap>
+ <?php endfor ?>
+ <?php endforeach ?>
</sitemapindex>