From 0bddd348473b0d6ef6884c1e8b0c7533f601b2b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 6 Apr 2020 15:34:32 +0200 Subject: Added publication date on epub export --- src/Wallabag/CoreBundle/Helper/EntriesExport.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/Wallabag/CoreBundle/Helper') diff --git a/src/Wallabag/CoreBundle/Helper/EntriesExport.php b/src/Wallabag/CoreBundle/Helper/EntriesExport.php index f981ee50..1318602e 100644 --- a/src/Wallabag/CoreBundle/Helper/EntriesExport.php +++ b/src/Wallabag/CoreBundle/Helper/EntriesExport.php @@ -196,10 +196,17 @@ class EntriesExport $authors = implode(',', $publishedBy); } + $publishedAt = $entry->getPublishedAt(); + $publishedDate = $this->translator->trans('export.unknown'); + if (!empty($publishedAt)) { + $publishedDate = $entry->getPublishedAt()->format('Y-m-d'); + } + $titlepage = $content_start . '

' . $entry->getTitle() . '

' . '
' . '
' . $this->translator->trans('entry.view.published_by') . '
' . $authors . '
' . + '
' . $this->translator->trans('entry.metadata.published_on') . '
' . $publishedDate . '
' . '
' . $this->translator->trans('entry.metadata.reading_time') . '
' . $this->translator->trans('entry.metadata.reading_time_minutes_short', ['%readingTime%' => $entry->getReadingTime()]) . '
' . '
' . $this->translator->trans('entry.metadata.added_on') . '
' . $entry->getCreatedAt()->format('Y-m-d') . '
' . '
' . $this->translator->trans('entry.metadata.address') . '
' . $entry->getUrl() . '
' . -- cgit v1.2.3