summaryrefslogtreecommitdiff
path: root/resources/views
diff options
context:
space:
mode:
Diffstat (limited to 'resources/views')
-rw-r--r--resources/views/admin/control-panel-manager.phtml5
-rw-r--r--resources/views/admin/control-panel.phtml5
-rw-r--r--resources/views/admin/locations.phtml4
-rw-r--r--resources/views/admin/map-provider.phtml1
-rw-r--r--resources/views/calendar-page.phtml1
-rw-r--r--resources/views/cards/add-source-citation.phtml11
-rw-r--r--resources/views/edit/new-individual.phtml13
-rw-r--r--resources/views/edit/reorder-children.phtml7
-rw-r--r--resources/views/edit/reorder-media.phtml2
-rw-r--r--resources/views/edit/reorder-names.phtml2
-rw-r--r--resources/views/edit/reorder-spouses.phtml7
-rw-r--r--resources/views/individual-page-menu.phtml2
-rw-r--r--resources/views/individual-page.phtml2
-rw-r--r--resources/views/interactive-tree-chart.phtml2
-rw-r--r--resources/views/interactive-tree-page.phtml4
-rw-r--r--resources/views/layouts/administration.phtml12
-rw-r--r--resources/views/layouts/default.phtml11
-rw-r--r--resources/views/layouts/offline.phtml4
-rw-r--r--resources/views/lifespans-chart.phtml4
-rw-r--r--resources/views/lists/families-table.phtml7
-rw-r--r--resources/views/modules/ckeditor/ckeditor-js.phtml7
-rw-r--r--resources/views/modules/relatives/family.phtml11
22 files changed, 69 insertions, 55 deletions
diff --git a/resources/views/admin/control-panel-manager.phtml b/resources/views/admin/control-panel-manager.phtml
index d8c17e6e44..576e643a3f 100644
--- a/resources/views/admin/control-panel-manager.phtml
+++ b/resources/views/admin/control-panel-manager.phtml
@@ -1,4 +1,5 @@
<?php use Fisharebest\Webtrees\I18N; ?>
+<?php use Fisharebest\Webtrees\Webtrees; ?>
<h1><?= $title ?></h1>
@@ -6,9 +7,9 @@
<div class="card mb-4">
<div class="card-header">
<h2 class="mb-0">
- <?= WT_WEBTREES ?>
+ <?= e(Webtrees::NAME) ?>
<span class="badge badge-secondary">
- <?= WT_VERSION ?>
+ <?= e(Webtrees::VERSION) ?>
</span>
</h2>
</div>
diff --git a/resources/views/admin/control-panel.phtml b/resources/views/admin/control-panel.phtml
index 255cf7de26..83b4101732 100644
--- a/resources/views/admin/control-panel.phtml
+++ b/resources/views/admin/control-panel.phtml
@@ -1,4 +1,5 @@
<?php use Fisharebest\Webtrees\I18N; ?>
+<?php use Fisharebest\Webtrees\Webtrees; ?>
<h1><?= $title ?></h1>
@@ -8,7 +9,7 @@
<h2 class="mb-0">
<?= I18N::translate('Website') ?>
<span class="badge badge-secondary">
- <?= WT_VERSION ?>
+ <?= e(Webtrees::VERSION) ?>
</span>
</h2>
</div>
@@ -24,7 +25,7 @@
<p class="card-text ">
<?php if ($latest_version === '') : ?>
<?= I18N::translate('No upgrade information is available.') ?>
- <?php elseif (version_compare(WT_VERSION, $latest_version) < 0) : ?>
+ <?php elseif (version_compare(Webtrees::VERSION, $latest_version) < 0) : ?>
<?= I18N::translate('A new version of webtrees is available.') ?>
<a href="<?= e(route('upgrade')) ?>" class="error">
<?= /* I18N: %s is a version number */
diff --git a/resources/views/admin/locations.phtml b/resources/views/admin/locations.phtml
index 23ae0916b0..48b367d6cf 100644
--- a/resources/views/admin/locations.phtml
+++ b/resources/views/admin/locations.phtml
@@ -41,8 +41,8 @@
<?= $place->pl_long === null ? FontAwesome::decorativeIcon('warning') : $place->pl_zoom ?>
</td>
<td>
- <?php if (is_file(WT_MODULES_DIR . 'openstreetmap' . '/' . $place->pl_icon)) : ?>
- <img src="<?= e(WT_MODULES_DIR . 'openstreetmap' . '/' . $place->pl_icon) ?>" width="25" height="15" alt="<?= I18N::translate("Flag of %s", $place->pl_place) ?>">
+ <?php if (is_file(Webtrees::MODULES_PATH . 'openstreetmap/' . $place->pl_icon)) : ?>
+ <img src="<?= e(Webtrees::MODULES_PATH . 'openstreetmap/' . $place->pl_icon) ?>" width="25" height="15" alt="<?= I18N::translate("Flag of %s", $place->pl_place) ?>">
<?php endif ?>
</td>
<td>
diff --git a/resources/views/admin/map-provider.phtml b/resources/views/admin/map-provider.phtml
index dd67a592c2..2fd34b0f27 100644
--- a/resources/views/admin/map-provider.phtml
+++ b/resources/views/admin/map-provider.phtml
@@ -1,4 +1,3 @@
-<?php use Fisharebest\Webtrees\Bootstrap4; ?>
<?php use Fisharebest\Webtrees\I18N; ?>
<?= view('components/breadcrumbs', ['links' => [route('admin-control-panel') => I18N::translate('Control panel'), $title]]) ?>
diff --git a/resources/views/calendar-page.phtml b/resources/views/calendar-page.phtml
index 304079b680..ff3aff8410 100644
--- a/resources/views/calendar-page.phtml
+++ b/resources/views/calendar-page.phtml
@@ -1,6 +1,5 @@
<?php use Fisharebest\Webtrees\Auth; ?>
<?php use Fisharebest\Webtrees\Date; ?>
-<?php use Fisharebest\Webtrees\Date\JewishDate; ?>
<?php use Fisharebest\Webtrees\Functions\FunctionsPrint; ?>
<?php use Fisharebest\Webtrees\I18N; ?>
diff --git a/resources/views/cards/add-source-citation.phtml b/resources/views/cards/add-source-citation.phtml
index 6481f36e47..d3fdab1a37 100644
--- a/resources/views/cards/add-source-citation.phtml
+++ b/resources/views/cards/add-source-citation.phtml
@@ -1,3 +1,4 @@
+<?php use Fisharebest\Webtrees\Gedcom; ?>
<?php use Fisharebest\Webtrees\GedcomTag; ?>
<?php use Fisharebest\Webtrees\Functions\FunctionsEdit; ?>
<?php use Fisharebest\Webtrees\I18N; ?>
@@ -21,9 +22,9 @@
<input type="checkbox" name="SOUR_INDI" <?= $prefer_level2_sources === '2' ? 'checked' : '' ?> value="1">
<?= I18N::translate('Individual') ?>
</label>
- <?php if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $quick_required_facts, $matches)) : ?>
+ <?php if (preg_match_all('/(' . Gedcom::REGEX_TAG . ')/', $quick_required_facts, $matches)) : ?>
<?php foreach ($matches[1] as $match) : ?>
- <?php if (!in_array($match, explode('|', WT_EVENTS_DEAT))) : ?>
+ <?php if (!in_array($match, Gedcom::DEATH_EVENTS)) : ?>
<label>
<input type="checkbox" name="SOUR_<?= $match ?>" <?= $prefer_level2_sources === '1' ? 'checked' : '' ?> value="1">
<?= GedcomTag::getLabel($match) ?>
@@ -34,9 +35,9 @@
<?php endif ?>
<?php if (strpos($bdm, 'D') !== false) : ?>
- <?php if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $quick_required_facts, $matches)) : ?>
+ <?php if (preg_match_all('/(' . Gedcom::REGEX_TAG . ')/', $quick_required_facts, $matches)) : ?>
<?php foreach ($matches[1] as $match) : ?>
- <?php if (in_array($match, explode('|', WT_EVENTS_DEAT))) : ?>
+ <?php if (in_array($match,Gedcom::DEATH_EVENTS)) : ?>
<label>
<input type="checkbox" name="SOUR_<?= $match ?>" <?= $prefer_level2_sources === '1' ? 'checked' : '' ?> value="1">
<?= GedcomTag::getLabel($match) ?>
@@ -51,7 +52,7 @@
<input type="checkbox" name="SOUR_FAM" <?= $prefer_level2_sources === '2' ? 'checked' : '' ?> value="1">
<?= I18N::translate('Family') ?>
</label>
- <?php if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $quick_required_famfacts, $matches)) : ?>
+ <?php if (preg_match_all('/(' . Gedcom::REGEX_TAG . ')/', $quick_required_famfacts, $matches)) : ?>
<?php foreach ($matches[1] as $match) : ?>
<label>
<input type="checkbox" name="SOUR_<?= $match ?>" <?= $prefer_level2_sources === '1' ? 'checked' : '' ?> value="1">
diff --git a/resources/views/edit/new-individual.phtml b/resources/views/edit/new-individual.phtml
index c67d8451a3..4f5aea2a4b 100644
--- a/resources/views/edit/new-individual.phtml
+++ b/resources/views/edit/new-individual.phtml
@@ -3,6 +3,7 @@
<?php use Fisharebest\Webtrees\Fact; ?>
<?php use Fisharebest\Webtrees\FontAwesome; ?>
<?php use Fisharebest\Webtrees\Functions\FunctionsEdit; ?>
+<?php use Fisharebest\Webtrees\Gedcom; ?>
<?php use Fisharebest\Webtrees\GedcomTag; ?>
<?php use Fisharebest\Webtrees\I18N; ?>
<?php use Fisharebest\Webtrees\SurnameTradition; ?>
@@ -154,7 +155,7 @@ $bdm = ''; // used to copy '1 SOUR' to '2 SOUR' for BIRT DEAT MARR
} else {
$adv_name_fields = [];
}
- if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $tree->getPreference('ADVANCED_NAME_FACTS'), $match)) {
+ if (preg_match_all('/(' . Gedcom::REGEX_TAG . ')/', $tree->getPreference('ADVANCED_NAME_FACTS'), $match)) {
foreach ($match[1] as $tag) {
// Ignore advanced facts that duplicate standard facts
if (!in_array($tag, ['TYPE', 'NPFX', 'GIVN', 'NICK', 'SPFX', 'SURN', 'NSFX'])) {
@@ -242,9 +243,9 @@ $bdm = ''; // used to copy '1 SOUR' to '2 SOUR' for BIRT DEAT MARR
echo FunctionsEdit::addSimpleTag($tree, '0 SEX U');
}
$bdm = 'BD';
- if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $tree->getPreference('QUICK_REQUIRED_FACTS'), $matches)) {
+ if (preg_match_all('/(' . Gedcom::REGEX_TAG . ')/', $tree->getPreference('QUICK_REQUIRED_FACTS'), $matches)) {
foreach ($matches[1] as $match) {
- if (!in_array($match, explode('|', WT_EVENTS_DEAT))) {
+ if (!in_array($match, Gedcom::DEATH_EVENTS)) {
FunctionsEdit::addSimpleTags($tree, $match);
}
}
@@ -252,15 +253,15 @@ $bdm = ''; // used to copy '1 SOUR' to '2 SOUR' for BIRT DEAT MARR
//-- if adding a spouse add the option to add a marriage fact to the new family
if ($nextaction === 'add_spouse_to_individual_action' || $nextaction === 'add_spouse_to_family_action') {
$bdm .= 'M';
- if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $tree->getPreference('QUICK_REQUIRED_FAMFACTS'), $matches)) {
+ if (preg_match_all('/(' . Gedcom::REGEX_TAG . ')/', $tree->getPreference('QUICK_REQUIRED_FAMFACTS'), $matches)) {
foreach ($matches[1] as $match) {
FunctionsEdit::addSimpleTags($tree, $match);
}
}
}
- if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $tree->getPreference('QUICK_REQUIRED_FACTS'), $matches)) {
+ if (preg_match_all('/(' . Gedcom::REGEX_TAG . ')/', $tree->getPreference('QUICK_REQUIRED_FACTS'), $matches)) {
foreach ($matches[1] as $match) {
- if (in_array($match, explode('|', WT_EVENTS_DEAT))) {
+ if (in_array($match, Gedcom::DEATH_EVENTS)) {
FunctionsEdit::addSimpleTags($tree, $match);
}
}
diff --git a/resources/views/edit/reorder-children.phtml b/resources/views/edit/reorder-children.phtml
index 5a9daebcad..770c676cf8 100644
--- a/resources/views/edit/reorder-children.phtml
+++ b/resources/views/edit/reorder-children.phtml
@@ -1,4 +1,5 @@
<?php use Fisharebest\Webtrees\FontAwesome; ?>
+<?php use Fisharebest\Webtrees\Gedcom; ?>
<?php use Fisharebest\Webtrees\I18N; ?>
<?php use Fisharebest\Webtrees\View; ?>
@@ -7,7 +8,7 @@
<form class="wt-page-content" method="post">
<?= csrf_field() ?>
<div class="wt-sortable-list">
- <?php foreach ($family->facts('CHIL') as $fact) : ?>
+ <?php foreach ($family->facts(['CHIL']) as $fact) : ?>
<div class="card mb-2 wt-sortable-item" data-sortbydate="<?= $fact->target()->getBirthDate()->julianDay() ?>">
<input type="hidden" name="order[]" value="<?= $fact->id() ?>">
<h3 class="card-header">
@@ -15,8 +16,8 @@
<?= $fact->target()->getFullName() ?>
</h3>
<div class="card-body">
- <?= $fact->target()->formatFirstMajorFact(WT_EVENTS_BIRT, 2) ?>
- <?= $fact->target()->formatFirstMajorFact(WT_EVENTS_DEAT, 2) ?>
+ <?= $fact->target()->formatFirstMajorFact(Gedcom::BIRTH_EVENTS, 2) ?>
+ <?= $fact->target()->formatFirstMajorFact(Gedcom::DEATH_EVENTS, 2) ?>
</div>
</div>
<?php endforeach ?>
diff --git a/resources/views/edit/reorder-media.phtml b/resources/views/edit/reorder-media.phtml
index 4fa5b40f45..47d85bed15 100644
--- a/resources/views/edit/reorder-media.phtml
+++ b/resources/views/edit/reorder-media.phtml
@@ -7,7 +7,7 @@
<form class="wt-page-content" method="post">
<?= csrf_field() ?>
<div class="wt-sortable-list">
- <?php foreach ($individual->facts('OBJE') as $fact) : ?>
+ <?php foreach ($individual->facts(['OBJE']) as $fact) : ?>
<div class="card mb-2 wt-sortable-item">
<input type="hidden" name="order[]" value="<?= $fact->id() ?>">
<h3 class="card-header">
diff --git a/resources/views/edit/reorder-names.phtml b/resources/views/edit/reorder-names.phtml
index d30598a3d6..e89def516d 100644
--- a/resources/views/edit/reorder-names.phtml
+++ b/resources/views/edit/reorder-names.phtml
@@ -9,7 +9,7 @@
<form class="wt-page-content" method="post">
<?= csrf_field() ?>
<div class="wt-sortable-list">
- <?php foreach ($individual->facts('NAME') as $fact) : ?>
+ <?php foreach ($individual->facts(['NAME']) as $fact) : ?>
<div class="card mb-2 wt-sortable-item">
<input type="hidden" name="order[]" value="<?= $fact->id() ?>">
<h3 class="card-header">
diff --git a/resources/views/edit/reorder-spouses.phtml b/resources/views/edit/reorder-spouses.phtml
index 4f081b7e90..0a46253bca 100644
--- a/resources/views/edit/reorder-spouses.phtml
+++ b/resources/views/edit/reorder-spouses.phtml
@@ -1,4 +1,5 @@
<?php use Fisharebest\Webtrees\FontAwesome; ?>
+<?php use Fisharebest\Webtrees\Gedcom; ?>
<?php use Fisharebest\Webtrees\I18N; ?>
<?php use Fisharebest\Webtrees\View; ?>
@@ -7,7 +8,7 @@
<form class="wt-page-content" method="post">
<?= csrf_field() ?>
<div class="wt-sortable-list">
- <?php foreach ($individual->facts('FAMS') as $fact) : ?>
+ <?php foreach ($individual->facts(['FAMS']) as $fact) : ?>
<div class="card mb-2 wt-sortable-item" data-sortbydate="<?= $fact->target()->getMarriageDate()->julianDay() ?>">
<input type="hidden" name="order[]" value="<?= $fact->id() ?>">
<h3 class="card-header">
@@ -15,8 +16,8 @@
<?= $fact->target()->getFullName() ?>
</h3>
<div class="card-body">
- <?= $fact->target()->formatFirstMajorFact(WT_EVENTS_MARR, 2) ?>
- <?= $fact->target()->formatFirstMajorFact(WT_EVENTS_DIV, 2) ?>
+ <?= $fact->target()->formatFirstMajorFact(Gedcom::MARRIAGE_EVENTS, 2) ?>
+ <?= $fact->target()->formatFirstMajorFact(Gedcom::DIVORCE_EVENTS, 2) ?>
</div>
</div>
<?php endforeach ?>
diff --git a/resources/views/individual-page-menu.phtml b/resources/views/individual-page-menu.phtml
index d0a633b8f0..24da84a7b2 100644
--- a/resources/views/individual-page-menu.phtml
+++ b/resources/views/individual-page-menu.phtml
@@ -25,7 +25,7 @@
</a>
<?php endif ?>
- <?php if (empty($individual->facts('SEX'))) : ?>
+ <?php if (empty($individual->facts(['SEX']))) : ?>
<a class="dropdown-item menu-indi-editraw" href="<?= e(route('add-fact', ['fact' => 'SEX', 'ged' => $individual->tree()->name(), 'xref' => $individual->xref()])) ?>">
<?= I18N::translate('Edit the gender') ?>
</a>
diff --git a/resources/views/individual-page.phtml b/resources/views/individual-page.phtml
index 9741697ab0..58abb9ff0b 100644
--- a/resources/views/individual-page.phtml
+++ b/resources/views/individual-page.phtml
@@ -63,7 +63,7 @@
<?php endif ?>
<?php if (Auth::isEditor($individual->tree())) : ?>
- <?php if (count($individual->facts('OBJE')) > 1) : ?>
+ <?php if (count($individual->facts(['OBJE'])) > 1) : ?>
<div>
<a href="<?= e(route('reorder-media', ['ged' => $individual->tree()->name(), 'xref' => $individual->xref()])) ?>">
<?= I18N::translate('Re-order media') ?>
diff --git a/resources/views/interactive-tree-chart.phtml b/resources/views/interactive-tree-chart.phtml
index 3e40423352..8ff02b4a67 100644
--- a/resources/views/interactive-tree-chart.phtml
+++ b/resources/views/interactive-tree-chart.phtml
@@ -4,7 +4,7 @@
<div id="tv_tools">
<ul>
<li id="tvbCompact" class="tv_button">
- <img src="<?= WT_MODULES_DIR ?>tree/images/compact.png" alt="<?= I18N::translate('Use compact layout') ?>" title="<?= I18N::translate('Use compact layout') ?>">
+ <img src="<?= Webtrees::MODULES_PATH ?>tree/images/compact.png" alt="<?= I18N::translate('Use compact layout') ?>" title="<?= I18N::translate('Use compact layout') ?>">
</li>
<li class="tv_button" id="<?= $name ?>_loading">
<i class="icon-loading-small"></i>
diff --git a/resources/views/interactive-tree-page.phtml b/resources/views/interactive-tree-page.phtml
index 3b64b148b2..3b8cfa0e9d 100644
--- a/resources/views/interactive-tree-page.phtml
+++ b/resources/views/interactive-tree-page.phtml
@@ -35,12 +35,12 @@
</div>
<?php View::push('javascript') ?>
-<script src="<?= e(WT_MODULES_DIR) ?>tree/js/treeview.js"></script>
+<script src="<?= e(Webtrees::MODULES_PATH) ?>tree/js/treeview.js"></script>
<script>
<?= $js ?>
</script>
<?php View::endpush() ?>
<?php View::push('styles') ?>
-<link rel="stylesheet" type="text/css" href="<?= e(WT_MODULES_DIR) ?>tree/css/treeview.css">
+<link rel="stylesheet" type="text/css" href="<?= e(Webtrees::MODULES_PATH) ?>tree/css/treeview.css">
<?php View::endpush() ?>
diff --git a/resources/views/layouts/administration.phtml b/resources/views/layouts/administration.phtml
index 16eac9c28a..e575d3be5e 100644
--- a/resources/views/layouts/administration.phtml
+++ b/resources/views/layouts/administration.phtml
@@ -2,6 +2,8 @@
<?php use Fisharebest\Webtrees\FlashMessages; ?>
<?php use Fisharebest\Webtrees\I18N; ?>
<?php use Fisharebest\Webtrees\View; ?>
+<?php use Fisharebest\Webtrees\Webtrees; ?>
+
<!DOCTYPE html>
<html <?= I18N::htmlAttributes() ?>>
<head>
@@ -14,11 +16,11 @@
<link rel="icon" href="favicon.ico" type="image/x-icon">
<?php if (I18N::direction() === 'rtl') : ?>
- <link rel="stylesheet" type="text/css" href="<?= e(WT_ASSETS_URL . 'css/vendor-rtl.css') ?>">
+ <link rel="stylesheet" type="text/css" href="<?= e(Webtrees::ASSETS_PATH . 'css/vendor-rtl.css') ?>">
<?php else : ?>
- <link rel="stylesheet" type="text/css" href="<?= e(WT_ASSETS_URL . 'css/vendor.css') ?>">
+ <link rel="stylesheet" type="text/css" href="<?= e(Webtrees::ASSETS_PATH . 'css/vendor.css') ?>">
<?php endif ?>
- <link rel="stylesheet" type="text/css" href="<?= e(WT_ASSETS_URL . 'css/administration.css') ?>">
+ <link rel="stylesheet" type="text/css" href="<?= e(Webtrees::ASSETS_PATH . 'css/administration.css') ?>">
<?= View::stack('styles') ?>
@@ -65,8 +67,8 @@
<?= $content ?>
- <script src="<?= e(WT_ASSETS_URL . 'js/vendor.js') ?>?<?= filemtime(WT_ROOT . WT_ASSETS_URL . 'js/vendor.js') ?>"></script>
- <script src="<?= e(WT_ASSETS_URL . 'js/webtrees.js') ?>?<?= filemtime(WT_ROOT . WT_ASSETS_URL . 'js/webtrees.js') ?>"></script>
+ <script src="<?= e(Webtrees::ASSETS_PATH . 'js/vendor.js') ?>?<?= filemtime(WT_ROOT . Webtrees::ASSETS_PATH . 'js/vendor.js') ?>"></script>
+ <script src="<?= e(Webtrees::ASSETS_PATH . 'js/webtrees.js') ?>?<?= filemtime(WT_ROOT . Webtrees::ASSETS_PATH . 'js/webtrees.js') ?>"></script>
<?= View::stack('javascript') ?>
diff --git a/resources/views/layouts/default.phtml b/resources/views/layouts/default.phtml
index 16ad7830ff..cf7c8605a7 100644
--- a/resources/views/layouts/default.phtml
+++ b/resources/views/layouts/default.phtml
@@ -4,6 +4,7 @@
<?php use Fisharebest\Webtrees\I18N; ?>
<?php use Fisharebest\Webtrees\Theme; ?>
<?php use Fisharebest\Webtrees\View; ?>
+<?php use Fisharebest\Webtrees\Webtrees; ?>
<!DOCTYPE html>
<html <?= I18N::htmlAttributes() ?>>
@@ -12,7 +13,7 @@
<meta name="csrf" content="<?= e(csrf_token()) ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="<?= e($meta_robots ?? 'noindex,nofollow') ?>">
- <meta name="generator" content="<?= e(WT_WEBTREES) ?>">
+ <meta name="generator" content="<?= e(Webtrees::NAME) ?> <?= e(Webtrees::VERSION) ?>">
<?php if ($tree !== null) : ?>
<meta name="description" content="<?= e($tree->getPreference('META_DESCRIPTION')) ?>">
<?php endif ?>
@@ -29,9 +30,9 @@
<link rel="apple-touch-icon" sizes="180x180" href="<?= Theme::theme()::ASSET_DIR ?>favicon180.png">
<?php if (I18N::direction() === 'rtl') : ?>
- <link rel="stylesheet" type="text/css" href="<?= e(WT_ASSETS_URL . 'css/vendor-rtl.css') ?>">
+ <link rel="stylesheet" type="text/css" href="<?= e(Webtrees::ASSETS_PATH . 'css/vendor-rtl.css') ?>">
<?php else : ?>
- <link rel="stylesheet" type="text/css" href="<?= e(WT_ASSETS_URL . 'css/vendor.css') ?>">
+ <link rel="stylesheet" type="text/css" href="<?= e(Webtrees::ASSETS_PATH . 'css/vendor.css') ?>">
<?php endif ?>
<?php foreach (Theme::theme()->stylesheets() as $stylesheet) : ?>
@@ -134,8 +135,8 @@
</div>
</footer>
- <script src="<?= e(WT_ASSETS_URL . 'js/vendor.js') ?>?<?= filemtime(WT_ROOT . WT_ASSETS_URL . 'js/vendor.js') ?>"></script>
- <script src="<?= e(WT_ASSETS_URL . 'js/webtrees.js') ?>?<?= filemtime(WT_ROOT . WT_ASSETS_URL . 'js/webtrees.js') ?>"></script>
+ <script src="<?= e(Webtrees::ASSETS_PATH . 'js/vendor.js') ?>?<?= filemtime(WT_ROOT . Webtrees::ASSETS_PATH . 'js/vendor.js') ?>"></script>
+ <script src="<?= e(Webtrees::ASSETS_PATH . 'js/webtrees.js') ?>?<?= filemtime(WT_ROOT . Webtrees::ASSETS_PATH . 'js/webtrees.js') ?>"></script>
<script>
activate_colorbox();
diff --git a/resources/views/layouts/offline.phtml b/resources/views/layouts/offline.phtml
index fa54aa3a96..8eda08ede3 100644
--- a/resources/views/layouts/offline.phtml
+++ b/resources/views/layouts/offline.phtml
@@ -1,11 +1,13 @@
<?php use Fisharebest\Webtrees\I18N; ?>
+<?php use Fisharebest\Webtrees\Webtrees; ?>
+
<!DOCTYPE html>
<html <?= I18N::htmlAttributes() ?>>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
- <title><?= WT_WEBTREES ?></title>
+ <title><?= e(Webtrees::NAME) ?></title>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<style type="text/css">
diff --git a/resources/views/lifespans-chart.phtml b/resources/views/lifespans-chart.phtml
index 370ffeec0f..974f223c93 100644
--- a/resources/views/lifespans-chart.phtml
+++ b/resources/views/lifespans-chart.phtml
@@ -1,3 +1,5 @@
+<?php use Fisharebest\Webtrees\Gedcom; ?>
+
<p class="wt-lifespans-subtitle">
<?= $subtitle ?>
</p>
@@ -22,7 +24,7 @@
<?= $lifespan->individual->getFullName() ?>
</a>
- <?php foreach ($lifespan->individual->facts(WT_EVENTS_BIRT . '|' . WT_EVENTS_DEAT, true) as $fact) : ?>
+ <?php foreach ($lifespan->individual->facts(array_merge(Gedcom::BIRTH_EVENTS, Gedcom::DEATH_EVENTS), true) as $fact) : ?>
<?= $fact->summary() ?>
<?php endforeach ?>
</div>
diff --git a/resources/views/lists/families-table.phtml b/resources/views/lists/families-table.phtml
index 8327b4a216..4a4f6ab052 100644
--- a/resources/views/lists/families-table.phtml
+++ b/resources/views/lists/families-table.phtml
@@ -1,4 +1,5 @@
<?php use Fisharebest\Webtrees\Date; ?>
+<?php use Fisharebest\Webtrees\Gedcom; ?>
<?php use Fisharebest\Webtrees\GedcomTag; ?>
<?php use Fisharebest\Webtrees\I18N; ?>
<?php use Fisharebest\Webtrees\Individual; ?>
@@ -305,9 +306,9 @@ for ($year = 1550; $year < 2030; $year += 10) {
<?php if ($marriage_dates[0]->gregorianYear() >= 1550 && $marriage_dates[0]->gregorianYear() < 2030) : ?>
<?php $marr_by_decade[(int) ($marriage_dates[0]->gregorianYear() / 10) * 10] .= $husb->getSex() . $wife->getSex() ?>
<?php endif ?>
- <?php elseif ($family->facts('_NMR')) : ?>
+ <?php elseif ($family->facts(['_NMR'])) : ?>
<?= I18N::translate('no') ?>
- <?php elseif ($family->facts('MARR')) : ?>
+ <?php elseif ($family->facts(['MARR'])) : ?>
<?= I18N::translate('yes') ?>
<?php endif ?>
</td>
@@ -346,7 +347,7 @@ for ($year = 1550; $year < 2030; $year += 10) {
<?php else : ?>
YES
<?php endif ?>
- <?php if ($family->facts(WT_EVENTS_DIV)) : ?>
+ <?php if ($family->facts(Gedcom::DIVORCE_EVENTS)) : ?>
D
<?php endif ?>
<?php if (count($husb->getSpouseFamilies()) > 1 || count($wife->getSpouseFamilies()) > 1) : ?>
diff --git a/resources/views/modules/ckeditor/ckeditor-js.phtml b/resources/views/modules/ckeditor/ckeditor-js.phtml
index 30a7bf8118..46bb3d9156 100644
--- a/resources/views/modules/ckeditor/ckeditor-js.phtml
+++ b/resources/views/modules/ckeditor/ckeditor-js.phtml
@@ -1,13 +1,14 @@
<?php use Fisharebest\Webtrees\Module; ?>
<?php use Fisharebest\Webtrees\View; ?>
+<?php use Fisharebest\Webtrees\Webtrees; ?>
<?php if (Module::getModuleByName('ckeditor')) : ?>
<?php View::push('javascript') ?>
- <script src="<?= e(WT_CKEDITOR_BASE_URL) ?>ckeditor.js"></script>
- <script src="<?= e(WT_CKEDITOR_BASE_URL) ?>adapters/jquery.js"></script>
+ <script src="<?= e(Webtrees::CKEDITOR_PATH) ?>ckeditor.js"></script>
+ <script src="<?= e(Webtrees::CKEDITOR_PATH) ?>adapters/jquery.js"></script>
<script>
- var CKEDITOR_BASEPATH = <?= json_encode(WT_CKEDITOR_BASE_URL) ?>;
+ var CKEDITOR_BASEPATH = <?= json_encode(Webtrees::CKEDITOR_PATH) ?>;
// Enable for all browsers
CKEDITOR.env.isCompatible = true;
diff --git a/resources/views/modules/relatives/family.phtml b/resources/views/modules/relatives/family.phtml
index 0c8c20348d..f5a1a85456 100644
--- a/resources/views/modules/relatives/family.phtml
+++ b/resources/views/modules/relatives/family.phtml
@@ -1,5 +1,6 @@
<?php use Fisharebest\Webtrees\Date; ?>
<?php use Fisharebest\Webtrees\Functions\Functions; ?>
+<?php use Fisharebest\Webtrees\Gedcom; ?>
<?php use Fisharebest\Webtrees\GedcomTag; ?>
<?php use Fisharebest\Webtrees\I18N; ?>
<?php use Fisharebest\Webtrees\Individual; ?>
@@ -14,7 +15,7 @@
<tbody>
<?php
$found = false;
- foreach ($family->facts('HUSB', false, $fam_access_level) as $fact) {
+ foreach ($family->facts(['HUSB'], false, $fam_access_level) as $fact) {
$found |= !$fact->isPendingDeletion();
$person = $fact->target();
if ($person instanceof Individual) {
@@ -51,7 +52,7 @@
}
$found = false;
- foreach ($family->facts('WIFE', false, $fam_access_level) as $fact) {
+ foreach ($family->facts(['WIFE'], false, $fam_access_level) as $fact) {
$person = $fact->target();
if ($person instanceof Individual) {
$found |= !$fact->isPendingDeletion();
@@ -91,7 +92,7 @@
///// MARR /////
$found = false;
$prev = new Date('');
- foreach ($family->facts(WT_EVENTS_MARR . '|' . WT_EVENTS_DIV, true) as $fact) {
+ foreach ($family->facts(array_merge(Gedcom::MARRIAGE_EVENTS, Gedcom::DIVORCE_EVENTS), true) as $fact) {
$found |= !$fact->isPendingDeletion();
if ($fact->isPendingAddition()) {
$row_class = 'new';
@@ -132,7 +133,7 @@
///// CHIL /////
$child_number = 0;
- foreach ($family->facts('CHIL', false, $fam_access_level) as $fact) {
+ foreach ($family->facts(['CHIL'], false, $fam_access_level) as $fact) {
$person = $fact->target();
if ($person instanceof Individual) {
$row_class = 'wt-gender-' . $person->getSex();
@@ -145,7 +146,7 @@
$child_number++;
}
$next = new Date('');
- foreach ($person->facts(WT_EVENTS_BIRT, true) as $bfact) {
+ foreach ($person->facts(Gedcom::BIRTH_EVENTS, true) as $bfact) {
if ($bfact->date()->isOK()) {
$next = $bfact->date();
break;