Skip to content

Commit

Permalink
Merge pull request #350
Browse files Browse the repository at this point in the history
Add warning
  • Loading branch information
portableant authored May 14, 2022
2 parents 2c3eebe + 1d5be0d commit 447b0fb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion resources/views/components/solr-card.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@
<div class="contents-label mb-3">
<h3><a href="{{ $result['url'][0] }}" class="stretched-link">{{ $result['title'][0] }}</a></h3>
@isset($result['publication_date'][0])
<p class="text-info">{{ $result['publication_date'][0] }}</p>
<p class="text-info">{{ Carbon\Carbon::parse($result['publication_date'][0] )->format('l dS F Y')}}</p>
@if(Carbon\Carbon::parse($result['publication_date'][0])->diffInDays() > 120)
<div class="alert alert-danger" role="alert">
Article over 4 months old.
</div>
@endif

@endisset
</div>
</div>
Expand Down

0 comments on commit 447b0fb

Please sign in to comment.