fix: removing broken links to unpublished episodes

This commit is contained in:
Paul Couture 2023-12-21 15:00:54 -06:00
parent 9630f331a2
commit 06e5101199

View File

@ -19,7 +19,9 @@
<div class="more-dropdown "><i class="ri-more-fill" data-bs-toggle="dropdown"></i> <div class="more-dropdown "><i class="ri-more-fill" data-bs-toggle="dropdown"></i>
<ul class="dropdown-menu dropdown-menu-dark"> <ul class="dropdown-menu dropdown-menu-dark">
<li><a class="dropdown-item" href="/podcasts/{{ $thisPodcast->slug }}">View Podcast</a></li> <li><a class="dropdown-item" href="/podcasts/{{ $thisPodcast->slug }}">View Podcast</a></li>
@if ($thisEpisode->published)
<li><a class="dropdown-item" href="/podcast/{{ $thisPodcast->slug }}/episode/{{ $thisEpisode->slug }}">View Episode</a></li> <li><a class="dropdown-item" href="/podcast/{{ $thisPodcast->slug }}/episode/{{ $thisEpisode->slug }}">View Episode</a></li>
@endif
<li> <li>
<hr class="dropdown-divider"> <hr class="dropdown-divider">
</li> </li>
@ -48,10 +50,19 @@ class="avatar" data-bs-toggle="tooltip"
Artwork Submitted For Artwork Submitted For
@endif @endif
<br> <br>
@if ($thisPodcast->published)
<strong><a href="/podcasts/{{ $thisPodcast->slug }}">{{ $thisPodcast->name }}</a></strong> <strong><a href="/podcasts/{{ $thisPodcast->slug }}">{{ $thisPodcast->name }}</a></strong>
@else
<strong>{{ $thisPodcast->name }}</strong>
@endif
<br> <br>
@if ($thisPodcast->published)
<a href="/podcast/{{ $thisPodcast->slug }}/episode/{{ $thisEpisode->slug }}">Episode {{ number_format($thisEpisode->episode_number + 0) }}<br><em> <a href="/podcast/{{ $thisPodcast->slug }}/episode/{{ $thisEpisode->slug }}">Episode {{ number_format($thisEpisode->episode_number + 0) }}<br><em>
{{ $thisEpisode->episode_date->format('D, M j') }}<sup>{{ $thisEpisode->episode_date->format('S') }}</sup>{{ $thisEpisode->episode_date->format(', Y') }}</em></a> {{ $thisEpisode->episode_date->format('D, M j') }}<sup>{{ $thisEpisode->episode_date->format('S') }}</sup>{{ $thisEpisode->episode_date->format(', Y') }}</em></a>
@else
Episode {{ number_format($thisEpisode->episode_number + 0) }}<br>
<em>{{ $thisEpisode->episode_date->format('D, M j') }}<sup>{{ $thisEpisode->episode_date->format('S') }}</sup>{{ $thisEpisode->episode_date->format(', Y') }}</em>
@endif
</span> </span>
</div> </div>
{{-- action-wrapper --}} {{-- action-wrapper --}}