Improve templates

This commit is contained in:
DariusIII
2025-10-07 13:38:02 +02:00
parent ca1fee1c53
commit 40a469a2b7
11 changed files with 514 additions and 314 deletions
+18 -8
View File
@@ -10,7 +10,7 @@ class BrowseGroupController extends BasePageController
/**
* @throws \Exception
*/
public function show(Request $request): void
public function show(Request $request)
{
// Get the search term from the request
$search = $request->get('search', '') ?? '';
@@ -18,10 +18,7 @@ class BrowseGroupController extends BasePageController
// Get groups based on search term
$groupList = UsenetGroup::getGroupsRange($search, true);
// Pass data to the view
$this->smarty->assign('results', $groupList);
$this->smarty->assign('search', $search);
// Set meta data
$meta_title = 'Browse Groups';
$meta_keywords = 'browse,groups,description,details';
$meta_description = 'Browse groups';
@@ -30,8 +27,21 @@ class BrowseGroupController extends BasePageController
$meta_description = 'Browse groups search results for '.$search;
}
$content = $this->smarty->fetch('browsegroup.tpl');
$this->smarty->assign(compact('content', 'meta_title', 'meta_keywords', 'meta_description'));
$this->pagerender();
// Render the content view
$content = view('browsegroup', [
'results' => $groupList,
'search' => $search,
'site' => $this->settings,
])->render();
// Prepare view data for main layout
$this->viewData = array_merge($this->viewData, [
'content' => $content,
'meta_title' => $meta_title,
'meta_keywords' => $meta_keywords,
'meta_description' => $meta_description,
]);
return $this->pagerender();
}
}
+4 -4
View File
@@ -75,7 +75,7 @@ class MyMoviesController extends BasePageController
$this->viewData['cat_selected'] = [];
$this->viewData['imdbid'] = $imdbid;
$this->viewData['movie'] = $movie;
$this->viewData['content'] = view('themes/Gentele/mymovies-add', $this->viewData)->render();
$this->viewData['content'] = view('mymovies.add', $this->viewData)->render();
return $this->pagerender();
@@ -109,7 +109,7 @@ class MyMoviesController extends BasePageController
$this->viewData['cat_selected'] = explode('|', $movie['categories']);
$this->viewData['imdbid'] = $imdbid;
$this->viewData['movie'] = $movie;
$this->viewData['content'] = view('themes/Gentele/mymovies-add', $this->viewData)->render();
$this->viewData['content'] = view('mymovies.add', $this->viewData)->render();
return $this->pagerender();
@@ -156,7 +156,7 @@ class MyMoviesController extends BasePageController
$this->viewData['lastvisit'] = $this->userdata->lastlogin;
$this->viewData['results'] = $results;
$this->viewData['movies'] = true;
$this->viewData['content'] = view('themes/Gentele/browse', $this->viewData)->render();
$this->viewData['content'] = view('browse', $this->viewData)->render();
$this->viewData = array_merge($this->viewData, compact('title', 'meta_title', 'meta_keywords', 'meta_description'));
return $this->pagerender();
@@ -193,7 +193,7 @@ class MyMoviesController extends BasePageController
$results[$moviek] = $movie;
}
$this->viewData['movies'] = $results;
$this->viewData['content'] = view('themes/Gentele/mymovies', $this->viewData)->render();
$this->viewData['content'] = view('mymovies.index', $this->viewData)->render();
$this->viewData = array_merge($this->viewData, compact('title', 'meta_title', 'meta_keywords', 'meta_description'));
return $this->pagerender();
+5 -5
View File
@@ -74,7 +74,7 @@ class MyShowsController extends BasePageController
$this->viewData['cat_selected'] = [];
$this->viewData['video'] = $videoId;
$this->viewData['show'] = $show;
$this->viewData['content'] = view('themes/Gentele/myshows-add', $this->viewData)->render();
$this->viewData['content'] = view('myshows.add', $this->viewData)->render();
return $this->pagerender();
@@ -108,7 +108,7 @@ class MyShowsController extends BasePageController
$this->viewData['cat_selected'] = explode('|', $show['categories']);
$this->viewData['video'] = $videoId;
$this->viewData['show'] = $show;
$this->viewData['content'] = view('themes/Gentele/myshows-add', $this->viewData)->render();
$this->viewData['content'] = view('myshows.add', $this->viewData)->render();
return $this->pagerender();
@@ -146,7 +146,7 @@ class MyShowsController extends BasePageController
}
}
$this->viewData['shows'] = $results;
$this->viewData['content'] = view('themes/Gentele/myshows', $this->viewData)->render();
$this->viewData['content'] = view('myshows.index', $this->viewData)->render();
$this->viewData = array_merge($this->viewData, compact('title', 'meta_title', 'meta_keywords', 'meta_description'));
return $this->pagerender();
@@ -174,7 +174,7 @@ class MyShowsController extends BasePageController
$offset = ($page - 1) * config('nntmux.items_per_page');
$ordering = $releases->getBrowseOrdering();
$orderby = $request->has('ob') && \in_array($request->input('ob'), $ordering, false) ? $request->input('ob') : '';
$browseCount = $shows->count();
$browseCount = $shows ? $shows->count() : 0;
$rslt = $releases->getShowsRange($shows ?? [], $offset, config('nntmux.items_per_page'), $orderby, -1, $this->userdata->categoryexclusions);
$results = $this->paginate($rslt ?? [], $browseCount, config('nntmux.items_per_page'), $page, $request->url(), $request->query());
@@ -189,7 +189,7 @@ class MyShowsController extends BasePageController
$this->viewData['results'] = $results;
$this->viewData['resultsadd'] = $rslt;
$this->viewData['shows'] = true;
$this->viewData['content'] = view('themes/Gentele/browse', $this->viewData)->render();
$this->viewData['content'] = view('browse', $this->viewData)->render();
$this->viewData = array_merge($this->viewData, compact('title', 'meta_title', 'meta_keywords', 'meta_description'));
return $this->pagerender();
@@ -1,3 +1,104 @@
<div class="max-w-4xl mx-auto">
<div class="bg-white rounded-xl shadow-lg overflow-hidden border border-gray-200 mb-6">
<!-- Header -->
<div class="bg-gradient-to-r from-blue-600 to-blue-700 px-6 py-4">
<div class="flex flex-col md:flex-row md:justify-between md:items-center gap-4">
<h3 class="text-xl font-bold text-white flex items-center">
<i class="fa fa-film mr-2"></i>{{ ucfirst($type ?? 'add') }} Movie to Watchlist
</h3>
<nav aria-label="breadcrumb">
<ol class="flex items-center space-x-2 text-sm text-blue-100">
<li><a href="{{ url($site->home_link) }}" class="hover:text-white transition">Home</a></li>
<li><i class="fas fa-chevron-right text-xs"></i></li>
<li><a href="{{ url('/mymovies') }}" class="hover:text-white transition">My Movies</a></li>
<li><i class="fas fa-chevron-right text-xs"></i></li>
<li class="text-white font-medium">{{ ucfirst($type ?? 'add') }} Movie</li>
</ol>
</nav>
</div>
</div>
<div class="p-6">
<div class="mb-6">
<div class="flex items-center gap-4 mb-4">
<img class="rounded-lg shadow-md w-24 h-auto"
src="{{ url("/covers/movies/{$imdbid}-cover.jpg") }}"
onerror="this.src='{{ url('/covers/movies/no-cover.jpg') }}'"
alt="{{ e($movie['title'] ?? '') }}" />
<div>
<h4 class="text-lg font-semibold text-gray-900 mb-1">
{{ ucfirst($type ?? 'add') }} "{{ e($movie['title'] ?? '') }}" to watchlist
</h4>
<p class="text-gray-600 text-sm">Select categories below to organize this movie in your collection.</p>
</div>
</div>
<div class="bg-blue-50 border-l-4 border-blue-500 rounded-lg p-4">
<div class="flex items-start">
<i class="fa fa-info-circle text-blue-600 mt-0.5 mr-3"></i>
<p class="text-sm text-gray-700">
Adding movies to your watchlist will notify you through your
<a href="{{ url("/rss/mymovies?dl=1&i={$userdata->id}&api_token={$userdata->api_token}") }}"
class="font-semibold text-blue-600 hover:text-blue-800 underline inline-flex items-center">
<i class="fa fa-rss mr-1"></i>RSS Feed
</a>
when they become available.
</p>
</div>
</div>
</div>
{!! Form::open(['id' => 'mymovies', 'class' => 'space-y-6', 'url' => "mymovies?id=do{$type}"]) !!}
<input type="hidden" name="imdb" value="{{ $imdbid }}"/>
@if(!empty($from))
<input type="hidden" name="from" value="{{ $from }}" />
@endif
<div>
<label class="block text-sm font-bold text-gray-700 mb-3">Choose Categories:</label>
<div class="flex flex-wrap gap-3" id="category-container">
@foreach($cat_ids ?? [] as $index => $cat_id)
<label class="inline-flex items-center px-4 py-2 bg-gray-50 border border-gray-300 rounded-lg cursor-pointer hover:bg-gray-100 transition-all duration-200 has-[:checked]:bg-blue-50 has-[:checked]:border-blue-500 has-[:checked]:text-blue-700">
<input type="checkbox"
id="category_{{ $cat_id }}"
name="category[]"
value="{{ $cat_id }}"
class="mr-2 rounded text-blue-600 focus:ring-blue-500"
@if(in_array($cat_id, $cat_selected ?? [])) checked @endif>
<span class="text-sm font-medium">{{ $cat_names[$cat_id] ?? '' }}</span>
</label>
@endforeach
</div>
</div>
<div class="flex gap-3 pt-4 border-t border-gray-200">
<button class="px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 shadow-md hover:shadow-lg transition-all duration-200 inline-flex items-center font-medium"
type="submit" name="{{ $type ?? 'add' }}">
<i class="fa {{ ($type ?? 'add') == 'add' ? 'fa-plus' : 'fa-edit' }} mr-2"></i>{{ ucfirst($type ?? 'add') }} Movie
</button>
<a href="{{ url('/mymovies') }}"
class="px-6 py-3 bg-white text-gray-700 border-2 border-gray-300 rounded-lg hover:bg-gray-50 hover:border-gray-400 shadow-md hover:shadow-lg transition-all duration-200 inline-flex items-center font-medium">
<i class="fa fa-arrow-left mr-2"></i>Back to My Movies
</a>
</div>
{!! Form::close() !!}
</div>
</div>
</div>
<style>
/* Fallback for browsers that don't support :has() pseudo-class */
@supports not selector(:has(*)) {
label:has(input[type="checkbox"]:checked) {
background-color: #eff6ff !important;
border-color: #3b82f6 !important;
color: #1e40af !important;
}
}
</style>
</style>
<div class="card card-default shadow-sm mb-4">
<div class="card-header bg-light">
<div class="d-flex justify-content-between align-items-center">
+278
View File
@@ -0,0 +1,278 @@
<style>
.header-gradient {
background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}
.info-card-gradient {
background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
}
.table-header-gradient {
background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}
.movie-poster-shadow {
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.category-badge {
background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}
.empty-state-bg {
background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
}
</style>
<div class="max-w-7xl mx-auto">
<!-- Header Section -->
<div class="header-gradient rounded-xl shadow-lg mb-6 overflow-hidden">
<div class="px-8 py-6">
<div class="flex flex-col md:flex-row md:justify-between md:items-center gap-4">
<div>
<h1 class="text-3xl font-bold text-white flex items-center">
<i class="fa fa-film mr-3"></i>My Movies
</h1>
<p class="text-blue-100 mt-2">Manage your movie wishlist and get automatic updates</p>
</div>
<nav aria-label="breadcrumb">
<ol class="flex items-center space-x-2 text-sm text-blue-100">
<li><a href="{{ url($site->home_link) }}" class="hover:text-white transition">Home</a></li>
<li><i class="fas fa-chevron-right text-xs"></i></li>
<li class="text-white font-medium">My Movies</li>
</ol>
</nav>
</div>
</div>
</div>
<!-- RSS Feed Info Card -->
<div class="info-card-gradient border-l-4 border-blue-500 rounded-lg p-5 mb-6 shadow">
<div class="flex items-start">
<div class="flex-shrink-0">
<div class="flex items-center justify-center h-10 w-10 rounded-lg bg-blue-500 text-white">
<i class="fa fa-rss text-lg"></i>
</div>
</div>
<div class="ml-4 flex-1">
<h3 class="text-sm font-semibold text-gray-900 mb-1">Automatic Downloads via RSS</h3>
<p class="text-sm text-gray-700">
Using 'My Movies' you can search for movies and add them to a wishlist. If the movie becomes available it will be added to your
<a href="{{ url("/rss/mymovies?dl=1&i={$userdata->id}&api_token={$userdata->api_token}") }}"
class="font-semibold text-blue-600 hover:text-blue-800 underline inline-flex items-center">
<i class="fa fa-rss mr-1"></i>personal RSS feed
</a>
for automatic downloading.
</p>
</div>
</div>
</div>
<!-- Action Buttons -->
<div class="flex flex-wrap gap-3 mb-6">
<a class="px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 shadow-md hover:shadow-lg transition-all duration-200 inline-flex items-center font-medium"
href="{{ url('/browse/Movies') }}"
title="Browse all available movies">
<i class="fa fa-list mr-2"></i>Browse All Movies
</a>
<a class="px-6 py-3 bg-white text-gray-700 border-2 border-gray-300 rounded-lg hover:bg-gray-50 hover:border-gray-400 shadow-md hover:shadow-lg transition-all duration-200 inline-flex items-center font-medium"
href="{{ url("/rss/mymovies?dl=1&i={$userdata->id}&api_token={$userdata->api_token}") }}"
title="All movies in your watchlist as an RSS feed">
<i class="fa fa-rss mr-2 text-orange-500"></i>RSS Feed
</a>
</div>
<!-- Movies Table/Cards -->
@if(count($movies ?? []) > 0)
<div class="bg-white rounded-xl shadow-lg overflow-hidden border border-gray-200">
<!-- Table Header -->
<div class="table-header-gradient px-6 py-4 border-b-2 border-gray-300">
<div class="flex items-center justify-between">
<h2 class="text-lg font-semibold text-gray-800 flex items-center">
<i class="fa fa-bookmark mr-2 text-blue-600"></i>
Your Movies <span class="ml-2 px-3 py-1 bg-blue-600 text-white text-sm rounded-full font-bold">{{ count($movies) }}</span>
</h2>
</div>
</div>
<!-- Desktop Table View -->
<div class="hidden lg:block">
<div class="divide-y divide-gray-200">
@foreach($movies as $movie)
<div class="p-6 hover:bg-blue-50 transition-colors duration-150">
<div class="flex gap-6">
<!-- Movie Poster -->
<div class="flex-shrink-0">
<img class="rounded-lg movie-poster-shadow w-32 h-48 object-cover"
src="{{ url('/covers/movies/' . (($movie['cover'] ?? 0) == 1 ? $movie['imdbid'] . '-cover.jpg' : 'no-cover.jpg')) }}"
alt="{{ e($movie['title'] ?? '') }}"/>
</div>
<!-- Movie Info -->
<div class="flex-1 min-w-0">
<div class="flex items-start justify-between mb-3">
<div class="flex-1">
<h3 class="text-xl font-bold text-gray-900 mb-1">
<a href="{{ url("/Movies?imdb={$movie['imdbid']}") }}"
class="hover:text-blue-600 transition-colors">
{{ e($movie['title'] ?? '') }}
@if(!empty($movie['year']))
<span class="text-gray-500 font-normal">({{ $movie['year'] }})</span>
@endif
</a>
</h3>
@if(!empty($movie['tagline']))
<p class="text-sm italic text-gray-600 mb-2">{{ e($movie['tagline']) }}</p>
@endif
</div>
<div class="flex gap-2 ml-4">
<a class="inline-flex items-center px-4 py-2 bg-amber-500 text-white rounded-lg hover:bg-amber-600 shadow hover:shadow-md transition-all duration-200 text-sm font-medium"
href="{{ url("/mymovies?id=edit&imdb={$movie['imdbid']}") }}"
title="Edit Categories">
<i class="fa fa-edit mr-1.5"></i>Edit
</a>
<a class="inline-flex items-center px-4 py-2 bg-red-500 text-white rounded-lg hover:bg-red-600 shadow hover:shadow-md transition-all duration-200 text-sm font-medium confirm_action"
href="{{ url("/mymovies?id=delete&imdb={$movie['imdbid']}") }}"
title="Remove from My Movies">
<i class="fa fa-trash mr-1.5"></i>Delete
</a>
</div>
</div>
@if(!empty($movie['plot']))
<p class="text-sm text-gray-700 mb-3 line-clamp-3">{{ e($movie['plot']) }}</p>
@endif
<div class="grid grid-cols-1 md:grid-cols-2 gap-3 mb-3">
@if(!empty($movie['genre']))
<div class="flex items-center text-sm">
<span class="font-semibold text-gray-700 mr-2"><i class="fa fa-tag mr-1 text-blue-600"></i>Genre:</span>
<span class="text-gray-600">{{ e($movie['genre']) }}</span>
</div>
@endif
@if(!empty($movie['director']))
<div class="flex items-center text-sm">
<span class="font-semibold text-gray-700 mr-2"><i class="fa fa-video-camera mr-1 text-blue-600"></i>Director:</span>
<span class="text-gray-600">{{ e($movie['director']) }}</span>
</div>
@endif
</div>
@if(!empty($movie['actors']))
<div class="flex items-start text-sm mb-3">
<span class="font-semibold text-gray-700 mr-2 flex-shrink-0"><i class="fa fa-users mr-1 text-blue-600"></i>Starring:</span>
<span class="text-gray-600">{{ e($movie['actors']) }}</span>
</div>
@endif
<div class="flex items-center gap-4 pt-3 border-t border-gray-200">
<span class="inline-flex items-center px-3 py-1.5 category-badge text-blue-800 text-xs font-semibold rounded-full border border-blue-200">
<i class="fa fa-folder-open mr-1.5"></i>{{ !empty($movie['categoryNames']) ? e($movie['categoryNames']) : 'All Categories' }}
</span>
<span class="text-xs text-gray-500 flex items-center">
<i class="fa fa-calendar mr-1"></i>Added {{ isset($movie['created_at']) ? date('M d, Y', strtotime($movie['created_at'])) : '' }}
</span>
<a class="inline-flex items-center px-3 py-1.5 bg-yellow-400 hover:bg-yellow-500 text-gray-900 text-xs font-semibold rounded-full transition-colors"
target="_blank"
href="{{ $site->dereferrer_link }}http://www.imdb.com/title/tt{{ $movie['imdbid'] }}"
title="View on IMDB">
<i class="fa fa-external-link mr-1"></i>IMDB
</a>
</div>
</div>
</div>
</div>
@endforeach
</div>
</div>
<!-- Mobile/Tablet Card View -->
<div class="lg:hidden">
@foreach($movies as $movie)
<div class="p-6 border-b border-gray-200 hover:bg-blue-50 transition-colors duration-150">
<div class="flex gap-4 mb-4">
<div class="flex-shrink-0">
<img class="rounded-lg movie-poster-shadow w-24 h-36 object-cover"
src="{{ url('/covers/movies/' . (($movie['cover'] ?? 0) == 1 ? $movie['imdbid'] . '-cover.jpg' : 'no-cover.jpg')) }}"
alt="{{ e($movie['title'] ?? '') }}"/>
</div>
<div class="flex-1 min-w-0">
<h3 class="text-lg font-bold text-gray-900 mb-1">
<a href="{{ url("/Movies?imdb={$movie['imdbid']}") }}"
class="hover:text-blue-600">
{{ e($movie['title'] ?? '') }}
@if(!empty($movie['year']))
<span class="text-gray-500 text-sm">({{ $movie['year'] }})</span>
@endif
</a>
</h3>
@if(!empty($movie['tagline']))
<p class="text-xs italic text-gray-600 mb-2">{{ e($movie['tagline']) }}</p>
@endif
<span class="inline-flex items-center px-2 py-1 category-badge text-blue-800 text-xs font-semibold rounded-full border border-blue-200">
<i class="fa fa-folder-open mr-1"></i>{{ !empty($movie['categoryNames']) ? e($movie['categoryNames']) : 'All' }}
</span>
</div>
</div>
@if(!empty($movie['plot']))
<p class="text-sm text-gray-700 mb-3 line-clamp-3">{{ e($movie['plot']) }}</p>
@endif
<div class="flex items-center justify-between pt-3 border-t border-gray-200">
<div class="flex gap-2">
<a class="inline-flex items-center px-3 py-1.5 bg-yellow-400 hover:bg-yellow-500 text-gray-900 text-xs font-semibold rounded-full transition-colors"
target="_blank"
href="{{ $site->dereferrer_link }}http://www.imdb.com/title/tt{{ $movie['imdbid'] }}">
<i class="fa fa-external-link mr-1"></i>IMDB
</a>
<span class="text-xs text-gray-500 flex items-center">
<i class="fa fa-calendar mr-1"></i>{{ isset($movie['created_at']) ? date('M d, Y', strtotime($movie['created_at'])) : '' }}
</span>
</div>
<div class="flex gap-2">
<a class="px-3 py-2 bg-amber-500 text-white rounded-lg hover:bg-amber-600 text-sm font-medium shadow"
href="{{ url("/mymovies?id=edit&imdb={$movie['imdbid']}") }}"
title="Edit">
<i class="fa fa-edit"></i>
</a>
<a class="px-3 py-2 bg-red-500 text-white rounded-lg hover:bg-red-600 text-sm font-medium shadow confirm_action"
href="{{ url("/mymovies?id=delete&imdb={$movie['imdbid']}") }}"
title="Remove">
<i class="fa fa-trash"></i>
</a>
</div>
</div>
</div>
@endforeach
</div>
</div>
@else
<!-- Empty State -->
<div class="bg-white rounded-xl shadow-lg overflow-hidden border border-gray-200">
<div class="text-center py-16 px-6">
<div class="mx-auto h-24 w-24 empty-state-bg rounded-full flex items-center justify-center mb-6 shadow-sm">
<i class="fa fa-film text-5xl text-blue-600"></i>
</div>
<h3 class="text-2xl font-bold text-gray-900 mb-2">No Movies in Watchlist</h3>
<p class="text-gray-600 mb-6 max-w-md mx-auto">
You haven't bookmarked any movies yet. Search for movies and add them to your watchlist.
</p>
<a href="{{ url('/browse/Movies') }}"
class="inline-flex items-center px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 shadow-md hover:shadow-lg transition-all duration-200 font-medium">
<i class="fa fa-search mr-2"></i>Browse Movies
</a>
</div>
</div>
@endif
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
// Confirm before removing movies
document.querySelectorAll('.confirm_action').forEach(element => {
element.addEventListener('click', function(e) {
if (!confirm('Are you sure you want to remove this movie from your watchlist?')) {
e.preventDefault();
}
});
});
});
</script>
+100
View File
@@ -0,0 +1,100 @@
<div class="max-w-4xl mx-auto">
<div class="bg-white rounded-xl shadow-lg overflow-hidden border border-gray-200 mb-6">
<!-- Header -->
<div class="bg-gradient-to-r from-blue-600 to-blue-700 px-6 py-4">
<div class="flex flex-col md:flex-row md:justify-between md:items-center gap-4">
<h3 class="text-xl font-bold text-white flex items-center">
<i class="fa fa-tv mr-2"></i>{{ ucfirst($type ?? 'add') }} Show to Watchlist
</h3>
<nav aria-label="breadcrumb">
<ol class="flex items-center space-x-2 text-sm text-blue-100">
<li><a href="{{ url($site->home_link) }}" class="hover:text-white transition">Home</a></li>
<li><i class="fas fa-chevron-right text-xs"></i></li>
<li><a href="{{ url('/myshows') }}" class="hover:text-white transition">My Shows</a></li>
<li><i class="fas fa-chevron-right text-xs"></i></li>
<li class="text-white font-medium">{{ ucfirst($type ?? 'add') }} Show</li>
</ol>
</nav>
</div>
</div>
<div class="p-6">
<div class="mb-6">
<div class="flex items-center gap-4 mb-4">
<img class="rounded-lg shadow-md w-24 h-auto"
src="{{ url("/covers/tvshows/{$video}_thumb.jpg") }}"
onerror="this.src='{{ url('/covers/tvshows/no-cover.jpg') }}'"
alt="{{ e($show['title'] ?? '') }}" />
<div>
<h4 class="text-lg font-semibold text-gray-900 mb-1">
{{ ucfirst($type ?? 'add') }} "{{ e($show['title'] ?? '') }}" to watchlist
</h4>
<p class="text-gray-600 text-sm">Select categories below to organize this show in your collection.</p>
</div>
</div>
<div class="bg-blue-50 border-l-4 border-blue-500 rounded-lg p-4">
<div class="flex items-start">
<i class="fa fa-info-circle text-blue-600 mt-0.5 mr-3"></i>
<p class="text-sm text-gray-700">
Adding shows to your watchlist will notify you through your
<a href="{{ url("/rss/myshows?dl=1&i={$userdata->id}&api_token={$userdata->api_token}") }}"
class="font-semibold text-blue-600 hover:text-blue-800 underline inline-flex items-center">
<i class="fa fa-rss mr-1"></i>RSS Feed
</a>
when new episodes become available.
</p>
</div>
</div>
</div>
{!! Form::open(['id' => 'myshows', 'class' => 'space-y-6', 'url' => "myshows?action=do{$type}"]) !!}
<input type="hidden" name="id" value="{{ $video }}"/>
@if(!empty($from))
<input type="hidden" name="from" value="{{ $from }}" />
@endif
<div>
<label class="block text-sm font-bold text-gray-700 mb-3">Choose Categories:</label>
<div class="flex flex-wrap gap-3" id="category-container">
@foreach($cat_ids ?? [] as $index => $cat_id)
<label class="inline-flex items-center px-4 py-2 bg-gray-50 border border-gray-300 rounded-lg cursor-pointer hover:bg-gray-100 transition-all duration-200 has-[:checked]:bg-blue-50 has-[:checked]:border-blue-500 has-[:checked]:text-blue-700">
<input type="checkbox"
id="category_{{ $cat_id }}"
name="category[]"
value="{{ $cat_id }}"
class="mr-2 rounded text-blue-600 focus:ring-blue-500"
@if(in_array($cat_id, $cat_selected ?? [])) checked @endif>
<span class="text-sm font-medium">{{ $cat_names[$cat_id] ?? '' }}</span>
</label>
@endforeach
</div>
</div>
<div class="flex gap-3 pt-4 border-t border-gray-200">
<button class="px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 shadow-md hover:shadow-lg transition-all duration-200 inline-flex items-center font-medium"
type="submit" name="{{ $type ?? 'add' }}">
<i class="fa {{ ($type ?? 'add') == 'add' ? 'fa-plus' : 'fa-edit' }} mr-2"></i>{{ ucfirst($type ?? 'add') }} Show
</button>
<a href="{{ url('/myshows') }}"
class="px-6 py-3 bg-white text-gray-700 border-2 border-gray-300 rounded-lg hover:bg-gray-50 hover:border-gray-400 shadow-md hover:shadow-lg transition-all duration-200 inline-flex items-center font-medium">
<i class="fa fa-arrow-left mr-2"></i>Back to My Shows
</a>
</div>
{!! Form::close() !!}
</div>
</div>
</div>
<style>
/* Fallback for browsers that don't support :has() pseudo-class */
@supports not selector(:has(*)) {
label:has(input[type="checkbox"]:checked) {
background-color: #eff6ff !important;
border-color: #3b82f6 !important;
color: #1e40af !important;
}
}
</style>
@@ -12,7 +12,7 @@
background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
}
.category-badge {
background: linear-gradient(135deg, #ddd6fe 0%, #fce7f3 100%);
background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}
.empty-state-bg {
background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
@@ -78,7 +78,7 @@
<!-- Action Buttons -->
<div class="flex flex-wrap gap-3 mb-6">
<a class="px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 shadow-md hover:shadow-lg transition-all duration-200 inline-flex items-center font-medium"
href="{{ route('series') }}"
href="{{ url('/browse/TV') }}"
title="View available TV series">
<i class="fa fa-list mr-2"></i>Browse All Series
</a>
@@ -145,7 +145,7 @@
</td>
<td class="px-8 py-5">
@if(!empty($show['categoryNames']))
<span class="inline-flex items-center px-3 py-1.5 category-badge text-purple-800 text-xs font-semibold rounded-full border border-purple-200">
<span class="inline-flex items-center px-3 py-1.5 category-badge text-blue-800 text-xs font-semibold rounded-full border border-blue-200">
<i class="fa fa-folder-open mr-1.5"></i>{{ e($show['categoryNames']) }}
</span>
@else
@@ -203,7 +203,7 @@
</a>
<div class="mt-1.5">
@if(!empty($show['categoryNames']))
<span class="inline-flex items-center px-2 py-1 category-badge text-purple-800 text-xs font-semibold rounded-full border border-purple-200">
<span class="inline-flex items-center px-2 py-1 category-badge text-blue-800 text-xs font-semibold rounded-full border border-blue-200">
<i class="fa fa-folder-open mr-1"></i>{{ e($show['categoryNames']) }}
</span>
@else
@@ -248,7 +248,7 @@
<p class="text-gray-600 mb-6 max-w-md mx-auto">
You haven't bookmarked any TV series yet. Start building your collection by browsing our series library.
</p>
<a href="{{ route('series') }}"
<a href="{{ url('/browse/TV') }}"
class="inline-flex items-center px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 shadow-md hover:shadow-lg transition-all duration-200 font-medium">
<i class="fa fa-search mr-2"></i>Browse Series Library
</a>
@@ -259,7 +259,6 @@
<script>
document.addEventListener('DOMContentLoaded', function() {
// Confirm before removing shows
document.querySelectorAll('.confirm_action').forEach(element => {
element.addEventListener('click', function(e) {
+3 -3
View File
@@ -242,10 +242,10 @@
class="text-blue-600 hover:text-blue-800 font-medium">
{{ $release->searchname }}
</a>
@if(!empty($release->failed) && $release->failed > 0)
@if(!empty($release->failed) && $release->failed->count() > 0)
<span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-red-100 text-red-800"
title="{{ $release->failed }} user(s) reported download failure">
<i class="fas fa-exclamation-triangle mr-1"></i> Failed ({{ $release->failed }})
title="{{ $release->failed->count() }} user(s) reported download failure">
<i class="fas fa-exclamation-triangle mr-1"></i> Failed ({{ $release->failed->count() }})
</span>
@endif
</div>
@@ -1,70 +0,0 @@
<div class="header">
<div class="breadcrumb-wrapper">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ url($site->home_link) }}">Home</a></li>
<li class="breadcrumb-item active">Browse Movies</li>
</ol>
</nav>
</div>
</div>
{!! $site->adbrowse ?? '' !!}
@if(count($results ?? []) > 0)
<div class="card">
<div class="card-body px-0 py-0">
<div class="table-responsive">
<table class="table table-striped table-hover data mb-0">
<thead class="thead-light">
<tr>
<th>Name</th>
<th>Category</th>
<th>Posted</th>
<th>Size</th>
<th>Files</th>
<th class="text-end">Action</th>
</tr>
</thead>
<tbody>
@foreach($results as $result)
<tr>
<td>
<div class="mb-1">
<a href="{{ url("/details/{$result->guid}") }}" class="title fw-semibold">{{ e(str_replace('.', ' ', $result->searchname ?? '')) }}</a>
</div>
</td>
<td>
<span class="badge bg-secondary text-white rounded-pill">
<i class="fa fa-folder-open me-1"></i>{{ $result->category_name ?? '' }}
</span>
</td>
<td>
<span title="{{ $result->postdate ?? '' }}">{{ isset($result->postdate) ? \Carbon\Carbon::parse($result->postdate)->diffForHumans() : '' }}</span>
</td>
<td class="text-center">
<span class="fw-medium">{{ isset($result->size) ? \App\Extensions\helper\formatBytes($result->size) : '' }}</span>
</td>
<td class="text-center">
<span class="fw-medium">{{ $result->totalpart ?? 0 }}</span>
</td>
<td class="text-end">
<div class="d-flex justify-content-end gap-2">
<a href="{{ url("/getnzb?id={$result->guid}") }}" class="btn btn-sm btn-outline-secondary">
<i class="fa fa-cloud-download"></i>
</a>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
@else
<div class="alert alert-info">
<i class="fa fa-info-circle me-2"></i>No results found.
</div>
@endif
@@ -1,109 +0,0 @@
<div class="card card-default shadow-sm mb-4">
<div class="card-header bg-light">
<div class="d-flex justify-content-between align-items-center">
<h3 class="mb-0"><i class="fa fa-film me-2 text-primary"></i>{{ ucfirst($type ?? 'add') }} Movie to Watchlist</h3>
<div class="breadcrumb-wrapper">
<nav aria-label="breadcrumb">
<ol class="breadcrumb mb-0 py-0">
<li class="breadcrumb-item"><a href="{{ url($site->home_link) }}">Home</a></li>
<li class="breadcrumb-item"><a href="{{ url('/mymovies') }}">My Movies</a></li>
<li class="breadcrumb-item active">{{ ucfirst($type ?? 'add') }} Movie</li>
</ol>
</nav>
</div>
</div>
</div>
<div class="card-body">
<div class="mb-4">
<div class="d-flex align-items-center gap-3 mb-3">
<img class="rounded shadow-sm" style="max-width:100px"
src="{{ url("/covers/movies/{$imdbid}-cover.jpg") }}"
onerror="this.src='{{ url('/covers/movies/no-cover.jpg') }}'"
alt="{{ e($movie['title'] ?? '') }}" />
<div>
<h4 class="mb-1">{{ ucfirst($type ?? 'add') }} "{{ e($movie['title'] ?? '') }}" to watchlist</h4>
<p class="text-muted mb-0">Select categories below to organize this movie in your collection.</p>
</div>
</div>
<div class="alert alert-info">
<i class="fa fa-info-circle me-2"></i>
Adding movies to your watchlist will notify you through your
<a href="{{ url("/rss/mymovies?dl=1&i={$userdata->id}&api_token={$userdata->api_token}") }}" class="alert-link">
<i class="fa fa-rss me-1"></i>RSS Feed
</a>
when they become available.
</div>
</div>
{!! Form::open(['id' => 'mymovies', 'class' => 'form', 'url' => "mymovies?id=do{$type}"]) !!}
<input type="hidden" name="imdb" value="{{ $imdbid }}"/>
@if(!empty($from))
<input type="hidden" name="from" value="{{ $from }}" />
@endif
<div class="mb-4">
<label class="form-label fw-bold mb-3">Choose Categories:</label>
<div class="d-flex flex-wrap gap-3" id="category-container">
@foreach($cat_ids ?? [] as $index => $cat_id)
<div class="category-checkbox">
<input type="checkbox"
id="category_{{ $cat_id }}"
name="category[]"
value="{{ $cat_id }}"
@if(in_array($cat_id, $cat_selected ?? [])) checked @endif>
<label for="category_{{ $cat_id }}">{{ $cat_names[$cat_id] ?? '' }}</label>
</div>
@endforeach
</div>
</div>
<div class="d-flex gap-2">
<button class="btn btn-primary" type="submit" name="{{ $type ?? 'add' }}">
<i class="fa {{ ($type ?? 'add') == 'add' ? 'fa-plus' : 'fa-edit' }} me-2"></i>{{ ucfirst($type ?? 'add') }} Movie
</button>
<a href="{{ url('/mymovies') }}" class="btn btn-outline-secondary">
<i class="fa fa-arrow-left me-2"></i>Back to My Movies
</a>
</div>
{!! Form::close() !!}
</div>
</div>
<style>
/* Style for checkboxes to make them more modern */
.category-checkbox {
display: inline-flex;
align-items: center;
}
.category-checkbox label {
display: flex;
align-items: center;
padding: 8px 15px;
margin-bottom: 0;
background-color: #f8f9fa;
border: 1px solid #dee2e6;
border-radius: 4px;
cursor: pointer;
transition: all 0.2s ease;
}
.category-checkbox label:hover {
background-color: #e9ecef;
}
.category-checkbox input[type="checkbox"] {
margin-right: 8px;
cursor: pointer;
}
.category-checkbox input[type="checkbox"]:checked ~ label,
.category-checkbox input[type="checkbox"]:checked + label {
background-color: #d1ecf1;
border-color: #4dabf7;
}
</style>
@@ -1,109 +0,0 @@
<div class="card card-default shadow-sm mb-4">
<div class="card-header bg-light">
<div class="d-flex justify-content-between align-items-center">
<h3 class="mb-0"><i class="fa fa-tv me-2 text-primary"></i>{{ ucfirst($type ?? 'add') }} Show to Watchlist</h3>
<div class="breadcrumb-wrapper">
<nav aria-label="breadcrumb">
<ol class="breadcrumb mb-0 py-0">
<li class="breadcrumb-item"><a href="{{ url($site->home_link) }}">Home</a></li>
<li class="breadcrumb-item"><a href="{{ url('/myshows') }}">My Shows</a></li>
<li class="breadcrumb-item active">{{ ucfirst($type ?? 'add') }} Show</li>
</ol>
</nav>
</div>
</div>
</div>
<div class="card-body">
<div class="mb-4">
<div class="d-flex align-items-center gap-3 mb-3">
<img class="rounded shadow-sm" style="max-width:100px"
src="{{ url("/covers/tvshows/{$video}_thumb.jpg") }}"
onerror="this.src='{{ url('/covers/tvshows/no-cover.jpg') }}'"
alt="{{ e($show['title'] ?? '') }}" />
<div>
<h4 class="mb-1">{{ ucfirst($type ?? 'add') }} "{{ e($show['title'] ?? '') }}" to watchlist</h4>
<p class="text-muted mb-0">Select categories below to organize this show in your collection.</p>
</div>
</div>
<div class="alert alert-info">
<i class="fa fa-info-circle me-2"></i>
Adding shows to your watchlist will notify you through your
<a href="{{ url("/rss/myshows?dl=1&i={$userdata->id}&api_token={$userdata->api_token}") }}" class="alert-link">
<i class="fa fa-rss me-1"></i>RSS Feed
</a>
when new episodes become available.
</div>
</div>
{!! Form::open(['id' => 'myshows', 'class' => 'form', 'url' => "myshows?action=do{$type}"]) !!}
<input type="hidden" name="id" value="{{ $video }}"/>
@if(!empty($from))
<input type="hidden" name="from" value="{{ $from }}" />
@endif
<div class="mb-4">
<label class="form-label fw-bold mb-3">Choose Categories:</label>
<div class="d-flex flex-wrap gap-3" id="category-container">
@foreach($cat_ids ?? [] as $index => $cat_id)
<div class="category-checkbox">
<input type="checkbox"
id="category_{{ $cat_id }}"
name="category[]"
value="{{ $cat_id }}"
@if(in_array($cat_id, $cat_selected ?? [])) checked @endif>
<label for="category_{{ $cat_id }}">{{ $cat_names[$cat_id] ?? '' }}</label>
</div>
@endforeach
</div>
</div>
<div class="d-flex gap-2">
<button class="btn btn-primary" type="submit" name="{{ $type ?? 'add' }}">
<i class="fa {{ ($type ?? 'add') == 'add' ? 'fa-plus' : 'fa-edit' }} me-2"></i>{{ ucfirst($type ?? 'add') }} Show
</button>
<a href="{{ url('/myshows') }}" class="btn btn-outline-secondary">
<i class="fa fa-arrow-left me-2"></i>Back to My Shows
</a>
</div>
{!! Form::close() !!}
</div>
</div>
<style>
/* Style for checkboxes to make them more modern */
.category-checkbox {
display: inline-flex;
align-items: center;
}
.category-checkbox label {
display: flex;
align-items: center;
padding: 8px 15px;
margin-bottom: 0;
background-color: #f8f9fa;
border: 1px solid #dee2e6;
border-radius: 4px;
cursor: pointer;
transition: all 0.2s ease;
}
.category-checkbox label:hover {
background-color: #e9ecef;
}
.category-checkbox input[type="checkbox"] {
margin-right: 8px;
cursor: pointer;
}
.category-checkbox input[type="checkbox"]:checked ~ label,
.category-checkbox input[type="checkbox"]:checked + label {
background-color: #d1ecf1;
border-color: #4dabf7;
}
</style>