mirror of
https://github.com/BillyOutlast/UNIT3D.git
synced 2026-02-04 03:01:20 +01:00
add: description to playlist categories
This commit is contained in:
@@ -37,6 +37,10 @@ class StorePlaylistCategoryRequest extends FormRequest
|
||||
'numeric',
|
||||
'decimal:0',
|
||||
],
|
||||
'description' => [
|
||||
'required',
|
||||
'string',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,10 @@ class UpdatePlaylistCategoryRequest extends FormRequest
|
||||
'numeric',
|
||||
'decimal:0',
|
||||
],
|
||||
'description' => [
|
||||
'required',
|
||||
'string',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property int $position
|
||||
* @property string $description
|
||||
*/
|
||||
class PlaylistCategory extends Model
|
||||
{
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D Community Edition is open-sourced software licensed under the GNU Affero General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D Community Edition
|
||||
*
|
||||
* @author Roardom <roardom@protonmail.com>
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
*/
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class () extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('playlist_categories', function (Blueprint $table): void {
|
||||
$table->text('description');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -47,6 +47,17 @@
|
||||
{{ __('common.position') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<textarea
|
||||
id="description"
|
||||
name="description"
|
||||
class="form__textarea"
|
||||
placeholder=" "
|
||||
></textarea>
|
||||
<label class="form__label form__label--floating" for="description">
|
||||
{{ __('common.description') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<button class="form__button form__button--filled">
|
||||
{{ __('common.submit') }}
|
||||
|
||||
@@ -57,6 +57,19 @@
|
||||
{{ __('common.position') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<textarea
|
||||
id="description"
|
||||
name="description"
|
||||
class="form__textarea"
|
||||
placeholder=" "
|
||||
>
|
||||
{{ $playlistCategory->description }}</textarea
|
||||
>
|
||||
<label class="form__label form__label--floating" for="description">
|
||||
{{ __('common.description') }}
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<button class="form__button form__button--filled">
|
||||
{{ __('common.submit') }}
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
<th>ID</th>
|
||||
<th>{{ __('common.position') }}</th>
|
||||
<th>{{ __('common.name') }}</th>
|
||||
<th>{{ __('common.description') }}</th>
|
||||
<th>{{ __('common.action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -48,6 +49,7 @@
|
||||
{{ $playlistCategory->name }}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ $playlistCategory->description }}</td>
|
||||
<td>
|
||||
<menu class="data-table__actions">
|
||||
<li class="data-table__action">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@extends('layout.with-main')
|
||||
@extends('layout.with-main-and-sidebar')
|
||||
|
||||
@section('title')
|
||||
<title>{{ __('playlist.title') }} - {{ config('other.title') }}</title>
|
||||
@@ -95,3 +95,25 @@
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@section('sidebar')
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ __('torrent.categories') }}</h2>
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('torrent.category') }}</th>
|
||||
<th>{{ __('torrent.description') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($playlistCategories as $playlistCategory)
|
||||
<tr>
|
||||
<td>{{ $playlistCategory->name }}</td>
|
||||
<td>{{ $playlistCategory->description }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user