<!-- 평점·후기 최근 목록 -->
<input type="hidden" name="total" value="{{ $latest->total }}"/>
@if($latest->total > 0)
    @foreach($latest->list as $row)
    <table class="table table-borderless">
        <colgroup>
            <col style="width: 50px;"/>
            <col />
        </colgroup>
        <tr>
            <td>
                <img src="{{ asset($row->thumb) }}" alt="{{ $row->owner }}" width="52" height="52" onerror="this.src='/images/default/default_thumb.gif'"/>
            </td>
            <td>
                <dl>
                    <dt>
                        <var data-rate="{{ $row->rate }}"></var>
                        <sub>{{ $row->rate }}</sub>
                        @auth
                            @if(UID == $row->id)
                                <span class="badge bg-info text-white">내 평점</span>
                            @endif
                        @endauth
                    </dt>
                    <dd>
                        <ul>
                            <li>{{ $row->owner }}</li>
                            <li>{{ $row->createdAt }}</li>
                            <li><i class="fas fa-thumbs-up"></i> {{ $row->like }}</li>
                            <li><i class="fas fa-thumbs-down"></i> {{ $row->dislike }}</li>
                        </ul>
                    </dd>
                    <dd>
                        {{ $row->content }}
                    </dd>
                </dl>
            </td>
        </tr>
    </table>
    @endforeach
@else
<div class="p-2 text-center">
    등록된 후기가 없습니다.
</div>
@endif

<script>
    Review.general("movieReviewList");
</script>
