Files
movies/resources/views/lists/public.blade.php
T

60 lines
3.0 KiB
PHP
Raw Normal View History

@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-10">
<div class="card mb-4">
<div class="card-header">
<h4 class="mb-0">Public Lists</h4>
</div>
<div class="card-body">
@if($lists->count())
@foreach($lists as $list)
<div class="card mb-3">
<div class="card-body">
<div class="row">
<div class="col-md-2">
@if($list->poster_path)
<img src="http://image.tmdb.org/t/p/w185{{ $list->poster_path }}" alt="{{ $list->name }}" class="img-fluid rounded">
@else
<div class="bg-secondary text-white d-flex align-items-center justify-content-center rounded" style="height: 150px;">
<span class="iconify" data-icon="mdi-playlist-play" data-width="48"></span>
</div>
@endif
</div>
<div class="col-md-10">
<h5>
<a href="{{ route('profile.list.show', [$list->user->slug, $list->slug]) }}">
{{ $list->name }}
</a>
</h5>
<p class="text-muted mb-2">
by <a href="{{ route('profile.show', $list->user->slug) }}">{{ $list->user->name }}</a>
&bull; {{ $list->item_count }} items
&bull; Created {{ $list->created_at->diffForHumans() }}
</p>
@if($list->description)
<p class="mb-0">{{ $list->description }}</p>
@endif
</div>
</div>
</div>
</div>
@endforeach
<div class="d-flex justify-content-center">
{{ $lists->links() }}
</div>
@else
<div class="alert alert-info">
<p class="mb-0">No public lists have been created yet.</p>
</div>
@endif
</div>
</div>
</div>
</div>
</div>
@endsection