From fef9c8e4d1a6990636a9f214e4e6bb23e0dbd720 Mon Sep 17 00:00:00 2001 From: Jonathan Jaubart Date: Tue, 13 Dec 2022 19:58:22 +0000 Subject: [PATCH] GedcomRecord format: Replace HTML in class by view --- app/GedcomRecord.php | 7 +------ resources/views/record-list-info.phtml | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 resources/views/record-list-info.phtml diff --git a/app/GedcomRecord.php b/app/GedcomRecord.php index 1454ec0fa5a..041323ebed0 100644 --- a/app/GedcomRecord.php +++ b/app/GedcomRecord.php @@ -501,12 +501,7 @@ public function alternateName(): ?string */ public function formatList(): string { - $html = ''; - $html .= '' . $this->fullName() . ''; - $html .= ''; - $html .= $this->formatListDetails(); - - return $html; + return view('record-list-info', ['record' => $this]); } /** diff --git a/resources/views/record-list-info.phtml b/resources/views/record-list-info.phtml new file mode 100644 index 00000000000..65a6002b169 --- /dev/null +++ b/resources/views/record-list-info.phtml @@ -0,0 +1,14 @@ + + + fullName() ?> + +formatListDetails() ?>