mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-03 23:09:18 +02:00
fix: check that note has a preview_card_id before displaying it
fixes #114
This commit is contained in:
parent
b81e812506
commit
acb8b3a401
6 changed files with 18 additions and 22 deletions
|
|
@ -27,15 +27,14 @@
|
|||
</div>
|
||||
</header>
|
||||
<div class="px-6 mb-4 note-content"><?= $note->message_html ?></div>
|
||||
<?php if ($note->preview_card): ?>
|
||||
<?= view('podcast/_partials/preview_card', [
|
||||
'preview_card' => $note->preview_card,
|
||||
]) ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($note->episode_id): ?>
|
||||
<?= view('podcast/_partials/episode_card', [
|
||||
'episode' => $note->episode,
|
||||
]) ?>
|
||||
<?php elseif ($note->preview_card_id): ?>
|
||||
<?= view('podcast/_partials/preview_card', [
|
||||
'preview_card' => $note->preview_card,
|
||||
]) ?>
|
||||
<?php endif; ?>
|
||||
<?= $this->include('podcast/_partials/note_actions') ?>
|
||||
</article>
|
||||
|
|
|
|||
|
|
@ -27,15 +27,14 @@
|
|||
</div>
|
||||
</header>
|
||||
<div class="px-6 mb-4 note-content"><?= $note->message_html ?></div>
|
||||
<?php if ($note->preview_card): ?>
|
||||
<?= view('podcast/_partials/preview_card', [
|
||||
'preview_card' => $note->preview_card,
|
||||
]) ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($note->episode_id): ?>
|
||||
<?= view('podcast/_partials/episode_card', [
|
||||
'episode' => $note->episode,
|
||||
]) ?>
|
||||
<?php elseif ($note->preview_card_id): ?>
|
||||
<?= view('podcast/_partials/preview_card', [
|
||||
'preview_card' => $note->preview_card,
|
||||
]) ?>
|
||||
<?php endif; ?>
|
||||
<?= $this->include('podcast/_partials/note_actions_authenticated') ?>
|
||||
</article>
|
||||
|
|
|
|||
|
|
@ -34,15 +34,14 @@
|
|||
</div>
|
||||
</header>
|
||||
<div class="px-6 mb-4 note-content"><?= $note->message_html ?></div>
|
||||
<?php if ($note->preview_card): ?>
|
||||
<?= view('podcast/_partials/preview_card', [
|
||||
'preview_card' => $note->preview_card,
|
||||
]) ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($note->episode_id): ?>
|
||||
<?= view('podcast/_partials/episode_card', [
|
||||
'episode' => $note->episode,
|
||||
]) ?>
|
||||
<?php elseif ($note->preview_card_id): ?>
|
||||
<?= view('podcast/_partials/preview_card', [
|
||||
'preview_card' => $note->preview_card,
|
||||
]) ?>
|
||||
<?php endif; ?>
|
||||
<?= $this->include('podcast/_partials/note_actions') ?>
|
||||
</article>
|
||||
|
|
|
|||
|
|
@ -34,15 +34,14 @@
|
|||
</div>
|
||||
</header>
|
||||
<div class="px-6 mb-4 note-content"><?= $note->message_html ?></div>
|
||||
<?php if ($note->preview_card): ?>
|
||||
<?= view('podcast/_partials/preview_card', [
|
||||
'preview_card' => $note->preview_card,
|
||||
]) ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($note->episode_id): ?>
|
||||
<?= view('podcast/_partials/episode_card', [
|
||||
'episode' => $note->episode,
|
||||
]) ?>
|
||||
<?php elseif ($note->preview_card_id): ?>
|
||||
<?= view('podcast/_partials/preview_card', [
|
||||
'preview_card' => $note->preview_card,
|
||||
]) ?>
|
||||
<?php endif; ?>
|
||||
<?= $this->include('podcast/_partials/note_actions_authenticated') ?>
|
||||
</article>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
><?= lang('Common.mediumDate', [$reply->published_at]) ?></time>
|
||||
</header>
|
||||
<p class="mb-2 note-content"><?= $reply->message_html ?></p>
|
||||
<?php if ($reply->preview_card): ?>
|
||||
<?php if ($reply->preview_card_id): ?>
|
||||
<?= view('podcast/_partials/preview_card', [
|
||||
'preview_card' => $reply->preview_card,
|
||||
]) ?>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
><?= lang('Common.mediumDate', [$reply->created_at]) ?></time>
|
||||
</header>
|
||||
<p class="mb-2 note-content"><?= $reply->message_html ?></p>
|
||||
<?php if ($reply->preview_card): ?>
|
||||
<?php if ($reply->preview_card_id): ?>
|
||||
<?= view('podcast/_partials/preview_card', [
|
||||
'preview_card' => $reply->preview_card,
|
||||
]) ?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue