2021-10-22 14:35:11 +00:00
|
|
|
<?php declare(strict_types=1);
|
|
|
|
|
|
|
|
if ($comment->in_reply_to_id): ?>
|
2021-11-05 14:36:34 +00:00
|
|
|
<div class="relative -mb-2 overflow-hidden border-t border-l border-r border-subtle rounded-t-xl">
|
|
|
|
<div class="absolute z-0 w-[2px] h-full bg-base left-[43px] top-4"></div>
|
2021-10-22 14:35:11 +00:00
|
|
|
<?= view('episode/_partials/comment_reply', [
|
|
|
|
'reply' => $comment->reply_to_comment,
|
|
|
|
]) ?>
|
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
2021-10-13 15:43:40 +00:00
|
|
|
<?= $this->include('episode/_partials/comment_card') ?>
|
2021-11-05 14:36:34 +00:00
|
|
|
<div class="-mt-2 overflow-hidden border-b border-l border-r border-subtle post-replies rounded-b-xl">
|
2021-10-13 15:43:40 +00:00
|
|
|
|
|
|
|
<?php if (can_user_interact()): ?>
|
2021-11-05 14:36:34 +00:00
|
|
|
<form action="<?= route_to('comment-attempt-reply', $podcast->id, $episode->id, $comment->id) ?>" method="POST" class="flex px-6 pt-8 pb-4 gap-x-2 bg-base">
|
2022-03-04 14:33:48 +00:00
|
|
|
<?= csrf_field() ?>
|
|
|
|
|
2021-10-13 15:43:40 +00:00
|
|
|
<img src="<?= interact_as_actor()
|
2022-03-04 14:33:48 +00:00
|
|
|
->avatar_image_url ?>" alt="<?= esc(interact_as_actor()
|
|
|
|
->display_name) ?>" class="w-10 h-10 rounded-full aspect-square" loading="lazy" />
|
2021-10-13 15:43:40 +00:00
|
|
|
<div class="flex flex-col flex-1">
|
|
|
|
<Forms.Textarea
|
|
|
|
name="message"
|
|
|
|
required="true"
|
|
|
|
class="w-full mb-4"
|
|
|
|
placeholder="<?= lang('Comment.form.reply_to_placeholder', [
|
2022-03-04 14:33:48 +00:00
|
|
|
'actorUsername' => esc($comment->actor->username),
|
2021-10-13 15:43:40 +00:00
|
|
|
]) ?>"
|
|
|
|
rows="1" />
|
2025-01-08 11:11:19 +00:00
|
|
|
<?php // @icon("send-plane-2-fill")?>
|
2024-04-26 17:57:25 +00:00
|
|
|
<Button variant="primary" size="small" type="submit" name="action" value="reply" class="self-end" iconRight="send-plane-2-fill"><?= lang('Comment.form.submit_reply') ?></Button>
|
2021-10-13 15:43:40 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
<?php endif; ?>
|
|
|
|
|
2021-10-22 14:35:11 +00:00
|
|
|
<?php if ($comment->has_replies): ?>
|
2021-11-05 14:36:34 +00:00
|
|
|
<div class="border-t divide-y border-subtle">
|
2021-10-22 14:35:11 +00:00
|
|
|
<?php foreach ($comment->replies as $reply): ?>
|
|
|
|
<?= view('episode/_partials/comment_reply', [
|
|
|
|
'reply' => $reply,
|
|
|
|
]) ?>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
2021-10-13 15:43:40 +00:00
|
|
|
|
|
|
|
</div>
|