Add ability for mods to edit episode & Refactor code
This commit is contained in:
@@ -148,6 +148,36 @@
|
||||
</a>
|
||||
@endauth
|
||||
</div>
|
||||
|
||||
@if(auth()->check() && (auth()->user()->hasRole(\App\Enums\UserRole::ADMINISTRATOR) || auth()->user()->hasRole(\App\Enums\UserRole::MODERATOR)))
|
||||
<div class="flex flex-wrap flex-row-reverse gap-2">
|
||||
@if(auth()->user()->hasRole(\App\Enums\UserRole::ADMINISTRATOR))
|
||||
<a
|
||||
data-te-toggle="modal"
|
||||
data-te-target="#modalAddSubtitles"
|
||||
class="inline-flex cursor-pointer items-center gap-2 rounded-xl border border-gray-300 bg-white px-4 py-2 text-sm font-semibold text-gray-700 transition hover:bg-gray-100 dark:border-white/10 dark:bg-white/5 dark:text-gray-200 dark:hover:bg-white/10">
|
||||
<i class="fa-solid fa-plus"></i>
|
||||
Add Subtitles
|
||||
</a>
|
||||
|
||||
<a
|
||||
data-te-toggle="modal"
|
||||
data-te-target="#modalUploadEpisode"
|
||||
class="inline-flex cursor-pointer items-center gap-2 rounded-xl border border-gray-300 bg-white px-4 py-2 text-sm font-semibold text-gray-700 transition hover:bg-gray-100 dark:border-white/10 dark:bg-white/5 dark:text-gray-200 dark:hover:bg-white/10">
|
||||
<i class="fa-solid fa-plus"></i>
|
||||
Add Episode
|
||||
</a>
|
||||
@endif
|
||||
|
||||
<a
|
||||
data-te-toggle="modal"
|
||||
data-te-target="#modalEditEpisode"
|
||||
class="inline-flex cursor-pointer items-center gap-2 rounded-xl border border-gray-300 bg-white px-4 py-2 text-sm font-semibold text-gray-700 transition hover:bg-gray-100 dark:border-white/10 dark:bg-white/5 dark:text-gray-200 dark:hover:bg-white/10">
|
||||
<i class="fa-solid fa-pen"></i>
|
||||
Edit Episode
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user