Commit 193b373b authored by Yassine Doghri's avatar Yassine Doghri
Browse files

fix: include missing variables on public ui's episode page and remote_actions

parent 776eec6f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@
) ?>"><?= icon('heart', 'text-xl mr-1 text-gray-500') . $comment->likes_count ?></button>
        <?php if ($comment->replies_count): ?>
            <?= anchor(
    route_to('episode-comment', $comment->episode->podcast->handle, $episode->slug, $comment->id),
    route_to('episode-comment', $comment->episode->podcast->handle, $comment->episode->slug, $comment->id),
    icon('caret-down', 'text-xl mr-1') . lang('Comment.view_replies', [
        'numberOfReplies' => $comment->replies_count,
    ]),
+6 −4
Original line number Diff line number Diff line
@@ -55,12 +55,14 @@
    </form>
<?php endif; ?>

<div class="flex flex-col gap-y-2">
    <?php foreach ($episode->comments as $comment): ?>
        <?= view('episode/_partials/comment', [
    'comment' => $comment,
            'podcast' => $podcast,
]) ?>
    <?php endforeach; ?>
</div>

<?= $this->endSection()
?>
+9 −5
Original line number Diff line number Diff line
<?php declare(strict_types=1);

if (can_user_interact()): ?>
    <footer>
    <?php if (can_user_interact()): ?>
        <form action="<?= route_to('post-attempt-action', interact_as_actor()->username, $reply->id) ?>" method="POST" class="flex items-start gap-x-6">
            <?= csrf_field() ?>
            <?= anchor(
@@ -85,7 +87,9 @@
                </form>
            <?php endif; ?>
        </nav>
    </footer>
<?php else: ?>
    <footer class="flex gap-x-6">
        <?= anchor(
            route_to('post', $podcast->handle, $reply->id),
            icon('chat', 'text-lg mr-1 text-gray-400') . $reply->replies_count,
@@ -120,5 +124,5 @@
                ]),
            ],
        ) ?>
    <?php endif; ?>
    </footer>
<?php endif; ?>
+5 −1
Original line number Diff line number Diff line
@@ -38,7 +38,11 @@
        ) ?></h1>
    </header>
    <main class="flex-1 max-w-xl px-4 pb-8 mx-auto -mt-24">
        <?= $this->include('post/_partials/card') ?>
        <?= view('post/_partials/card', [
            'index' => 1,
            'podcast' => $podcast,
            'post' => $post,
        ]) ?>

        <form action="<?= route_to('post-attempt-remote-action', $post->id, $action) ?>" method="POST" class="flex flex-col mt-8">
            <?= csrf_field() ?>