mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-15 12:37:46 +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>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div class="px-6 mb-4 note-content"><?= $note->message_html ?></div>
|
<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): ?>
|
<?php if ($note->episode_id): ?>
|
||||||
<?= view('podcast/_partials/episode_card', [
|
<?= view('podcast/_partials/episode_card', [
|
||||||
'episode' => $note->episode,
|
'episode' => $note->episode,
|
||||||
]) ?>
|
]) ?>
|
||||||
|
<?php elseif ($note->preview_card_id): ?>
|
||||||
|
<?= view('podcast/_partials/preview_card', [
|
||||||
|
'preview_card' => $note->preview_card,
|
||||||
|
]) ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?= $this->include('podcast/_partials/note_actions') ?>
|
<?= $this->include('podcast/_partials/note_actions') ?>
|
||||||
</article>
|
</article>
|
||||||
|
|
|
||||||
|
|
@ -27,15 +27,14 @@
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div class="px-6 mb-4 note-content"><?= $note->message_html ?></div>
|
<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): ?>
|
<?php if ($note->episode_id): ?>
|
||||||
<?= view('podcast/_partials/episode_card', [
|
<?= view('podcast/_partials/episode_card', [
|
||||||
'episode' => $note->episode,
|
'episode' => $note->episode,
|
||||||
]) ?>
|
]) ?>
|
||||||
|
<?php elseif ($note->preview_card_id): ?>
|
||||||
|
<?= view('podcast/_partials/preview_card', [
|
||||||
|
'preview_card' => $note->preview_card,
|
||||||
|
]) ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?= $this->include('podcast/_partials/note_actions_authenticated') ?>
|
<?= $this->include('podcast/_partials/note_actions_authenticated') ?>
|
||||||
</article>
|
</article>
|
||||||
|
|
|
||||||
|
|
@ -34,15 +34,14 @@
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div class="px-6 mb-4 note-content"><?= $note->message_html ?></div>
|
<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): ?>
|
<?php if ($note->episode_id): ?>
|
||||||
<?= view('podcast/_partials/episode_card', [
|
<?= view('podcast/_partials/episode_card', [
|
||||||
'episode' => $note->episode,
|
'episode' => $note->episode,
|
||||||
]) ?>
|
]) ?>
|
||||||
|
<?php elseif ($note->preview_card_id): ?>
|
||||||
|
<?= view('podcast/_partials/preview_card', [
|
||||||
|
'preview_card' => $note->preview_card,
|
||||||
|
]) ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?= $this->include('podcast/_partials/note_actions') ?>
|
<?= $this->include('podcast/_partials/note_actions') ?>
|
||||||
</article>
|
</article>
|
||||||
|
|
|
||||||
|
|
@ -34,15 +34,14 @@
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div class="px-6 mb-4 note-content"><?= $note->message_html ?></div>
|
<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): ?>
|
<?php if ($note->episode_id): ?>
|
||||||
<?= view('podcast/_partials/episode_card', [
|
<?= view('podcast/_partials/episode_card', [
|
||||||
'episode' => $note->episode,
|
'episode' => $note->episode,
|
||||||
]) ?>
|
]) ?>
|
||||||
|
<?php elseif ($note->preview_card_id): ?>
|
||||||
|
<?= view('podcast/_partials/preview_card', [
|
||||||
|
'preview_card' => $note->preview_card,
|
||||||
|
]) ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?= $this->include('podcast/_partials/note_actions_authenticated') ?>
|
<?= $this->include('podcast/_partials/note_actions_authenticated') ?>
|
||||||
</article>
|
</article>
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
><?= lang('Common.mediumDate', [$reply->published_at]) ?></time>
|
><?= lang('Common.mediumDate', [$reply->published_at]) ?></time>
|
||||||
</header>
|
</header>
|
||||||
<p class="mb-2 note-content"><?= $reply->message_html ?></p>
|
<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', [
|
<?= view('podcast/_partials/preview_card', [
|
||||||
'preview_card' => $reply->preview_card,
|
'preview_card' => $reply->preview_card,
|
||||||
]) ?>
|
]) ?>
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
><?= lang('Common.mediumDate', [$reply->created_at]) ?></time>
|
><?= lang('Common.mediumDate', [$reply->created_at]) ?></time>
|
||||||
</header>
|
</header>
|
||||||
<p class="mb-2 note-content"><?= $reply->message_html ?></p>
|
<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', [
|
<?= view('podcast/_partials/preview_card', [
|
||||||
'preview_card' => $reply->preview_card,
|
'preview_card' => $reply->preview_card,
|
||||||
]) ?>
|
]) ?>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue