mirror of
https://code.castopod.org/adaures/castopod
synced 2025-04-19 13:01:19 +00:00
fix: check that note has a preview_card_id before displaying it
fixes #114
This commit is contained in:
parent
b81e812506
commit
acb8b3a401
@ -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…
x
Reference in New Issue
Block a user