From a72fff1f807db9023f85dd75becda475ba93c2f0 Mon Sep 17 00:00:00 2001 From: Greg Roach Date: Mon, 2 May 2022 13:39:12 +0100 Subject: Consistent names for views --- resources/views/individual-name.phtml | 96 ----------------------------- resources/views/individual-page-name.phtml | 96 +++++++++++++++++++++++++++++ resources/views/individual-page-names.phtml | 4 +- resources/views/individual-page-sex.phtml | 48 +++++++++++++++ resources/views/individual-sex.phtml | 48 --------------- 5 files changed, 146 insertions(+), 146 deletions(-) delete mode 100644 resources/views/individual-name.phtml create mode 100644 resources/views/individual-page-name.phtml create mode 100644 resources/views/individual-page-sex.phtml delete mode 100644 resources/views/individual-sex.phtml (limited to 'resources') diff --git a/resources/views/individual-name.phtml b/resources/views/individual-name.phtml deleted file mode 100644 index 4245ddcd74..0000000000 --- a/resources/views/individual-name.phtml +++ /dev/null @@ -1,96 +0,0 @@ -record(); -$tree = $individual->tree(); - -// Create a fake record, so we can extract the formatted NAME value from it. -$fake_individual = Registry::individualFactory()->new( - 'xref', - "0 @xref@ INDI\n1 DEAT Y\n" . $fact->gedcom(), - null, - $tree -); -$fake_individual->setPrimaryName(0); // Make sure we use the name from "1 NAME" - -$container_class = ''; - -if ($fact->isPendingDeletion()) { - $container_class = 'wt-old'; -} elseif ($fact->isPendingAddition()) { - $container_class = 'wt-new'; -} - -?> -
-
- -
- -
-
-
-
-
value()) ?>
- - gedcom(), $matches, PREG_SET_ORDER) ?> - $match) : ?> - - make($fact->tag() . ':' . $tag) ?> - -
- label() ?> -
-
- value($value, $fact->record()->tree()) ?> -
- - -
- - $fact]) ?> - $fact]) ?> - - canEdit()) : ?> - - -
-
-
diff --git a/resources/views/individual-page-name.phtml b/resources/views/individual-page-name.phtml new file mode 100644 index 0000000000..4245ddcd74 --- /dev/null +++ b/resources/views/individual-page-name.phtml @@ -0,0 +1,96 @@ +record(); +$tree = $individual->tree(); + +// Create a fake record, so we can extract the formatted NAME value from it. +$fake_individual = Registry::individualFactory()->new( + 'xref', + "0 @xref@ INDI\n1 DEAT Y\n" . $fact->gedcom(), + null, + $tree +); +$fake_individual->setPrimaryName(0); // Make sure we use the name from "1 NAME" + +$container_class = ''; + +if ($fact->isPendingDeletion()) { + $container_class = 'wt-old'; +} elseif ($fact->isPendingAddition()) { + $container_class = 'wt-new'; +} + +?> +
+
+ +
+ +
+
+
+
+
value()) ?>
+ + gedcom(), $matches, PREG_SET_ORDER) ?> + $match) : ?> + + make($fact->tag() . ':' . $tag) ?> + +
+ label() ?> +
+
+ value($value, $fact->record()->tree()) ?> +
+ + +
+ + $fact]) ?> + $fact]) ?> + + canEdit()) : ?> + + +
+
+
diff --git a/resources/views/individual-page-names.phtml b/resources/views/individual-page-names.phtml index eb9fb8dcc2..6eb8227b4f 100644 --- a/resources/views/individual-page-names.phtml +++ b/resources/views/individual-page-names.phtml @@ -10,10 +10,10 @@ use Fisharebest\Webtrees\Individual;
facts(['NAME']) as $fact) : ?> - $fact]) ?> + $fact]) ?> facts(['SEX']) as $fact) : ?> - $fact]) ?> + $fact]) ?>
diff --git a/resources/views/individual-page-sex.phtml b/resources/views/individual-page-sex.phtml new file mode 100644 index 0000000000..8e45994f09 --- /dev/null +++ b/resources/views/individual-page-sex.phtml @@ -0,0 +1,48 @@ +record(); +$tree = $individual->tree(); + +$container_class = ''; +if ($fact->isPendingDeletion()) { + $container_class = 'wt-old'; +} elseif ($fact->isPendingAddition()) { + $container_class = 'wt-new'; +} + +?> +
+
+ +
+
+
+ $fact]) ?> + $fact]) ?> + + canEdit()) : ?> + + +
+
+
diff --git a/resources/views/individual-sex.phtml b/resources/views/individual-sex.phtml deleted file mode 100644 index 8e45994f09..0000000000 --- a/resources/views/individual-sex.phtml +++ /dev/null @@ -1,48 +0,0 @@ -record(); -$tree = $individual->tree(); - -$container_class = ''; -if ($fact->isPendingDeletion()) { - $container_class = 'wt-old'; -} elseif ($fact->isPendingAddition()) { - $container_class = 'wt-new'; -} - -?> -
-
- -
-
-
- $fact]) ?> - $fact]) ?> - - canEdit()) : ?> - - -
-
-
-- cgit v1.3