mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-23 03:34:22 -05:00
update: subtitle views
This commit is contained in:
@@ -1,180 +1,174 @@
|
||||
<div>
|
||||
<div class="container-fluid">
|
||||
<div class="block">
|
||||
<div class="container box search mt-5 fatten-me form-horizontal form-condensed form-torrent-search form-bordered">
|
||||
<div class="mx-0 mt-5 form-group fatten-me">
|
||||
<label for="search"
|
||||
class="mt-5 col-sm-1 label label-default fatten-me">{{ __('torrent.name') }}</label>
|
||||
<div class="col-sm-9 fatten-me">
|
||||
<label for="search"></label>
|
||||
<input wire:model="search" type="text" class="form-control" placeholder="{{ __('torrent.name') }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mx-0 mt-5 form-group fatten-me">
|
||||
<label for="language_id"
|
||||
class="mt-5 col-sm-1 label label-default fatten-me">{{ __('common.language') }}</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control" wire:model="language">
|
||||
<option value="">--{{ __('common.select') }} {{ __('common.language') }}--</option>
|
||||
<div class="sidebar2 sidebar--inverse">
|
||||
<div>
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ __('common.subtitles') }}</h2>
|
||||
<div class="data-table-wrapper">
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="torrents-icon"></th>
|
||||
<th wire:click="sortBy('title')" role="columnheader button">
|
||||
{{ __('torrent.torrent') }}
|
||||
@include('livewire.includes._sort-icon', ['field' => 'title'])
|
||||
</th>
|
||||
<th wire:click="sortBy('language_id')" role="columnheader button">
|
||||
{{ __('common.language') }}
|
||||
@include('livewire.includes._sort-icon', ['field' => 'language_id'])
|
||||
</th>
|
||||
<th wire:click="sortBy('extension')" role="columnheader button">
|
||||
{{ __('subtitle.extension') }}
|
||||
@include('livewire.includes._sort-icon', ['field' => 'extension'])
|
||||
</th>
|
||||
<th wire:click="sortBy('file_size')" role="columnheader button">
|
||||
{{ __('subtitle.size') }}
|
||||
@include('livewire.includes._sort-icon', ['field' => 'file_size'])
|
||||
</th>
|
||||
<th wire:click="sortBy('downloads')" role="columnheader button">
|
||||
{{ __('subtitle.downloads') }}
|
||||
@include('livewire.includes._sort-icon', ['field' => 'downloads'])
|
||||
</th>
|
||||
<th wire:click="sortBy('created_at')" role="columnheader button">
|
||||
{{ __('subtitle.uploaded') }}
|
||||
@include('livewire.includes._sort-icon', ['field' => 'created_at'])
|
||||
</th>
|
||||
<th wire:click="sortBy('user_id')" role="columnheader button">
|
||||
{{ __('subtitle.uploader') }}
|
||||
@include('livewire.includes._sort-icon', ['field' => 'user_id'])
|
||||
</th>
|
||||
<th>{{ __('common.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($subtitles as $subtitle)
|
||||
<tr>
|
||||
<td>
|
||||
@if ($subtitle->torrent->category->image === null)
|
||||
<i
|
||||
class="{{ $subtitle->torrent->category->icon }} torrent-icon"
|
||||
title="{{ $subtitle->torrent->category->name }} {{ strtolower(__('torrent.torrent')) }}"
|
||||
></i>
|
||||
@else
|
||||
<img
|
||||
src="{{ url('files/img/' . $subtitle->torrent->category->image) }}"
|
||||
title="{{$subtitle->torrent->category->name }} {{ strtolower(__('torrent.torrent')) }}"
|
||||
alt="{{ $subtitle->torrent->category->name }}"
|
||||
>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ route('torrent', ['id' => $subtitle->torrent->id]) }}">
|
||||
{{ $subtitle->torrent->name }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ $subtitle->language->name }}
|
||||
<i class="{{ config("other.font-awesome") }} fa-closed-captioning" title="{{ $subtitle->note }}"></i>
|
||||
</td>
|
||||
<td>{{ $subtitle->extension }}</td>
|
||||
<td>{{ $subtitle->getSize() }}</td>
|
||||
<td>{{ $subtitle->downloads }}</td>
|
||||
<td>
|
||||
<time datetime="{{ $subtitle->created_at }}" title="{{ $subtitle->created_at }}">
|
||||
{{ $subtitle->created_at->diffForHumans() }}
|
||||
</time>
|
||||
</td>
|
||||
<td>
|
||||
<x-user_tag :user="$subtitle->user" :anon="$subtitle->anon" />
|
||||
</td>
|
||||
<td>
|
||||
<menu class="data-table__actions">
|
||||
<li class="data-table__action">
|
||||
<a
|
||||
class="form__button form__button--text"
|
||||
href="{{ route('subtitles.download', ['id' => $subtitle->id]) }}"
|
||||
>
|
||||
{{ __('common.download') }}
|
||||
</a>
|
||||
</li>
|
||||
</menu>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{ $subtitles->links('partials.pagination') }}
|
||||
</section>
|
||||
</div>
|
||||
<aside>
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ __('torrent.filters') }}</h2>
|
||||
<div class="panel__body">
|
||||
<form class="form">
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="search"
|
||||
wire:model="search"
|
||||
type="search"
|
||||
class="form__text"
|
||||
placeholder=""
|
||||
>
|
||||
<label for="search" class="form__label form__label--floating">
|
||||
{{ __('torrent.name') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<select
|
||||
id="language_id"
|
||||
class="form__select"
|
||||
wire:model="language"
|
||||
x-data="{ language: '' }"
|
||||
x-model="language"
|
||||
x-bind:class="language === '' ? 'form__select--default' : ''"
|
||||
>
|
||||
<option hidden disabled selected value=""></option>
|
||||
@foreach (App\Models\MediaLanguage::all()->sortBy('name') as $media_language)
|
||||
<option value="{{ $media_language->id }}">{{ $media_language->name }}
|
||||
({{ $media_language->code }})
|
||||
<option class="form__option" value="{{ $media_language->id }}">
|
||||
{{ $media_language->name }} ({{ $media_language->code }})
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<label for="language_id" class="form__label form__label--floating">
|
||||
{{ __('common.language') }}
|
||||
</label>
|
||||
</p>
|
||||
<div class="form__group">
|
||||
<fieldset class="form__fieldset">
|
||||
<legend class="form__legend">{{ __('common.category') }}</legend>
|
||||
<div class="form__fieldset-checkbox-container--shrink">
|
||||
@foreach (App\Models\Category::all()->sortBy('position') as $category)
|
||||
<p class="form__group">
|
||||
<label class="form__label">
|
||||
<input
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
value="{{ $category->id }}"
|
||||
wire:model="categories"
|
||||
>
|
||||
{{ $category->name }}
|
||||
</label>
|
||||
</p>
|
||||
@endforeach
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mx-0 mt-5 form-group fatten-me">
|
||||
<label for="categories"
|
||||
class="mt-5 col-sm-1 label label-default fatten-me">{{ __('common.category') }}</label>
|
||||
<div class="col-sm-9">
|
||||
@foreach (App\Models\Category::all()->sortBy('position') as $category)
|
||||
<span class="badge-user">
|
||||
<label class="inline">
|
||||
<input type="checkbox" wire:model="categories" value="{{ $category->id }}"> {{ $category->name }}
|
||||
</label>
|
||||
</span>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mx-0 mt-5 form-group fatten-me">
|
||||
<label for="perPage"
|
||||
class="mt-5 col-sm-1 label label-default fatten-me">{{ __('common.quantity') }}</label>
|
||||
<div class="col-sm-2">
|
||||
<select wire:model="perPage" class="form-control">
|
||||
<option value="25">25</option>
|
||||
<option value="50">50</option>
|
||||
<option value="100">100</option>
|
||||
<p class="form__group">
|
||||
<select
|
||||
id="quantity"
|
||||
class="form__select"
|
||||
wire:model="perPage"
|
||||
required
|
||||
>
|
||||
<option>25</option>
|
||||
<option>50</option>
|
||||
<option>100</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<label class="form__label form__label--floating">
|
||||
{{ __('common.quantity') }}
|
||||
</label>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<br>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-condensed table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="torrents-icon"></th>
|
||||
<th class="torrents-filename">
|
||||
<div sortable wire:click="sortBy('title')"
|
||||
:direction="$sortField === 'title' ? $sortDirection : null" role="button">
|
||||
{{ __('torrent.torrent') }}
|
||||
@include('livewire.includes._sort-icon', ['field' => 'title'])
|
||||
</div>
|
||||
</th>
|
||||
<th>
|
||||
<div sortable wire:click="sortBy('language_id')"
|
||||
:direction="$sortField === 'language_id' ? $sortDirection : null" role="button">
|
||||
{{ __('common.language') }}
|
||||
@include('livewire.includes._sort-icon', ['field' => 'language_id'])
|
||||
</div>
|
||||
</th>
|
||||
<th>{{ __('common.download') }}</th>
|
||||
<th>
|
||||
<div sortable wire:click="sortBy('extension')"
|
||||
:direction="$sortField === 'extension' ? $sortDirection : null" role="button">
|
||||
{{ __('subtitle.extension') }}
|
||||
@include('livewire.includes._sort-icon', ['field' => 'extension'])
|
||||
</div>
|
||||
</th>
|
||||
<th>
|
||||
<div sortable wire:click="sortBy('file_size')"
|
||||
:direction="$sortField === 'file_size' ? $sortDirection : null" role="button">
|
||||
{{ __('subtitle.size') }}
|
||||
@include('livewire.includes._sort-icon', ['field' => 'file_size'])
|
||||
</div>
|
||||
</th>
|
||||
<th>
|
||||
<div sortable wire:click="sortBy('downloads')"
|
||||
:direction="$sortField === 'downloads' ? $sortDirection : null" role="button">
|
||||
{{ __('subtitle.downloads') }}
|
||||
@include('livewire.includes._sort-icon', ['field' => 'downloads'])
|
||||
</div>
|
||||
</th>
|
||||
<th>
|
||||
<div sortable wire:click="sortBy('created_at')"
|
||||
:direction="$sortField === 'created_at' ? $sortDirection : null" role="button">
|
||||
{{ __('subtitle.uploaded') }}
|
||||
@include('livewire.includes._sort-icon', ['field' => 'created_at'])
|
||||
</div>
|
||||
</th>
|
||||
<th>
|
||||
<div sortable wire:click="sortBy('user_id')"
|
||||
:direction="$sortField === 'user_id' ? $sortDirection : null" role="button">
|
||||
{{ __('subtitle.uploader') }}
|
||||
@include('livewire.includes._sort-icon', ['field' => 'user_id'])
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($subtitles as $subtitle)
|
||||
<tr>
|
||||
<td>
|
||||
@if ($subtitle->torrent->category->image != null)
|
||||
<div class="text-center">
|
||||
<img src="{{ url('files/img/' . $subtitle->torrent->category->image) }}"
|
||||
data-toggle="tooltip"
|
||||
data-original-title="{{$subtitle->torrent->category->name }} {{ strtolower(__('torrent.torrent')) }}"
|
||||
alt="{{ $subtitle->torrent->category->name }}">
|
||||
</div>
|
||||
@else
|
||||
<div class="text-center">
|
||||
<i class="{{ $subtitle->torrent->category->icon }} torrent-icon"
|
||||
data-toggle="tooltip"
|
||||
data-original-title="{{ $subtitle->torrent->category->name }} {{ strtolower(__('torrent.torrent')) }}"></i>
|
||||
</div>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a class="movie-title" href="{{ route('torrent', ['id' => $subtitle->torrent->id]) }}">
|
||||
{{ $subtitle->torrent->name }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ $subtitle->language->name }}
|
||||
<i class="{{ config("other.font-awesome") }} fa-closed-captioning" data-toggle="tooltip"
|
||||
data-title="{{ $subtitle->note }}"></i>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ route('subtitles.download', ['id' => $subtitle->id]) }}"
|
||||
class="btn btn-xs btn-warning">{{ __('common.download') }}</a>
|
||||
</td>
|
||||
<td>{{ $subtitle->extension }}</td>
|
||||
<td>{{ $subtitle->getSize() }}</td>
|
||||
<td>{{ $subtitle->downloads }}</td>
|
||||
<td>{{ $subtitle->created_at->diffForHumans() }}</td>
|
||||
<td>
|
||||
@if ($subtitle->anon == true)
|
||||
<span class="badge-user text-orange text-bold">{{ strtoupper(__('common.anonymous')) }}
|
||||
@if (auth()->user()->id == $subtitle->user_id || auth()->user()->group->is_modo)
|
||||
<a href="{{ route('users.show', ['username' => $subtitle->user->username]) }}">
|
||||
({{ $subtitle->user->username }})
|
||||
</a>
|
||||
@endif
|
||||
</span>
|
||||
@else
|
||||
<a href="{{ route('users.show', ['username' => $subtitle->user->username]) }}">
|
||||
<span class="badge-user text-bold"
|
||||
style="color:{{ $subtitle->user->group->color }}; background-image:{{ $subtitle->user->group->effect }};">
|
||||
<i class="{{ $subtitle->user->group->icon }}" data-toggle="tooltip"
|
||||
data-original-title="{{ $subtitle->user->group->name }}"></i>
|
||||
{{ $subtitle->user->username }}
|
||||
</span>
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="text-center">
|
||||
{{ $subtitles->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
@@ -15,76 +15,109 @@
|
||||
</li>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<h2 class="upload-title">
|
||||
{{ __('common.upload') }} {{ __('common.subtitle') }} - {{ $torrent->name }}
|
||||
@section('page', 'page__subtitle--create')
|
||||
|
||||
@section('main')
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">
|
||||
{{ __('common.upload') }} {{ __('common.subtitle') }}
|
||||
</h2>
|
||||
<div class="well">
|
||||
<h2 class="text-center">{{ __('subtitle.rules-title') }}</h2>
|
||||
{{ __('subtitle.rules') }}
|
||||
</div>
|
||||
<div class="block">
|
||||
<form method="POST" action="{{ route('subtitles.store') }}" id="form_upload_subtitle"
|
||||
class="form-horizontal" enctype="multipart/form-data">
|
||||
<div class="panel__body">
|
||||
<form
|
||||
id="form_upload_subtitle"
|
||||
class="form"
|
||||
action="{{ route('subtitles.store') }}"
|
||||
enctype="multipart/form-data"
|
||||
method="POST"
|
||||
>
|
||||
@csrf
|
||||
<input name="torrent_id" type="hidden" value="{{ $torrent->id }}">
|
||||
<input name="torrent_name" type="hidden" value="{{ $torrent->name }}">
|
||||
<div class="form-group">
|
||||
<label for="torrent_id" class="col-sm-2 control-label">{{ __('torrent.torrent') }}</label>
|
||||
<div class="col-sm-9">
|
||||
<p class="form-control-static">
|
||||
<a href="{{ route('torrent', ['id' => $torrent->id]) }}"
|
||||
title="{{ $torrent->name }}">{{ $torrent->name }}</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="subtitle_file" class="col-sm-2 control-label">{{ __('subtitle.subtitle-file') }}</label>
|
||||
<div class="col-sm-9">
|
||||
<input class="form-control" name="subtitle_file" accept=".srt,.ass,.sup,.zip" type="file"
|
||||
id="subtitle_file">
|
||||
<span class="help-block">{{ __('subtitle.subtitle-file-types') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="language_id" class="col-sm-2 control-label">{{ __('common.language') }}</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control" id="language_id" name="language_id">
|
||||
@foreach ($media_languages as $media_language)
|
||||
<option value="{{ $media_language->id }}">{{ $media_language->name }}
|
||||
({{ $media_language->code }})
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="col-sm-2 control-label">{{ __('subtitle.note') }}</label>
|
||||
<div class="col-sm-9">
|
||||
<input class="form-control" name="note" type="text" id="note">
|
||||
<span class="help-block">{{ __('subtitle.note-help') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="anonymous" class="col-sm-2 control-label">{{ __('common.anonymous') }}?</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="radio-inline">
|
||||
<input type="radio" name="anonymous" value="1">{{ __('common.yes') }}
|
||||
</div>
|
||||
<div class="radio-inline">
|
||||
<input type="radio" name="anonymous" checked="checked" value="0">{{ __('common.no') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-9 col-sm-offset-2">
|
||||
<input class="btn btn-primary" type="submit" value="{{ __('common.upload') }}">
|
||||
</div>
|
||||
</div>
|
||||
<p class="form__group">
|
||||
<label for="subtitle_file" class="form__label">
|
||||
{{ __('subtitle.subtitle-file') }} ({{ __('subtitle.subtitle-file-types') }})
|
||||
</label>
|
||||
<input
|
||||
id="subtitle_file"
|
||||
class="form__file"
|
||||
accept=".srt,.ass,.sup,.zip"
|
||||
name="subtitle_file"
|
||||
required
|
||||
type="file"
|
||||
>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<select
|
||||
id="language_id"
|
||||
class="form__select"
|
||||
name="language_id"
|
||||
required
|
||||
>
|
||||
<option hidden disabled selected value=""></option>
|
||||
@foreach ($media_languages as $media_language)
|
||||
<option value="{{ $media_language->id }}" @selected(old('media_language') == $media_language->id)>
|
||||
{{ $media_language->code }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<label class="form__label form__label--floating" for="language_id">
|
||||
{{ __('common.language') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<input
|
||||
type="text"
|
||||
name="note"
|
||||
id="note"
|
||||
class="form__text"
|
||||
placeholder=""
|
||||
>
|
||||
<label class="form__label form__label--floating" for="note">
|
||||
{{ __('subtitle.note') }} ({{ __('subtitle.note-help') }})
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<input type="hidden" name="anonymous" value="0">
|
||||
<input
|
||||
id="anonymous"
|
||||
class="form__checkbox"
|
||||
name="anonymous"
|
||||
type="checkbox"
|
||||
value="1"
|
||||
@checked(old('anonymous'))
|
||||
>
|
||||
<label class="form__label" for="anonymous">{{ __('common.anonymous') }}?</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<button class="form__button form__button--filled">
|
||||
{{ __('common.upload') }}
|
||||
</button>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@section('sidebar')
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ __('torrent.torrent') }}</label>
|
||||
<div class="panel__body">
|
||||
<a
|
||||
href="{{ route('torrent', ['id' => $torrent->id]) }}"
|
||||
title="{{ $torrent->name }}"
|
||||
>
|
||||
{{ $torrent->name }}
|
||||
</a>
|
||||
</div>
|
||||
</section>
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ __('subtitle.rules-title') }}</h2>
|
||||
<div class="panel__body">
|
||||
<ol>
|
||||
@foreach(Str::of(__('subtitle.rules'))->replace(['<ul>', '</ul>', '<li>', '</li>'], '')->trim()->explode("\n") as $rule)
|
||||
<li>{{ $rule }}</li>
|
||||
@endforeach
|
||||
</ol>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
</li>
|
||||
@endsection
|
||||
|
||||
@section('page', 'page__subtitle--index')
|
||||
|
||||
@section('content')
|
||||
<div>
|
||||
@livewire('subtitle-search')
|
||||
</div>
|
||||
@endsection
|
||||
@livewire('subtitle-search')
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user