Skip to content

Commit 999b345

Browse files
committed
fix: LAR 10 Fix error when displaying approved or not an article view.
1 parent 606067b commit 999b345

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

lang/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
"Pending approval articles:" : "Pending approval articles:",
88
"• Title: [:title](:url)" : "• Title: [:title](:url)",
99
"• By: [@:username](:profile_url)" : "• By: [@:username](:profile_url)",
10-
"• Submitted on: :date" : "• Submitted on: :date"
10+
"• Submitted on: :date" : "• Submitted on: :date",
11+
"Date not available" : "Date not available"
1112
}

lang/fr.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
"Pending approval articles:" : "Articles soumis en attente d'approbation:",
88
"• Title: [:title](:url)" : "• Titre: [:title](:url)",
99
"• By: [@:username](:profile_url)" : "• Par: [@:username](:profile_url)",
10-
"• Submitted on: :date" : "• Soumis le: :date"
10+
"• Submitted on: :date" : "• Soumis le: :date",
11+
"Date not available" : "Date non disponible"
1112
}

resources/views/articles/show.blade.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,10 @@
107107
</div>
108108

109109
<div class="mt-2 flex space-x-1 text-sm text-skin-base sm:mt-0">
110-
<time class="capitalize" datetime="{{ $article->publishedAt()->format('Y-m-d') }}">{{ $article->publishedAt()->isoFormat('LL') }}</time>
110+
<time class="capitalize" datetime="{{ $article->publishedAt() ? $article->publishedAt()->format('Y-m-d') : '' }}">
111+
{{ $article->publishedAt() ? $article->publishedAt()->isoFormat('LL') : __('Date not available') }}
112+
</time>
113+
111114
<span aria-hidden="true">&middot;</span>
112115
<span>{{ __(':time min de lecture', ['time' => $article->readTime()]) }}</span>
113116
<span aria-hidden="true">&middot;</span>

0 commit comments

Comments
 (0)