/
show.blade.php
196 lines (183 loc) · 10.6 KB
/
show.blade.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
@extends('layout.default')
@section('title')
<title>{{ $collection->name }} - {{ config('other.title') }}</title>
@endsection
@section('meta')
<meta name="description" content="{{ $collection->name }}">
@endsection
@section('breadcrumb')
<li>
<a href="{{ route('mediahub.index') }}" itemprop="url" class="l-breadcrumb-item-link">
<span itemprop="title" class="l-breadcrumb-item-link-title">@lang('mediahub.title')</span>
</a>
</li>
<li>
<a href="{{ route('mediahub.collections.index') }}" itemprop="url" class="l-breadcrumb-item-link">
<span itemprop="title" class="l-breadcrumb-item-link-title">@lang('mediahub.collections')</span>
</a>
</li>
<li class="active">
<a href="{{ route('mediahub.collections.show', ['id' => $collection->id]) }}" itemprop="url"
class="l-breadcrumb-item-link">
<span itemprop="title" class="l-breadcrumb-item-link-title">{{ $collection->name }}</span>
</a>
</li>
@endsection
@section('content')
<div class="torrent box container single">
<div class="movie-wrapper">
<div class="movie-overlay"></div>
<div class="movie-poster">
<img src="{{ $collection->poster ? \tmdb_image('poster_big', $collection->poster) : 'https://via.placeholder.com/400x600' }}" class="img-responsive" id="meta-poster">
</div>
<div class="meta-info">
<div class="tags">
@lang('mediahub.collections')
</div>
<div class="movie-backdrop" style="background-image: url('{{ $collection->backdrop ? \tmdb_image('back_big', $collection->backdrop) : 'https://via.placeholder.com/960x540' }}');"></div>
<div class="movie-top">
<h1 class="movie-heading">
<span class="text-bold">{{ $collection->name }}</span>
</h1>
<div class="movie-overview">
{{ $collection->overview }}
</div>
</div>
</div>
</div>
<br>
<div class="panel panel-chat shoutbox">
<div class="panel-heading">
<h4><i class="{{ config("other.font-awesome") }} fa-film"></i> Movies</h4>
</div>
<div class="table-responsive">
<table class="table table-condensed table-bordered table-striped">
<tbody>
<tr>
<td>
<section class="recommendations">
@foreach($collection->movie as $movie)
<div class="item mini backdrop mini_card col-md-3">
<div class="image_content">
@php
$torrent_temp = App\Models\Torrent::where('tmdb', '=', $movie->id)
->whereIn('category_id', function ($query) {
$query->select('id')->from('categories')->where('movie_meta', '=', true);
})->first();
@endphp
<a href="{{ route('torrents.similar', ['category_id' => $torrent_temp->category_id, 'tmdb' => $movie->id]) }}">
<div>
<img class="backdrop" src="{{ \tmdb_image('poster_mid', $movie->poster) }}">
</div>
<div style=" margin-top: 8px;">
<span class="badge-extra"><i class="fas fa-calendar text-purple"></i> @lang('common.year'): {{ substr($movie->release_date, 0, 4) }}</span>
<span class="badge-extra"><i class="fas fa-star text-gold"></i> @lang('torrent.rating'): {{ $movie->vote_average }}</span>
</div>
</a>
</div>
</div>
@endforeach
</section>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="torrent box container" id="comments">
<!-- Comments -->
<div class="clearfix"></div>
<div class="row ">
<div class="col-md-12 col-sm-12">
<div class="panel panel-chat shoutbox">
<div class="panel-heading">
<h4>
<i class="{{ config('other.font-awesome') }} fa-comment"></i> @lang('common.comments')
</h4>
</div>
<div class="panel-body no-padding">
<ul class="media-list comments-list">
@if (count($collection->comments) == 0)
<div class="text-center"><h4 class="text-bold text-danger"><i
class="{{ config('other.font-awesome') }} fa-frown"></i> @lang('common.no-comments')!</h4>
</div>
@else
@foreach ($collection->comments as $comment)
<li class="media" style="border-left: 5px solid #01BC8C;">
<div class="media-body">
@if ($comment->anon == 1)
<a href="#" class="pull-left" style="padding-right: 10px;">
<img src="{{ url('img/profile.png') }}" class="img-avatar-48">
<strong>{{ strtoupper(trans('common.anonymous')) }}</strong></a> @if (auth()->user()->id == $comment->user->id || auth()->user()->group->is_modo)
<a href="{{ route('users.show', ['username' => $comment->user->username]) }}" style="color:{{ $comment->user->group->color }};">(<span><i class="{{ $comment->user->group->icon }}"></i> {{ $comment->user->username }}</span>)</a> @endif
@else
<a href="{{ route('users.show', ['username' => $comment->user->username]) }}"
class="pull-left" style="padding-right: 10px;">
@if ($comment->user->image != null)
<img src="{{ url('files/img/' . $comment->user->image) }}"
alt="{{ $comment->user->username }}" class="img-avatar-48"></a>
@else
<img src="{{ url('img/profile.png') }}"
alt="{{ $comment->user->username }}" class="img-avatar-48"></a>
@endif
<strong><a
href="{{ route('users.show', ['username' => $comment->user->username]) }}" style="color:{{ $comment->user->group->color }};"><span><i class="{{ $comment->user->group->icon }}"></i> {{ $comment->user->username }}</span></a></strong> @endif
<span class="text-muted"><small><em>{{ $comment->created_at->toDayDateTimeString() }} ({{ $comment->created_at->diffForHumans() }})</em></small></span>
@if ($comment->user_id == auth()->id() || auth()->user()->group->is_modo)
<div class="pull-right" style="display: inline-block;">
<a data-toggle="modal" data-target="#modal-comment-edit-{{ $comment->id }}">
<button class="btn btn-circle btn-info">
<i class="{{ config('other.font-awesome') }} fa-pencil"></i>
</button>
</a>
<form action="{{ route('comment_delete', ['comment_id' => $comment->id]) }}" method="POST" style="display: inline-block;">
@csrf
@method('DELETE')
<button type="submit" class="btn btn-circle btn-danger">
<i class="{{ config('other.font-awesome') }} fa-trash"></i>
</button>
</form>
</div>
@endif
<div class="pt-5">
@joypixels($comment->getContentHtml())
</div>
</div>
</li>
@include('partials.modals', ['comment' => $comment])
@endforeach
@endif
</ul>
</div>
</div>
</div>
<!-- /Comments -->
<br>
<!-- Add comment -->
<div class="col-md-12">
<form role="form" method="POST" action="{{ route('comment_collection', ['id' => $collection->id]) }}">
@csrf
<div class="form-group">
<label for="content">@lang('common.your-comment'):</label>
<span class="badge-extra">BBCode @lang('common.is-allowed')</span>
<textarea id="content" name="content" cols="30" rows="5" class="form-control"></textarea>
</div>
<button type="submit" class="btn btn-danger">@lang('common.submit')</button>
<label class="radio-inline"><strong>@lang('common.anonymous') @lang('common.comment')
:</strong></label>
<input type="radio" value="1" name="anonymous"> @lang('common.yes')
<input type="radio" value="0" checked="checked" name="anonymous"> @lang('common.no')
</form>
</div>
<!-- /Add comment -->
</div>
</div>
@endsection
@section('javascripts')
<script nonce="{{ Bepsvpt\SecureHeaders\SecureHeaders::nonce() }}">
$(document).ready(function () {
$('#content').wysibb({});
})
</script>
@endsection