update: staff views

This commit is contained in:
Roardom
2022-08-19 23:38:24 -05:00
parent bd0c3472b5
commit 790db77252
94 changed files with 7058 additions and 4922 deletions
+5 -2
View File
@@ -24,15 +24,18 @@ class BbcodeInput extends Component
public bool $isPreviewEnabled = false;
public bool $isRequired = false;
public string $contentBbcode = '';
public string $contentHtml = '';
final public function mount($name, $label)
final public function mount($name, $label, $required = false, $content = null)
{
$this->name = $name;
$this->label = $label;
$this->contentBbcode = old($name) ?? '';
$this->isRequired = $required;
$this->contentBbcode = $content ?? old($name) ?? '';
}
final public function updatedIsPreviewEnabled(): void
+8
View File
@@ -16,21 +16,28 @@
@import 'main/aboutus';
@import 'chat/chatbox';
@import 'main/tooltips';
@import 'base/typography';
@import 'components/achievement';
@import 'components/article-preview';
@import 'components/bbcode-input';
@import 'components/chip';
@import 'components/data-table';
@import 'components/dialog';
@import 'components/form/button';
@import 'components/form/checkbox';
@import 'components/form/fieldset.scss';
@import 'components/form/file';
@import 'components/form/form-group';
@import 'components/form/form';
@import 'components/form/label';
@import 'components/form/legend';
@import 'components/form/meter.scss';
@import 'components/form/radio';
@import 'components/form/select';
@import 'components/form/text';
@import 'components/form/textarea';
@import 'components/key-value';
@import 'components/pagination';
@import 'components/panel';
@import 'components/quick_search';
@import 'components/user-active';
@@ -42,4 +49,5 @@
@import 'layout/top_nav';
@import 'pages/error';
@import 'pages/home';
@import 'pages/staff';
@import 'pages/torrents';
+37
View File
@@ -0,0 +1,37 @@
.fa:before,
.fas:before {
font-family: 'Font Awesome 5 Pro';
font-weight: 900;
}
.fab:before {
font-family: 'Font Awesome 5 Brands';
}
.fad:before {
font-family: 'Font Awesome 5 Duotone';
}
.far:before {
font-weight: 400;
}
.fal:before,
.far:before {
font-family: 'Font Awesome 5 Pro';
}
.fa:before,
.fab:before,
.fad:before,
.fal:before,
.far:before,
.fas:before {
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
text-rendering: auto;
display: inline-block;
font-style: normal;
font-variant: normal;
line-height: 1;
}
+10
View File
@@ -0,0 +1,10 @@
.chip--anonymous__link {
opacity: 0.8;
font-weight: 200 !important;
white-space: nowrap;
}
.chip--user__link {
font-family: var(--font);
white-space: nowrap;
}
@@ -0,0 +1,78 @@
.data-table {
width: 100%;
border: 0;
color: var(--panel-fg);
border-collapse: collapse;
}
.data-table-wrapper {
overflow-x: scroll;
}
/* header */
.data-table > tr > th,
.data-table > thead > tr > th,
.data-table > tbody > tr > th,
.data-table > tfoot > tr > th {
background-color: var(--data-table-th-bg);
border-bottom: var(--data-table-thead-border);
text-align: left;
padding: 7px;
font-size: 12px;
font-weight: bold;
}
/* cell */
.data-table > tr > td,
.data-table > thead > tr > td,
.data-table > tbody > tr > td,
.data-table > tfoot > tr > td {
padding: 7px;
font-size: 14px;
border-bottom: 1px solid #333;
}
.data-table tr:nth-child(even) > td {
background-color: var(--data-table-tr-even-bg);
}
.data-table tr:nth-child(odd) > td {
background-color: var(--data-table-tr-odd-bg);
}
/* hovered row */
.data-table > tr:hover > td,
.data-table > thead > tr:hover > td,
.data-table > tbody > tr:hover > td,
.data-table > tfoot > tr:hover > td {
background-color: var(--data-table-tr-even-bg);
}
/* footer */
.data-table > tfoot > tr > td {
border-top: var(--data-table-tfoot-border);
font-weight: bold;
font-size: 12px;
}
/* Actions */
.data-table__actions {
display: flex;
justify-content: end;
gap: 18px;
margin: 0;
padding: 0;
list-style-type: none;
}
.data-table__action {
display: contents;
@media (hover: hover) {
visibility: hidden;
}
.data-table tr:hover & {
visibility: visible;
}
}
+57
View File
@@ -0,0 +1,57 @@
.dialog {
border: none;
background-color: transparent;
border-radius: var(--dialog-border-radius);
padding: 0;
color: inherit;
max-height: calc(100% - 12px);
overflow-y: auto;
width: 500px;
max-width: calc(100% - 12px);
}
.dialog::backdrop {
background-color: rgba(0, 0, 0, 0.67);
}
.dialog__form {
border: var(--dialog-border);
background-color: var(--dialog-bg);
box-shadow: var(--dialog-box-shadow);
contain: content;
height: fit-content;
padding: 20px;
display: flex;
flex-direction: column;
gap: 16px;
}
.dialog__heading,
.dialog__buttons {
background-color: var(--dialog-head-bg);
color: var(--dialog-head-fg);
display: block;
margin: 0;
}
.dialog__heading {
padding: 14px 18px;
font-size: 14px;
color: var(--dialog-head-fg);
text-align: left;
line-height: 1.5;
}
.dialog__buttons {
padding: 9px;
display: flex;
justify-content: end;
column-gap: 9px;
}
.dialog__body {
padding: 18px;
font-size: 14px;
display: flow-root;
color: var(--dialog-fg);
}
+8 -1
View File
@@ -8,7 +8,6 @@
.key-value dt,
.key-value dd {
padding: calc(var(--key-value-padding) / 2) var(--key-value-padding);
font-size: 13px;
line-height: 1;
font-weight: normal;
@@ -24,8 +23,16 @@
padding-bottom: var(--key-value-padding);
}
.key-value dt {
text-align: left;
padding: calc(var(--key-value-padding) / 2) calc(var(--key-value-padding) / 2) calc(var(--key-value-padding) / 2)
var(--key-value-padding);
}
.key-value dd {
text-align: right;
padding: calc(var(--key-value-padding) / 2) var(--key-value-padding) calc(var(--key-value-padding) / 2)
calc(var(--key-value-padding) / 2);
}
.key-value dt:nth-child(4n + 1),
+105
View File
@@ -0,0 +1,105 @@
.pagination {
margin: 0;
display: flex;
justify-content: center;
max-width: 100vw;
background-color: var(--paginate-bg);
}
.pagination__items {
display: flex;
margin: 0 auto;
padding: 0;
list-style-type: none;
min-width: 0;
}
.pagination__previous,
.pagination__next {
width: 90px;
white-space: nowrap;
height: 40px;
line-height: 40px;
font-size: 14px;
color: var(--paginate-fg);
background-color: var(--paginate-bg);
text-align: center;
display: block;
}
.pagination__previous:not(.pagination__previous--disabled):not(:hover)::after {
content: '';
width: 1px;
height: 26px;
background: var(--paginate-divider);
position: absolute;
right: 0px;
top: 7px;
}
.pagination__next:not(.pagination__next--disabled):not(:hover)::before {
content: '';
width: 1px;
height: 26px;
background: var(--paginate-divider);
position: absolute;
left: 0px;
top: 7px;
}
.pagination__page-wrapper {
overflow-x: auto;
}
.pagination__pages {
display: flex;
margin: 0 auto;
padding: 0;
list-style-type: none;
}
.pagination__link {
display: block;
width: 40px;
height: 40px;
line-height: 40px;
font-size: 14px;
color: var(--paginate-fg);
background-color: var(--paginate-bg);
text-align: center;
}
.pagination__link.pagination__link:hover,
.pagination__previous:not(.pagination__previous--disabled):hover,
.pagination__next:not(.pagination__next--disabled):hover {
background-color: var(--paginate-bg-hover) !important;
}
.pagination__ellipsis {
background-color: var(--paginate-bg);
width: 40px;
min-width: 40px;
height: 40px;
line-height: 40px;
font-size: 14px;
text-align: center;
color: var(--paginate-fg-disabled);
cursor: default;
}
.pagination__current {
font-weight: 900;
background-color: var(--paginate-bg-current);
width: 40px;
min-width: 40px;
height: 40px;
line-height: 40px;
font-size: 14px;
text-align: center;
color: var(--paginate-fg-disabled);
cursor: default;
}
.pagination__ellipsis.pagination__ellipsis:hover {
background-color: var(--paginate-bg) !important;
}
+9 -1
View File
@@ -14,6 +14,7 @@
border-radius: var(--panel-border-radius);
contain: content;
height: fit-content;
break-inside: avoid;
}
.panel__header {
@@ -42,16 +43,19 @@
.panel__actions {
display: flex;
flex-direction: row;
flex-wrap: wrap;
gap: 16px;
align-items: center;
padding-right: 12px;
padding: 4px 4px 4px 12px;
color: var(--panel-action-fg);
background-color: var(--panel-head-bg);
}
.panel__action {
flex-shrink: 0;
color: var(--panel-action-fg);
font-size: 14px;
background-color: var(--panel-head-bg);
}
.panel__body {
@@ -62,3 +66,7 @@
background-color: var(--panel-bg);
overflow-wrap: break-word;
}
.panel--grid-item {
height: 100%;
}
@@ -5,6 +5,7 @@
margin: 6px;
padding: 8px 12px;
align-self: flex-start;
filter: brightness(1);
transition: filter 300ms;
&:hover {
@@ -17,6 +18,12 @@
}
}
/* Centered text */
.form__button--centered {
text-align: center;
}
/* Filled */
.form__button--filled {
@@ -0,0 +1,22 @@
.form__fieldset {
background-color: inherit;
border: var(--input-text-border);
border-radius: 5px;
color: var(--input-text-fg);
font-size: 14px;
font-weight: normal;
max-width: 100%;
outline: none;
padding: 6px 12px 12px 12px;
width: 100%;
height: 100%;
}
/* Firefox/Chrome don't seem to let you use `resize` on a fieldset element, so this has to be used instead */
.form__fieldset-checkbox-container {
margin: -6px -12px -12px -12px;
padding: 6px 12px 12px 12px;
height: 160px;
overflow-y: auto;
resize: vertical;
}
@@ -4,6 +4,7 @@
background-color: inherit;
position: relative;
margin-top: 0 !important; /* Can be removed once site-wide `p` styles are removed */
width: 100%;
}
.form__group--horizontal {
@@ -1,3 +1,6 @@
.form__legend {
all: revert !important; /* Can be removed once site-wide `legend` styling is removed */
font-size: 11px !important;
color: var(--label-fg) !important;
}
+15
View File
@@ -0,0 +1,15 @@
.form__meter {
--meter-fg: #333;
--meter-bg: #505050;
background: var(--meter-bg);
appearance: none;
border: 2px solid var(--meter-bg);
border-radius: 4px;
height: 22px;
max-width: 100%;
width: 100%;
}
.form__meter::-moz-meter-bar {
background: var(--meter-fg);
}
+18
View File
@@ -27,6 +27,14 @@
--button-text-border-radius: 5px;
--button-text-fg: currentColor;
--dialog-bg: #e2e2e2;
--dialog-border: 1px solid #ddd;
--dialog-border-radius: 10px;
--dialog-box-shadow: 0 5px 5px rgba(93, 93, 93, 0.83);
--dialog-fg: inherit;
--dialog-head-bg: #373d43;
--dialog-head-fg: #fff;
--icon-button-bg: inherit;
--icon-button-border: none;
--icon-button-border-radius: 9999px;
@@ -50,6 +58,16 @@
--label-fg-error: #ba1b1b;
--label-fg-hover: #999;
--meter-fg: #888;
--meter-bg: #444;
--paginate-bg: #e2e2e2;
--paginate-bg-hover: #d8d8d8;
--paginate-bg-current: #d2d2d2;
--paginate-fg: #555;
--paginate-fg-disabled: #999;
--paginate-divider: #999;
--panel-action-fg: #aaa;
--panel-border: 1px solid #ddd;
--panel-bg: #e2e2e2;
+48
View File
@@ -0,0 +1,48 @@
/* Dashboard */
.form__button > svg {
height: 17px;
position: absolute;
left: -17px;
width: 17px;
}
.dashboard__menus {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(max(240px, 30%), 1fr));
gap: 1rem;
}
.dashboard__stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
gap: 1rem;
}
/* Applications */
.application--pending {
color: orange;
}
.application--approved {
color: green;
}
.application--rejected {
color: red;
}
/* Chat */
.chat-bots__icon {
height: 24px;
}
/* User Search */
.user-search__avatar {
width: 40px;
height: 40px;
border-radius: 50%;
}
+24
View File
@@ -27,6 +27,20 @@
--button-text-border-radius: 5px;
--button-text-fg: currentColor;
--data-table-th-bg: #2c2c2c;
--data-table-thead-border: 3px solid rgba(14, 21, 34, 0.25);
--data-table-tr-even-bg: #333;
--data-table-tr-odd-bg: #2c2c2c;
--data-table-tfoot-border: 3px solid rgba(14, 21, 34, 0.25);
--dialog-bg: #222;
--dialog-border: 3px solid rgba(14, 21, 34, 0.25);
--dialog-border-radius: 10px;
--dialog-box-shadow: none;
--dialog-fg: inherit;
--dialog-head-bg: #191919;
--dialog-head-fg: #fff;
--icon-button-bg: inherit;
--icon-button-border: none;
--icon-button-border-radius: 9999px;
@@ -50,6 +64,16 @@
--label-fg-error: #ba1b1b;
--label-fg-hover: #999;
--meter-fg: #333;
--meter-bg: #505050;
--paginate-bg: #272727;
--paginate-bg-hover: #222;
--paginate-bg-current: #202020;
--paginate-fg: #888;
--paginate-fg-disabled: #555;
--paginate-divider: #303030;
--panel-action-fg: #aaa;
--panel-border: 3px solid rgba(14, 21, 34, 0.25);
--panel-bg: #222;
+27
View File
@@ -48,6 +48,20 @@
--button-text-border-radius: 5px;
--button-text-fg: currentColor;
--data-table-th-bg: #2c2c2c;
--data-table-thead-border: none;
--data-table-tr-even-bg: #272727;
--data-table-tr-odd-bg: #272727;
--data-table-tfoot-border: none;
--dialog-bg: #272727;
--dialog-border: none;
--dialog-border-radius: 10px;
--dialog-box-shadow: none;
--dialog-fg: var(--text-color);
--dialog-head-bg: #1c1c1c;
--dialog-head-fg: #fff;
--icon-button-bg: inherit;
--icon-button-border: none;
--icon-button-border-radius: 9999px;
@@ -71,6 +85,16 @@
--label-fg-error: #ba1b1b;
--label-fg-hover: #999;
--meter-fg: #333;
--meter-bg: #505050;
--paginate-bg: #272727;
--paginate-bg-hover: #222;
--paginate-bg-current: #202020;
--paginate-fg: #888;
--paginate-fg-disabled: #555;
--paginate-divider: #303030;
--panel-action-fg: #aaa;
--panel-border: none;
--panel-bg: #272727;
@@ -87,6 +111,9 @@
--select-border-radius: 5px;
--select-fg: #bbb;
--subforum-listing-odd-bg: #2a2a2a;
--subforum-listing-even-bg: transparent;
--textarea-border: 1px solid #555;
--textarea-border-active: 2px solid #2196f3;
--textarea-border-error: 1px solid #ba1b1b;
@@ -19,72 +19,88 @@
</li>
@endsection
@section('content')
<div class="container-fluid">
<div class="block">
<h2>{{ __('staff.applications') }}</h2>
<hr>
<p class="text-red">
<strong>
<i class="{{ config('other.font-awesome') }} fa-list"></i>
{{ __('staff.applications') }}
</strong>
</p>
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered">
<thead>
@section('page', 'page__application--index')
@section('main')
<section class="panelV2">
<h2 class="panel__heading">{{ __('staff.applications') }}</h2>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th>{{ __('common.no') }}</th>
<th>#</th>
<th>{{ __('common.user') }}</th>
<th>{{ __('common.email') }}</th>
<th>{{ __('staff.application-type') }}</th>
<th>{{ __('staff.application-image-proofs') }}</th>
<th>{{ __('user.profile') }} {{ __('staff.links') }}</th>
<th>{{ __('common.image') }}</th>
<th>{{ __('staff.links') }}</th>
<th>{{ __('common.created_at') }}</th>
<th>{{ __('common.status') }}</th>
<th>{{ __('common.moderated-by') }}</th>
<th>{{ __('common.action') }}</th>
</tr>
</thead>
<tbody>
@if ($applications)
@foreach ($applications as $key => $application)
<tr>
<td>{{ ++$key }}</td>
<td>{{ $application->user->username ?? 'N/A' }}</td>
<td>{{ $application->email }}</td>
<td>{{ $application->type }}</td>
<td>{{ $application->imageProofs->count() }}</td>
<td>{{ $application->urlProofs->count() }}</td>
<td>
{{ $application->created_at->toDayDateTimeString() }}
({{ $application->created_at->diffForHumans() }})
</td>
<td>
@if ($application->status == 0)
<span class="text-warning">PENDING</span>
@elseif ($application->status == 1)
<span class="text-success">APPROVED</span>
@else
<span class="text-danger">REJECTED</span>
@endif
</td>
<td>{{ $application->moderated->username ?? 'N/A' }}</td>
<td>
<a href="{{ route('staff.applications.show', ['id' => $application->id]) }}"
class="btn btn-xs btn-success">
<i class="{{ config('other.font-awesome') }} fa-eye"></i> View App
</a>
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
<div class="text-center">
{{ $applications->links() }}
</div>
</div>
</thead>
<tbody>
@forelse ($applications as $application)
<tr>
<td>{{ $application->id }}</td>
<td>
@if ($application->user === null)
N/A
@else
<x-user_tag :anon="false" :user="$application->user" />
@endif
</td>
<td>{{ $application->email }}</td>
<td>{{ $application->type }}</td>
<td>{{ $application->imageProofs->count() }}</td>
<td>{{ $application->urlProofs->count() }}</td>
<td>
<time
datetime="{{ $application->created_at }}"
title={{ $application->created_at }}
>
{{ $application->created_at->diffForHumans() }}
</time>
</td>
<td>
@if ($application->status == 0)
<span class="application--pending">Pending</span>
@elseif ($application->status == 1)
<span class="application--approved">Approved</span>
@else
<span class="application--rejected">Rejected</span>
@endif
</td>
<td>
@if ($application->moderated === null)
N/A
@else
<x-user_tag :anon="false" :user="$application->user" />
@endif
</td>
<td>
<menu class="data-table__actions">
<li class="data-table__action">
<a
class="form__button form__button--text"
href="{{ route('staff.applications.show', ['id' => $application->id]) }}">
{{ __('common.view') }}
</a>
</li>
</menu>
</td>
</tr>
@empty
<tr class="applications--empty">
<td colspan="10">
{{ __('common.no')}} {{__('staff.applications') }}
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
{{ $applications->links('partials.pagination') }}
</section>
@endsection
+165 -189
View File
@@ -24,195 +24,171 @@
</li>
@endsection
@section('content')
<div class="container">
<div class="block">
<div class="table-responsive">
<table class="table table-condensed table-bordered table-striped">
<tbody>
<tr>
<td>
<strong>{{ __('common.email') }}</strong>
</td>
<td>
{{ $application->email }}
</td>
</tr>
<tr>
<td>
<strong>{{ __('staff.application-type') }}</strong>
</td>
<td>
{{ $application->type }}
</td>
</tr>
<tr>
<td>
<strong>{{ __('common.created_at') }}</strong>
</td>
<td>
{{ $application->created_at->toDayDateTimeString() }}
({{ $application->created_at->diffForHumans() }})
</td>
</tr>
<tr>
<td class="col-md-2">
<strong>{{ __('staff.application-image-proofs') }}</strong>
</td>
<td>
@foreach($application->imageProofs as $key => $img_proof)
<a href="{{ $img_proof->image }}" target="_blank">
<button type="button"
class="btn btn-sm btn-info">{{ __('staff.application-image-proofs') }} {{ ++$key }}</button>
</a>
@endforeach
</td>
</tr>
<tr>
<td>
<strong>{{ __('user.profile') }} {{ __('staff.links') }}</strong>
</td>
<td>
@foreach($application->urlProofs as $key => $url_proof)
<li><a href="{{ $url_proof->url }}"
target="_blank">{{ __('user.profile') }} {{ __('staff.links') }} {{ ++$key }}</a></li>
@endforeach
</td>
</tr>
<tr>
<td>
<strong>{{ __('staff.application-referrer') }}</strong>
</td>
<td>
<div class="form-group">
<label>
<textarea name="referrer" cols="30" rows="10" class="form-control"
disabled="">{{ $application->referrer }}</textarea>
</label>
</div>
</td>
</tr>
<tr>
<td>
<strong>{{ __('common.status') }}</strong>
</td>
<td>
@if ($application->status == 0)
<span class="text-warning">{{ __('request.pending') }}</span>
@elseif ($application->status == 1)
<span class="text-success">{{ __('request.approve') }}</span>
@else
<span class="text-danger">{{ __('request.reject') }}</span>
@endif
</td>
</tr>
@if($application->status != 0)
<tr>
<td>
<strong>{{ __('common.moderated-by') }}</strong>
</td>
<td>{{ $application->moderated->username }}</td>
</tr>
@else
<tr>
<td>
<strong>{{ __('common.action') }}</strong>
</td>
<td>
<button type="button" class="btn btn-sm btn-success" data-toggle="modal"
data-target="#approve-application"><i
class="{{ config('other.font-awesome') }} fa-check"></i> {{ __('request.approve') }}
</button>
@section('page', 'page__application--show')
<div id="approve-application" class="modal fade" role="dialog">
<form method="POST"
action="{{ route('staff.applications.approve', ['id' => $application->id]) }}">
@csrf
<div class="modal-dialog{{ modal_style() }}">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close"
data-dismiss="modal">&times;
</button>
<h4 class="modal-title">
{{ __('request.approve') }}
{{ __('common.this') }}
{{ __('staff.application') }}
</h4>
</div>
<div class="modal-body">
<input id="email" name="email" type="hidden"
value="{{ $application->email }}">
<div class="form-group">
<label for="message">{{ __('common.message') }}</label>
</div>
<div class="form-group">
<label for="approve"></label>
<textarea class="form-control" rows="5" cols="50" name="approve"
id="approve">Application Approved!</textarea>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-success" type="submit">
<i class="{{ config('other.font-awesome') }} fa-check"></i>
{{ __('request.approve') }}
</button>
</div>
</div>
</div>
</form>
</div>
<button type="button" class="btn btn-sm btn-danger" data-toggle="modal"
data-target="#deny-application"><i
class="{{ config('other.font-awesome') }} fa-times"></i> {{ __('request.reject') }}
</button>
<div id="deny-application" class="modal fade" role="dialog">
<form method="POST"
action="{{ route('staff.applications.reject', ['id' => $application->id]) }}">
@csrf
<div class="modal-dialog{{ modal_style() }}">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close"
data-dismiss="modal">&times;
</button>
<h4 class="modal-title">
{{ __('request.reject') }}
{{ __('common.this') }}
{{ __('staff.application') }}
</h4>
</div>
<div class="modal-body">
<input id="email" name="email" type="hidden"
value="{{ $application->email }}">
<div class="form-group">
<label for="message">{{ __('common.message') }}</label>
</div>
<div class="form-group">
<label for="deny"></label>
<textarea class="form-control" rows="5" cols="50" name="deny"
id="deny">Insufficient Proofs.</textarea>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-danger" type="submit">
<i class="{{ config('other.font-awesome') }} fa-times"></i>
{{ __('request.reject') }}
</button>
</div>
</div>
</div>
</form>
</div>
</td>
</tr>
@endif
</tbody>
</table>
</div>
@section('main')
<section class="panelV2">
<h2 class="panel__heading">{{ __('common.image') }}</h2>
<div class="panel__body">
<ul>
@foreach($application->imageProofs as $img_proof)
<li>
<a href="{{ $img_proof->image }}" target="_blank">
{{ __('staff.application-image-proofs') }} {{ $loop->iteration }}
</a>
</li>
@endforeach
</ul>
</div>
</div>
</section>
<section class="panelV2">
<h2 class="panel__heading">
{{ __('user.profile') }} {{ __('staff.links') }}
</h2>
<div class="panel__body">
<ul>
@foreach($application->urlProofs as $url_proof)
<li>
<a href="{{ $url_proof->url }}" target="_blank">
{{ $url_proof->url }}
</a>
</li>
@endforeach
</ul>
</div>
</section>
<section class="panelV2">
<h2 class="panel__heading">
{{ __('staff.application-referrer') }}
</h2>
<div class="panel__body">{{ $application->referrer }}</div>
</section>
@endsection
@section('sidebar')
<section class="panelV2">
<h2 class="panel__heading">{{ __('common.info') }}</h2>
<dl class="key-value">
<dt>{{ __('common.email') }}</dt>
<dd>{{ $application->email }}</dd>
<dt>{{ __('staff.application-type') }}</dt>
<dd>{{ $application->type }}</dd>
<dt>{{ __('common.created_at') }}</dt>
<dd>
<time datetime="{{ $application->created_at }}" title="{{ $application->created_at }}">
{{ $application->created_at->diffForHumans() }}
</time>
</dd>
<dt>{{ __('common.status') }}</dt>
<dd>
@if ($application->status == 0)
<span class="application--pending">{{ __('request.pending') }}</span>
@elseif ($application->status == 1)
<span class="application--approved">{{ __('request.approve') }}</span>
@else
<span class="application--rejected">{{ __('request.reject') }}</span>
@endif
</dd>
</dl>
</section>
<section class="panelV2">
@if($application->status)
<h2 class="panel__heading">{{ __('common.moderated-by') }}</h2>
<div class="panel__body">
<x-user_tag :anon="false" :user="$application->moderated" />
</div>
@else
<h2 class="panel__heading">{{ __('common.action') }}</h2>
<div class="panel__body">
<div x-data>
<p class="form__group form__group--horizontal">
<button class="form__button form__button--filled" x-on:click.stop="$refs.dialog.showModal()">
<i class="{{ config('other.font-awesome') }} fa-check"></i>
{{ __('request.approve') }}
</button>
</p>
<dialog class="dialog" x-ref="dialog">
<h3 class="dialog__heading">
{{ __('request.approve') }}
{{ __('common.this') }}
{{ __('staff.application') }}
</h3>
<form
class="dialog__form"
method="POST"
action="{{ route('staff.applications.approve', ['id' => $application->id]) }}"
x-on:click.outside="$refs.dialog.close()"
>
@csrf
<input
id="email"
name="email"
type="hidden"
value="{{ $application->email }}"
>
<p class="form__group">
<textarea id="approve" class="form__textarea" name="approve" placeholder="">Application Approved!</textarea>
<label class="form__label form__label--floating" for="approve">Invitation Message</label>
</p>
<p class="form__group">
<button class="form__button form__button--filled">
{{ __('request.approve') }}
</button>
<button x-on:click.prevent="$refs.dialog.close()" class="form__button form__button--outlined">
{{ __('common.cancel') }}
</button>
</p>
</form>
</dialog>
</div>
<div x-data>
<p class="form__group form__group--horizontal">
<button class="form__button form__button--filled" x-on:click.stop="$refs.dialog.showModal()">
<i class="{{ config('other.font-awesome') }} fa-times"></i>
{{ __('request.reject') }}
</button>
</p>
<dialog class="dialog" x-ref="dialog">
<h3 class="dialog__heading">
{{ __('request.reject') }}
{{ __('common.this') }}
{{ __('staff.application') }}
</h3>
<form
class="dialog__form"
method="POST"
action="{{ route('staff.applications.reject', ['id' => $application->id]) }}"
x-on:click.outside="$refs.dialog.close()"
>
@csrf
<input
id="email"
name="email"
type="hidden"
value="{{ $application->email }}"
>
<p class="form__group">
<textarea
id="message"
class="form__textarea"
name="deny"
required
>Insufficient Proofs.</textarea>
<label class="form__label form__label--floating for="message">Rejection Message</label>
</p>
<p class="form__group">
<button class="form__button form__button--filled">
{{ __('request.reject') }}
</button>
<button x-on:click.prevent="$refs.dialog.close()" class="form__button form__button--outlined">
{{ __('common.cancel') }}
</button>
</p>
</form>
</dialog>
</div>
</div>
</div>
@endif
</section>
@endsection
+39 -24
View File
@@ -20,29 +20,44 @@
</li>
@endsection
@section('content')
<div class="container box">
<h2>{{ __('common.add') }} {{ __('staff.articles') }}</h2>
<form role="form" method="POST" action="{{ route('staff.articles.store') }}" enctype="multipart/form-data">
@csrf
<div class="form-group">
<label for="title">{{ __('common.title') }}</label>
<label>
<input type="text" class="form-control" name="title" required>
</label>
</div>
@section('page', 'page__article--create')
<div class="form-group">
<label for="image">{{ __('common.image') }}</label>
<input type="file" name="image">
</div>
<div class="form-group">
<label for="content">{{ __('staff.article-content') }}</label>
<textarea name="content" id="editor" cols="30" rows="10" class="form-control"></textarea>
</div>
<button type="submit" class="btn btn-default">{{ __('common.submit') }}</button>
</form>
</div>
@section('main')
<section class="panelV2">
<h2 class="panel__heading">{{ __('common.add') }} {{ __('common.article') }}</h2>
<div class="panel__body">
<form
class="form"
method="POST"
enctype="multipart/form-data"
action="{{ route('staff.articles.store') }}"
>
<p class="form__group">
<input
type="text"
name="title"
id="title"
class="form__text"
required
>
<label class="form__label form__label--floating" for="title">
{{ __('common.title') }}
</label>
</p>
<p class="form__group">
<label for="image" class="form__label">{{ __('common.image') }}</label>
<input
class="form__file"
type="file"
name="image"
id="image"
>
</p>
@livewire('bbcode-input', ['name' => 'content', 'label' => __('content'), 'required' => true ])
<p class="form__group">
<button class="form__button form__button--filled">{{ __('common.submit') }}
</p>
</form>
</div>
</section>
@endsection
+43 -26
View File
@@ -15,36 +15,53 @@
{{ __('staff.articles') }}
</a>
</li>
<li class="breadcrumbV2">
{{ $article->title }}
</li>
<li class="breadcrumb--active">
{{ __('common.edit') }}
</li>
@endsection
@section('content')
<div class="container box">
<h2>{{ __('common.article') }} {{ __('common.edit') }}</h2>
<form role="form" method="POST" enctype="multipart/form-data"
action="{{ route('staff.articles.update', ['id' => $article->id]) }}">
@csrf
<div class="form-group">
<label for="title">{{ __('common.title') }}</label>
<label>
<input type="text" class="form-control" name="title" value="{{ $article->title }}" required>
</label>
</div>
@section('page', 'page__article--edit')
<div class="form-group">
<label for="image">{{ __('common.image') }}</label>
<input type="file" name="image">
</div>
<div class="form-group">
<label for="content">{{ __('staff.article-content') }}</label>
<textarea name="content" id="editor" cols="30" rows="10"
class="form-control">{{ $article->content }}</textarea>
</div>
<button type="submit" class="btn btn-default">{{ __('common.save') }}</button>
</form>
</div>
@section('main')
<section class="panelV2">
<h2 class="panel__heading">{{ __('common.edit') }} {{ __('common.article') }}: {{ $article->title }}</h2>
<div class="panel__body">
<form
class="form"
method="POST"
enctype="multipart/form-data"
action="{{ route('staff.articles.update', ['id' => $article->id]) }}"
>
<p class="form__group">
<input
type="text"
name="title"
id="title"
class="form__text"
value="{{ $article->title }}"
required
>
<label class="form__label form__label--floating" for="title">
{{ __('common.title') }}
</label>
</p>
<p class="form__group">
<label for="image" class="form__label">{{ __('common.image') }}</label>
<input
class="form__file"
type="file"
name="image"
id="image"
>
</p>
@livewire('bbcode-input', ['name' => 'content', 'label' => __('content'), 'required' => true, 'content' => $article->content ])
<p class="form__group">
<button class="form__button form__button--filled">{{ __('common.save') }}</button>
</p>
</form>
</div>
</section>
@endsection
+86 -36
View File
@@ -15,49 +15,99 @@
</li>
@endsection
@section('content')
<div class="container box">
<h2>{{ __('staff.articles') }}</h2>
<a href="{{ route('staff.articles.create') }}" class="btn btn-primary">
{{ __('common.add') }} {{ __('staff.articles') }}
</a>
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered table-hover">
<thead>
<tr>
<th>Title</th>
<th>Author</th>
<th>Date</th>
<th>{{ __('common.action') }}</th>
</tr>
</thead>
<tbody>
@section('page', 'page__article--index')
@section('main')
<section class="panelV2">
<header class="panel__header">
<h2 class="panel__heading">{{ __('staff.articles') }}</h2>
<div class="panel__actions">
<a
class="panel__action form__button form__button--text"
href="{{ route('staff.articles.create') }}"
>
{{ __('common.add') }}
</a>
</div>
</header>
<table class="data-table articles-table">
<thead>
<tr>
<th>Title</th>
<th>Author</th>
<th>Date</th>
<th>{{ __('common.comments') }}</th>
<th>{{ __('common.action') }}</th>
</tr>
</thead>
<tbody>
@foreach ($articles as $article)
<tr>
<tr class="articles-table__article">
<td>
<a href="{{ route('staff.articles.edit', ['id' => $article->id]) }}">{{ $article->title }}</a>
<a href="{{ route('staff.articles.edit', ['id' => $article->id]) }}">
{{ $article->title }}
</a>
</td>
<td>
<a
href="{{ route('users.show', ['username' => $article->user->username]) }}">{{ $article->user->username }}</a>
<a href="{{ route('users.show', ['username' => $article->user->username]) }}">
{{ $article->user->username }}
</a>
</td>
<td>{{ $article->created_at->toDayDateTimeString() }}</td>
<td>
<form action="{{ route('staff.articles.destroy', ['id' => $article->id]) }}" method="POST">
@csrf
@method('DELETE')
<a href="{{ route('staff.articles.edit', ['id' => $article->id]) }}"
class="btn btn-warning">{{ __('common.edit') }}</a>
<button type="submit" class="btn btn-danger">{{ __('common.delete') }}</button>
</form>
<time datetime="{{ $article->created_at }}">
{{ $article->created_at }}
</time>
</td>
<td>{{ $article->comments->count() }}</td>
<td>
<menu class="data-table__actions">
<li class="data-table__action">
<a
class="form__button form__button--text"
href="{{ route('articles.show', ['id' => $article->id]) }}"
>
{{ __('common.view') }}
</a>
</li>
<li class="data-table__action">
<a
class="form__button form__button--text"
href="{{ route('staff.articles.edit', ['id' => $article->id]) }}"
>
{{ __('common.edit') }}
</a>
</li>
<li class="data-table__action">
<form
action="{{ route('staff.articles.destroy', ['id' => $article->id]) }}"
method="POST"
x-data
>
@csrf
@method('DELETE')
<button
x-on:click.prevent="Swal.fire({
title: 'Are you sure?',
text: 'Are you sure you want to delete this article: {{ $article->title }}?',
icon: 'warning',
showConfirmButton: true,
showCancelButton: true,
}).then((result) => {
if (result.isConfirmed) {
$root.submit();
}
})"
class="form__button form__button--text">
{{ __('common.delete') }}
</button>
</form>
</li>
</menu>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="text-center">
{{ $articles->links() }}
</div>
</div>
</tbody>
</table>
{{ $articles->links('partials.pagination') }}
</section>
@endsection
+104 -61
View File
@@ -19,67 +19,110 @@
</li>
@endsection
@section('content')
<div class="container-fluid">
<div class="block">
<h2><i class="{{ config('other.font-awesome') }} fa-list"></i> {{ __('staff.audit-log') }}</h2>
<hr>
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered">
<thead>
<tr>
<th>{{ __('common.no') }}</th>
<th>{{ __('common.action') }}</th>
<th>Model</th>
<th>Model ID</th>
<th>By</th>
<th>Changes</th>
<th>{{ __('user.created-on') }}</th>
<th>{{ __('common.action') }}</th>
</tr>
</thead>
<tbody>
@if ($audits->count())
@foreach ($audits as $audit)
<tr>
<td>{{ $loop->iteration }}</td>
<td>{{ strtoupper($audit->action) }}</td>
<td>{{ $audit->model_name }}</td>
<td>{{ $audit->model_entry_id }}</td>
<td>
<a href="{{ route('users.show', ['username' => $audit->user->username]) }}">
{{ $audit->user->username }}
</a>
</td>
<td>
@foreach ($audit->values as $key => $value)
<span class="badge badge-extra">{{ $key }}:</span> {{ $value['old'] }} &rarr;
{{ $value['new'] }}<br>
@section('page', 'page__audit-log--index')
@section('main')
<section class="panelV2">
<h2 class="panel__heading">
<i class="{{ config('other.font-awesome') }} fa-list"></i>
{{ __('staff.audit-log') }}
</h2>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th>#</th>
<th>{{ __('common.action') }}</th>
<th>Model</th>
<th>Model ID</th>
<th>By</th>
<th>Changes</th>
<th>{{ __('user.created-on') }}</th>
<th>{{ __('common.action') }}</th>
</tr>
</thead>
<tbody>
@forelse ($audits as $audit)
@php $values = json_decode($audit->record, true, 512, JSON_THROW_ON_ERROR) @endphp
<tr>
<td>{{ $audit->id }}</td>
<td>{{ strtoupper($audit->action) }}</td>
<td>{{ $audit->model_name }}</td>
<td>{{ $audit->model_entry_id }}</td>
<td>
<a href="{{ route('users.show', ['username' => $audit->user->username]) }}">
{{ $audit->user->username }}
</a>
</td>
<td>
<ul>
@foreach ($values as $key => $value)
<li style="word-wrap: break-word; word-break: break-word; overflow-wrap: break-word;">
{{ $key }}:
@if (is_array($value['old']))
@json($value['old'])
@else
{{ $value['old'] ?? 'null' }}
@endif
&rarr;
@if (is_array($value['new']))
@json($value['new'])
@else
{{ $value['new'] ?? 'null' }}
@endif
</li>
@endforeach
</td>
<td>
{{ $audit->created_at->toDayDateTimeString() }}
({{ $audit->created_at->diffForHumans() }})
</td>
<td>
<form action="{{ route('staff.audits.destroy', ['id' => $audit->id]) }}"
method="POST">
@csrf
@method('DELETE')
<button type="submit" class="btn btn-xs btn-danger">
<i class="{{ config('other.font-awesome') }} fa-trash"></i>
</button>
</form>
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
<div class="text-center">
{{ $audits->links() }}
</div>
</div>
</ul>
</td>
<td>
<time
datetime="{{ $audit->created_at }}"
title="{{ $audit->created_at }}"
>
{{ $audit->created_at->diffForHumans() }}
</time>
</td>
<td>
<menu class="data-table__actions">
<li class="data-table__action">
<form
method="POST"
action="{{ route('staff.audits.destroy', ['id' => $audit->id]) }}"
x-data
>
@csrf
@method('DELETE')
<button
x-on:click.prevent="Swal.fire({
title: 'Are you sure?',
text: 'Are you sure you want to delete this audit log entry?',
icon: 'warning',
showConfirmButton: true,
showCancelButton: true,
}).then((result) => {
if (result.isConfirmed) {
$root.submit();
}
})"
class="form__button form__button--text"
>
{{ __('common.delete') }}
</button>
</form>
</li>
</menu>
</td>
</tr>
@empty
<tr>
<td colspan="8">
No audits
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
{{ $audits->links('partials.pagination') }}
</section>
@endsection
@@ -19,64 +19,52 @@
</li>
@endsection
@section('content')
<div class="container">
<div class="block">
<h2>{{ __('staff.failed-login-log') }}</h2>
<hr>
<div class="row">
<div class="col-sm-12">
<h2>Failed Logins</h2>
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered table-hover">
<thead>
<tr>
<th>{{ __('common.no') }}</th>
<th>{{ __('user.user-id') }}</th>
<th>{{ __('common.username') }}</th>
<th>{{ __('common.ip') }}</th>
<th>{{ __('user.created-on') }}</th>
</tr>
</thead>
<tbody>
@if (count($attempts) == 0)
<p>The are no failed login entries in the database!</p>
@else
@foreach ($attempts as $attempt)
<tr>
<td>
{{ $attempt->id }}
</td>
<td>
{{ $attempt->user_id ?? 'Not Found' }}
</td>
<td>
@if ($attempt->user_id == null)
{{ $attempt->username }}
@else
<a class="text-bold"
href="{{ route('users.show', ['username' => $attempt->username]) }}">
{{ $attempt->username }}
</a>
@endif
</td>
<td>
{{ $attempt->ip_address }}
</td>
<td>
{{ $attempt->created_at }}
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
</div>
</div>
<div class="text-center">
{{ $attempts->links() }}
</div>
@section('page', 'page__failed-logins-log--index')
@section('main')
<section class="panelV2">
<h2 class="panel__heading">{{ __('staff.failed-login-log') }}</h2>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th>{{ __('common.no') }}</th>
<th>{{ __('user.user-id') }}</th>
<th>{{ __('common.username') }}</th>
<th>{{ __('common.ip') }}</th>
<th>{{ __('user.created-on') }}</th>
</tr>
</thead>
<tbody>
@forelse ($attempts as $attempt)
<tr>
<td>{{ $attempt->id }}</td>
<td>{{ $attempt->user_id ?? 'Not Found' }}</td>
<td>
@if ($attempt->user_id == null)
{{ $attempt->username }}
@else
<a class="text-bold"
href="{{ route('users.show', ['username' => $attempt->username]) }}">
{{ $attempt->username }}
</a>
@endif
</td>
<td>{{ $attempt->ip_address }}</td>
<td>
<time datetime="{{ $attempt->created_at }}">
{{ $attempt->created_at }}
</time>
</td>
</tr>
@empty
<tr>
<td colspan="5">No failed logins</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
{{ $attempts->links('partials.pagination') }}
</section>
@endsection
+4 -4
View File
@@ -20,8 +20,8 @@
</li>
@endsection
@section('content')
<div>
@livewire('backup-panel')
</div>
@section('page', 'page__backup-manager--index')
@section('main')
@livewire('backup-panel')
@endsection
+52 -64
View File
@@ -19,69 +19,57 @@
</li>
@endsection
@section('content')
<div class="container">
<div class="block">
<h2>{{ __('common.user') }} {{ __('user.bans') }}</h2>
<hr>
<div class="row">
<div class="col-sm-12">
<p class="text-red"><strong><i class="{{ config('other.font-awesome') }} fa-ban"></i>
{{ __('user.bans') }}
</strong></p>
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered table-hover">
<thead>
<tr>
<th>ID</th>
<th>{{ __('common.user') }}</th>
<th>{{ __('user.judge') }}</th>
<th>{{ __('user.reason-ban') }}</th>
<th>{{ __('user.reason-unban') }}</th>
<th>{{ __('user.created') }}</th>
<th>{{ __('user.removed') }}</th>
</tr>
</thead>
<tbody>
@if (count($bans) == 0)
<p>The are no bans in database</p>
@else
@foreach ($bans as $b)
<tr>
<td>
{{ $b->id }}
</td>
<td class="user-name">
<a class="name"
href="{{ route('users.show', ['username' => $b->banneduser->username]) }}">{{ $b->banneduser->username }}</a>
</td>
<td class="user-name">
<a class="name"
href="{{ route('users.show', ['username' => $b->staffuser->username]) }}">{{ $b->staffuser->username }}</a>
</td>
<td>
{{ $b->ban_reason }}
</td>
<td>
{{ $b->unban_reason }}
</td>
<td>
{{ $b->created_at }}
</td>
<td>
{{ $b->removed_at }}
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
</div>
</div>
<div class="text-center">
{{ $bans->links() }}
</div>
@section('page', 'page__bans-log--index')
@section('main')
<section class="panelV2">
<h2 class="panel__heading">{{ __('common.user') }} {{ __('user.bans') }}</h2>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th>#</th>
<th>{{ __('common.user') }}</th>
<th>{{ __('user.judge') }}</th>
<th>{{ __('user.reason-ban') }}</th>
<th>{{ __('user.reason-unban') }}</th>
<th>{{ __('user.created') }}</th>
<th>{{ __('user.removed') }}</th>
</tr>
</thead>
<tbody>
@forelse ($bans as $ban)
<tr>
<td>{{ $ban->id }}</td>
<td>
<x-user_tag :anon="false" :user="$ban->banneduser" />
</td>
<td>
<x-user_tag :anon="false" :user="$ban->staffuser" />
</td>
<td>{{ $ban->ban_reason }}</td>
<td>{{ $ban->unban_reason }}</td>
<td>
<time datetime="{{ $ban->created_at }}">
{{ $ban->created_at }}
</time>
</td>
<td>
<time datetime="{{ $ban->removed_at }}">
{{ $ban->removed_at }}
</time>
</td>
</tr>
@empty
<tr>
<td colspan="7">
No bans
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
{{ $bans->links('partials.pagination') }}
</section>
@endsection
+119 -87
View File
@@ -16,95 +16,127 @@
</li>
@endsection
@section('content')
<div class="container box">
<h2>
@section('page', 'page__category--create')
@section('main')
<section class="panelV2">
<h2 class="panel__heading">
{{ __('common.add') }}
{{ trans_choice('common.a-an-art',false) }}
{{ __('torrent.category') }}
</h2>
<form role="form" method="POST" action="{{ route('staff.categories.store') }}" enctype="multipart/form-data">
@csrf
<div class="form-group">
<label for="name">{{ __('common.name') }}</label>
<label>
<input type="text" class="form-control" name="name">
</label>
</div>
<div class="form-group">
<label for="name">{{ __('common.position') }}</label>
<label>
<input type="text" class="form-control" name="position">
</label>
</div>
<div class="form-group">
<label for="name">Icon (FontAwesome)</label>
<label>
<input type="text" class="form-control" name="icon"
placeholder="Example: {{ config('other.font-awesome') }} fa-rocket">
</label>
</div>
<div class="form-group">
<label for="image">
{{ __('common.select') }}
{{ trans_choice('common.a-an-art',false) }}
{{ __('common.image') }}
(If Not Using A FontAwesome Icon)
</label>
<input type="file" name="image">
</div>
<label for="movie_meta" class="control-label">Movie Meta Data?</label>
<div class="radio-inline">
<label><input type="radio" name="movie_meta" value="1">{{ __('common.yes') }}</label>
</div>
<div class="radio-inline">
<label><input type="radio" name="movie_meta" value="0" checked>{{ __('common.no') }}</label>
</div>
<br>
<br>
<label for="tv_meta" class="control-label">TV Meta Data?</label>
<div class="radio-inline">
<label><input type="radio" name="tv_meta" value="1">{{ __('common.yes') }}</label>
</div>
<div class="radio-inline">
<label><input type="radio" name="tv_meta" value="0" checked>{{ __('common.no') }}</label>
</div>
<br>
<br>
<label for="game_meta" class="control-label">Game Meta Data?</label>
<div class="radio-inline">
<label><input type="radio" name="game_meta" value="1">{{ __('common.yes') }}</label>
</div>
<div class="radio-inline">
<label><input type="radio" name="game_meta" value="0" checked>{{ __('common.no') }}</label>
</div>
<br>
<br>
<label for="music_meta" class="control-label">Music Meta Data?</label>
<div class="radio-inline">
<label><input type="radio" name="music_meta" value="1">{{ __('common.yes') }}</label>
</div>
<div class="radio-inline">
<label><input type="radio" name="music_meta" value="0" checked>{{ __('common.no') }}</label>
</div>
<br>
<br>
<label for="no_meta" class="control-label">No Meta Data?</label>
<div class="radio-inline">
<label><input type="radio" name="no_meta" value="1">{{ __('common.yes') }}</label>
</div>
<div class="radio-inline">
<label><input type="radio" name="no_meta" value="0" checked>{{ __('common.no') }}</label>
</div>
<br>
<br>
<button type="submit" class="btn btn-default">{{ __('common.add') }}</button>
</form>
</div>
<div class="panel__body">
<form
class="form"
method="POST"
action="{{ route('staff.categories.store') }}"
enctype="multipart/form-data"
>
@csrf
<p class="form__group">
<input
id="name"
class="form__text"
type="text"
name="name"
placeholder=""
>
<label class="form__label form__label--floating" for="name">{{ __('common.name') }}<label>
</p>
<p class="form__group">
<input
id="position"
class="form__text"
type="text"
name="position"
placeholder=""
>
<label class="form__label form__label--floating" for="positon">{{ __('common.position') }}</label>
</p>
<p class="form__group">
<input
id="position"
class="form__text"
type="text"
name="icon"
placeholder=""
>
<label class="form__label form__label--floating" for="icon">{{ __('common.icon') }} (FontAwesome)</label>
</p>
<p class="form__group">
<label for="image">
{{ __('common.select') }}
{{ trans_choice('common.a-an-art',false) }}
{{ __('common.image') }}
(If Not Using A FontAwesome Icon)
</label>
<input
id="file"
class="form__file"
type="file"
name="image"
>
</p>
<p class="form__group">
<input type="hidden" name="movie_meta" value="0">
<input
id="movie_meta"
class="form__checkbox"
type="checkbox"
name="movie_meta"
value="1"
>
<label for="movie_meta">Movie metadata?</label>
</p>
<p class="form__group">
<input type="hidden" name="tv_meta" value="0">
<input
id="tv_meta"
class="form__checkbox"
type="checkbox"
name="tv_meta"
value="1"
>
<label for="tv_meta">TV metadata?</label>
</p>
<p class="form__group">
<input type="hidden" name="game_meta" value="0">
<input
id="game_meta"
class="form__checkbox"
type="checkbox"
name="game_meta"
value="1"
>
<label for="game_meta">Game metadata?</label>
</p>
<p class="form__group">
<input type="hidden" name="music_meta" value="0">
<input
id="music_meta"
class="form__checkbox"
type="checkbox"
name="music_meta"
value="1"
>
<label for="music_meta">Music metadata?</label>
</p>
<p class="form__group">
<input type="hidden" name="no_meta" value="0">
<input
class="form__checkbox"
type="checkbox"
name="no_meta"
value="1"
>
<label for="no_meta">No metadata?</label>
</p>
<p class="form__group">
<button class="form__button form__button--filled">
{{ __('common.submit') }}
</button>
</p>
</form>
</div>
</section>
@endsection
+129 -101
View File
@@ -11,111 +11,139 @@
{{ __('staff.torrent-categories') }}
</a>
</li>
<li class="breadcrumbV2">
{{ $category->name }}
</li>
<li class="breadcrumb--active">
{{ __('common.edit') }}
</li>
@endsection
@section('content')
<div class="container box">
<h2>
{{ __('common.edit') }}
{{ trans_choice('common.a-an-art',false) }}
{{ __('torrent.category') }}
@section('page', 'page__category--edit')
@section('main')
<section class="panelV2">
<h2 class="panel__heading">
{{ __('common.edit') }} {{ __('torrent.category') }}: {{ $category->name }}
</h2>
<form role="form" method="POST" action="{{ route('staff.categories.update', ['id' => $category->id]) }}"
enctype="multipart/form-data">
@method('PATCH')
@csrf
<div class="form-group">
<label for="name">{{ __('common.name') }}</label>
<label>
<input type="text" class="form-control" name="name" value="{{ $category->name }}">
</label>
</div>
<div class="form-group">
<label for="name">{{ __('common.position') }}</label>
<label>
<input type="text" class="form-control" name="position" value="{{ $category->position }}">
</label>
</div>
<div class="form-group">
<label for="name">{{ __('common.icon') }} (FontAwesome)</label>
<label>
<input type="text" class="form-control" name="icon" value="{{ $category->icon }}">
</label>
</div>
<div class="form-group">
<label for="image">
{{ __('common.select') }}
{{ trans_choice('common.a-an-art',false) }}
{{ __('common.image') }}
(If Not Using A FontAwesome Icon)
</label>
<input type="file" name="image">
</div>
<label for="movie_meta" class="control-label">Movie Meta Data?</label>
<div class="radio-inline">
<label><input type="radio" name="movie_meta" @if ($category->movie_meta) checked @endif
value="1">{{ __('common.yes') }}</label>
</div>
<div class="radio-inline">
<label><input type="radio" name="movie_meta" @if (!$category->movie_meta) checked @endif
value="0">{{ __('common.no') }}</label>
</div>
<br>
<br>
<label for="tv_meta" class="control-label">TV Meta Data?</label>
<div class="radio-inline">
<label><input type="radio" name="tv_meta" @if ($category->tv_meta) checked @endif
value="1">{{ __('common.yes') }}</label>
</div>
<div class="radio-inline">
<label><input type="radio" name="tv_meta" @if (!$category->tv_meta) checked @endif
value="0">{{ __('common.no') }}</label>
</div>
<br>
<br>
<label for="game_meta" class="control-label">Game Meta Data?</label>
<div class="radio-inline">
<label><input type="radio" name="game_meta" @if ($category->game_meta) checked @endif
value="1">{{ __('common.yes') }}</label>
</div>
<div class="radio-inline">
<label><input type="radio" name="game_meta" @if (!$category->game_meta) checked @endif
value="0">{{ __('common.no') }}</label>
</div>
<br>
<br>
<label for="music_meta" class="control-label">Music Meta Data?</label>
<div class="radio-inline">
<label><input type="radio" name="music_meta" @if ($category->music_meta) checked @endif
value="1">{{ __('common.yes') }}</label>
</div>
<div class="radio-inline">
<label><input type="radio" name="music_meta" @if (!$category->music_meta) checked @endif
value="0">{{ __('common.no') }}</label>
</div>
<br>
<br>
<label for="no_meta" class="control-label">No Meta Data?</label>
<div class="radio-inline">
<label><input type="radio" name="no_meta" @if ($category->no_meta) checked @endif
value="1">{{ __('common.yes') }}</label>
</div>
<div class="radio-inline">
<label><input type="radio" name="no_meta" @if (!$category->no_meta) checked @endif
value="0">{{ __('common.no') }}</label>
</div>
<br>
<br>
<button type="submit" class="btn btn-default">{{ __('common.submit') }}</button>
</form>
</div>
<div class="panel__body">
<form
class="form"
method="POST"
action="{{ route('staff.categories.update', ['id' => $category->id]) }}"
enctype="multipart/form-data"
>
@method('PATCH')
@csrf
<p class="form__group">
<input
id="name"
class="form__text"
type="text"
name="name"
value="{{ $category->name }}"
>
<label class="form__label form__label--floating" for="name">{{ __('common.name') }}<label>
</p>
<p class="form__group">
<input
id="position"
class="form__text"
type="text"
name="position"
value="{{ $category->position }}"
>
<label class="form__label form__label--floating" for="positon">{{ __('common.position') }}</label>
</p>
<p class="form__group">
<input
id="position"
class="form__text"
type="text"
name="icon"
value="{{ $category->icon }}"
>
<label class="form__label form__label--floating" for="icon">{{ __('common.icon') }} (FontAwesome)</label>
</p>
<p class="form__group">
<label for="image">
{{ __('common.select') }}
{{ trans_choice('common.a-an-art',false) }}
{{ __('common.image') }}
(If Not Using A FontAwesome Icon)
</label>
<input
id="file"
class="form__file"
type="file"
name="image"
>
</p>
<p class="form__group">
<input type="hidden" name="movie_meta" value="0">
<input
id="movie_meta"
class="form__checkbox"
type="checkbox"
name="movie_meta"
value="1"
@checked($category->movie_meta)
>
<label for="movie_meta">Movie metadata?</label>
</p>
<p class="form__group">
<input type="hidden" name="tv_meta" value="0">
<input
id="tv_meta"
class="form__checkbox"
type="checkbox"
name="tv_meta"
value="1"
@checked($category->tv_meta)
>
<label for="tv_meta">TV metadata?</label>
</p>
<p class="form__group">
<input type="hidden" name="game_meta" value="0">
<input
id="game_meta"
class="form__checkbox"
type="checkbox"
name="game_meta"
value="1"
@checked($category->game_meta)
>
<label for="game_meta">Game metadata?</label>
</p>
<p class="form__group">
<input type="hidden" name="music_meta" value="0">
<input
id="music_meta"
class="form__checkbox"
type="checkbox"
name="music_meta"
value="1"
@checked($category->music_meta)
>
<label for="music_meta">Music metadata?</label>
</p>
<p class="form__group">
<input type="hidden" name="no_meta" value="0">
<input
class="form__checkbox"
type="checkbox"
name="no_meta"
value="1"
@checked($category->no_meta)
>
<label for="no_meta">No metadata?</label>
</p>
<p class="form__group">
<button class="form__button form__button--filled">
{{ __('common.submit') }}
</button>
</p>
</form>
</div>
</section>
@endsection
+108 -78
View File
@@ -11,17 +11,22 @@
</li>
@endsection
@section('content')
<div class="container box">
<h2>{{ __('torrent.categories') }}</h2>
<a href="{{ route('staff.categories.create') }}" class="btn btn-primary">
{{ __('common.add') }}
{{ trans_choice('common.a-an-art',false) }}
{{ __('torrent.category') }}
</a>
@section('page', 'page__category--index')
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered table-hover">
@section('main')
<section class="panelV2">
<header class="panel__header">
<h2 class="panel__heading">{{ __('torrent.categories') }}</h2>
<div class="panel__actions">
<form class="panel__action" action="{{ route('staff.categories.create') }}">
<button class="form__button form__button--text">
{{ __('common.add') }}
</button>
</form>
</div>
</header>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th>{{ __('common.position') }}</th>
@@ -37,76 +42,101 @@
</tr>
</thead>
<tbody>
@foreach ($categories as $category)
<tr>
<td>
{{ $category->position }}
</td>
<td>
<a
href="{{ route('staff.categories.edit', ['id' => $category->id]) }}">{{ $category->name }}</a>
</td>
<td>
<i class="{{ $category->icon }}" aria-hidden="true"></i>
</td>
<td>
@if ($category->image != null)
<img alt="{{ $category->name }}" src="{{ url('files/img/' . $category->image) }}">
@else
<span>N/A</span>
@endif
</td>
<td>
@if ($category->movie_meta)
<i class="{{ config('other.font-awesome') }} fa-check text-green"></i>
@else
<i class="{{ config('other.font-awesome') }} fa-times text-red"></i>
@endif
</td>
<td>
@if ($category->tv_meta)
<i class="{{ config('other.font-awesome') }} fa-check text-green"></i>
@else
<i class="{{ config('other.font-awesome') }} fa-times text-red"></i>
@endif
</td>
<td>
@if ($category->game_meta)
<i class="{{ config('other.font-awesome') }} fa-check text-green"></i>
@else
<i class="{{ config('other.font-awesome') }} fa-times text-red"></i>
@endif
</td>
<td>
@if ($category->music_meta)
<i class="{{ config('other.font-awesome') }} fa-check text-green"></i>
@else
<i class="{{ config('other.font-awesome') }} fa-times text-red"></i>
@endif
</td>
<td>
@if ($category->no_meta)
<i class="{{ config('other.font-awesome') }} fa-check text-green"></i>
@else
<i class="{{ config('other.font-awesome') }} fa-times text-red"></i>
@endif
</td>
<td>
<form action="{{ route('staff.categories.destroy', ['id' => $category->id]) }}"
method="POST">
@csrf
@method('DELETE')
<a href="{{ route('staff.categories.edit', ['id' => $category->id]) }}"
class="btn btn-warning">
{{ __('common.edit') }}
@foreach ($categories as $category)
<tr>
<td>{{ $category->position }}</td>
<td>
<a href="{{ route('staff.categories.edit', ['id' => $category->id]) }}">
{{ $category->name }}
</a>
<button type="submit" class="btn btn-danger">{{ __('common.delete') }}</button>
</form>
</td>
</tr>
@endforeach
</td>
<td>
<i class="{{ $category->icon }}"></i>
</td>
<td>
@if ($category->image != null)
<img alt="{{ $category->name }}" src="{{ url('files/img/' . $category->image) }}">
@else
<span>N/A</span>
@endif
</td>
<td>
@if ($category->movie_meta)
<i class="{{ config('other.font-awesome') }} fa-check text-green"></i>
@else
<i class="{{ config('other.font-awesome') }} fa-times text-red"></i>
@endif
</td>
<td>
@if ($category->tv_meta)
<i class="{{ config('other.font-awesome') }} fa-check text-green"></i>
@else
<i class="{{ config('other.font-awesome') }} fa-times text-red"></i>
@endif
</td>
<td>
@if ($category->game_meta)
<i class="{{ config('other.font-awesome') }} fa-check text-green"></i>
@else
<i class="{{ config('other.font-awesome') }} fa-times text-red"></i>
@endif
</td>
<td>
@if ($category->music_meta)
<i class="{{ config('other.font-awesome') }} fa-check text-green"></i>
@else
<i class="{{ config('other.font-awesome') }} fa-times text-red"></i>
@endif
</td>
<td>
@if ($category->no_meta)
<i class="{{ config('other.font-awesome') }} fa-check text-green"></i>
@else
<i class="{{ config('other.font-awesome') }} fa-times text-red"></i>
@endif
</td>
<td>
<menu class="data-table__actions">
<li class="data-table__action">
<a
class="form__button form__button--text"
href="{{ route('staff.categories.edit', ['id' => $category->id]) }}"
>
{{ __('common.edit') }}
</a>
</li>
<li class="data-table__action">
<form
action="{{ route('staff.categories.destroy', ['id' => $category->id]) }}"
method="POST"
x-data
>
@csrf
@method('DELETE')
<button
x-on:click.prevent="Swal.fire({
title: 'Are you sure?',
text: 'Are you sure you want to delete this category: {{ $category->name }}?',
icon: 'warning',
showConfirmButton: true,
showCancelButton: true,
}).then((result) => {
if (result.isConfirmed) {
$root.submit();
}
})"
class="form__button form__button--text"
>
{{ __('common.delete') }}
</button>
</form>
</li>
</menu>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</section>
@endsection
+116 -58
View File
@@ -15,6 +15,9 @@
{{ __('bot.bots') }}
</a>
</li>
<li class="breadcrumbV2">
{{ $bot->name }}
</li>
<li class="breadcrumb--active">
{{ __('common.edit') }}
</li>
@@ -38,63 +41,118 @@
</li>
@endsection
@section('content')
<div class="container box">
<h2>{{ __('bot.edit-bot') }}</h2>
<form role="form" method="POST" action="{{ route('staff.bots.update', ['id' => $bot->id]) }}">
@csrf
@method('PATCH')
<div class="form-group">
<label for="name">{{ __('bot.name') }}</label>
<input type="text" class="form-control" id="name" name="name" value="{{ $bot->name }}">
</div>
<div class="form-group">
<label for="name">{{ __('common.position') }}</label>
<label for="position"></label><input type="number" id="position" name="position"
value="{{ $bot->position }}" class="form-control">
</div>
<div class="form-group">
<label for="name">{{ __('bot.command') }}</label>
<label for="command"></label><input type="text" class="form-control" id="command" name="command"
value="{{ $bot->command }}">
</div>
<div class="form-group">
<label for="name">{{ __('bot.info') }}</label>
<label for="info"></label><input type="text" class="form-control" id="info" name="info"
value="{{ $bot->info }}">
</div>
<div class="form-group">
<label for="name">{{ __('bot.about') }}</label>
<label for="about"></label><input type="text" class="form-control" id="about" name="about"
value="{{ $bot->about }}">
</div>
<div class="form-group">
<label for="name">{{ __('bot.emoji-code') }}</label>
<label for="emoji"></label><input type="text" class="form-control" id="emoji" name="emoji"
value="{{ $bot->emoji }}">
</div>
<div class="form-group">
<label for="name">{{ __('bot.icon') }}</label>
<label for="icon"></label><input type="text" class="form-control" id="icon" name="icon"
value="{{ $bot->icon }}">
</div>
<div class="form-group">
<label for="name">{{ __('bot.color') }}</label>
<label for="color"></label><input type="text" class="form-control" id="color" name="color"
value="{{ $bot->color }}">
</div>
<div class="form-group">
<label for="name">{{ __('bot.help') }}</label>
</div>
<div class="form-group">
<label>
<textarea name="help" cols="30" rows="10" class="form-control">{{ $bot->help }}</textarea>
</label>
</div>
<br>
<div class="text-center">
<button type="submit" class="btn btn-primary">{{ __('common.edit') }}</button>
</div>
</form>
@section('page', 'page__chat-bot--edit')
@section('main')
<section class="panelV2">
<h2 class="panel__heading">{{ __('bot.edit-bot') }}: {{ $bot->name }}</h2>
<div class="panel__body">
<form class="form" method="POST" action="{{ route('staff.bots.update', ['id' => $bot->id]) }}">
@csrf
@method('PATCH')
<p class="form__group">
<input
id="name"
class="form__text"
name="name"
placeholder=""
type="text"
value="{{ $bot->name }}"
>
<label class="form__label form__label--floating" for="name">{{ __('bot.name') }}</label>
</p>
<p class="form__group">
<input
id="position"
class="form__text"
inputmode="numeric"
name="position"
pattern="[0-9]*"
placeholder=""
type="text"
value="{{ $bot->position }}"
>
<label class="form__label form__label--floating" for="position">{{ __('common.position') }}</label>
</p>
<p class="form__group">
<input
id="command"
class="form__text"
name="command"
placeholder=""
type="text"
value="{{ $bot->command }}"
>
<label class="form__label form__label--floating" for="command">{{ __('bot.command') }}</label>
</p>
<p class="form__group">
<input
id="info"
class="form__text"
name="info"
placeholder=""
type="text"
value="{{ $bot->info }}"
>
<label class="form__label form__label--floating" for="info">{{ __('bot.info') }}</label>
</p>
<p class="form__group">
<input
id="about"
class="form__text"
name="about"
placeholder=""
type="text"
value="{{ $bot->about }}"
>
<label class="form__label form__label--floating" for="about">{{ __('bot.about') }}</label>
</p>
<p class="form__group">
<input
id="emoji"
class="form__text"
name="emoji"
placeholder=""
type="text"
value="{{ $bot->emoji }}"
>
<label class="form__label form__label--floating" for="emoji">{{ __('bot.emoji-code') }}</label>
</p>
<p class="form__group">
<input
id="icon"
class="form__text"
name="icon"
placeholder=""
type="text"
value="{{ $bot->icon }}"
>
<label class="form__label form__label--floating" for="icon">{{ __('bot.icon') }}</label>
</p>
<p class="form__group">
<input
id="color"
class="form__text"
name="color"
placeholder=""
type="text"
value="{{ $bot->color }}"
>
<label class="form__label form__label--floating" for="color">{{ __('bot.color') }}</label>
</p>
<p class="form__group">
<textarea
id="help"
class="form__textarea"
name="help"
placeholder=""
>{{ $bot->help }}</textarea>
<label class="form__label form__label--floating" for="help">{{ __('bot.help') }}</label>
</p>
<p class="form__group">
<button class="form__button form__button--filled">{{ __('common.edit') }}</button>
</p>
</form>
</div>
</div>
@endsection
+84 -53
View File
@@ -29,13 +29,14 @@
</li>
@endsection
@section('content')
<div class="container box">
<div class="block">
<h2>{{ __('staff.bots') }}</h2>
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered table-hover">
<thead>
@section('page', 'page__chat-bot--index')
@section('main')
<section class="panelV2">
<h2 class="panel__heading">{{ __('staff.bots') }}</h2>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th>{{ __('common.name') }}</th>
<th>{{ __('common.position') }}</th>
@@ -44,59 +45,89 @@
<th>{{ __('common.status') }}</th>
<th>{{ __('common.action') }}</th>
</tr>
</thead>
<tbody>
</thead>
<tbody>
@foreach($bots as $bot)
<tr>
<td>{{ $bot->name }}</td>
<td>{{ $bot->position }}</td>
<td><img src="/vendor/joypixels/png/64/{{ $bot->emoji }}.png" alt="emoji"
style="max-width: 24px;"/></td>
<td>{{ $bot->command }}</td>
<td>@if ($bot->active)<i
class="{{ config('other.font-awesome') }} fa-check text-green"></i>@else<i
class="{{ config('other.font-awesome') }} fa-times text-red"></i>@endif</td>
<td>
<form action="{{ route('staff.bots.destroy', ['id' => $bot->id]) }}" method="POST">
@csrf
@method('DELETE')
<a href="{{ route('staff.bots.edit', ['id' => $bot->id]) }}"
class="btn btn-warning">{{ __('common.edit') }}</a>
@if($bot->is_protected)
@else
<button type="submit" class="btn btn-danger">{{ __('common.delete') }}</button>
@endif
</form>
@if($bot->is_systembot)
<a href="{{ route('staff.bots.edit', ['id' => $bot->id]) }}">
{{ $bot->name }}
</a>
</td>
<td>{{ $bot->position }}</td>
<td>
<img
class="chat-bots__icon"
src="/vendor/joypixels/png/64/{{ $bot->emoji }}.png"
alt="emoji"
>
</td>
<td>{{ $bot->command }}</td>
<td>
@if ($bot->active)
<i class="{{ config('other.font-awesome') }} fa-check text-green"></i>
@else
@if($bot->active)
<form role="form" method="POST"
action="{{ route('staff.bots.disable', ['id' => $bot->id]) }}"
style="display: inline-block;">
@csrf
<button type="submit" class="btn btn-xs btn-warning">
<i class='{{ config('other.font-awesome') }} fa-times-circle'></i> {{ __('common.disable') }}
</button>
</form>
@else
<form role="form" method="POST"
action="{{ route('staff.bots.enable', ['id' => $bot->id]) }}"
style="display: inline-block;">
@csrf
<button type="submit" class="btn btn-xs btn-success">
<i class='{{ config('other.font-awesome') }} fa-check-circle'></i> {{ __('common.enable') }}
</button>
</form>
@endif
<i class="{{ config('other.font-awesome') }} fa-times text-red"></i>
@endif
</td>
<td>
<div class="data-table__actions">
@if(! $bot->is_systembot)
@if($bot->active)
<li class="data-table__action">
<form
method="POST"
action="{{ route('staff.bots.disable', ['id' => $bot->id]) }}"
>
@csrf
<button class="form__button form__button--text">
{{ __('common.disable') }}
</button>
</form>
</li>
@else
<li class="data-table__action">
<form
method="POST"
action="{{ route('staff.bots.enable', ['id' => $bot->id]) }}"
>
@csrf
<button class="form__button form__button--text">
{{ __('common.enable') }}
</button>
</form>
</li>
@endif
@endif
<li class="data-table__action">
<a
class="form__button form__button--text"
href="{{ route('staff.bots.edit', ['id' => $bot->id]) }}"
>
{{ __('common.edit') }}
</a>
</li>
<li class="data-table__action">
<form
class="data-table__action"
action="{{ route('staff.bots.destroy', ['id' => $bot->id]) }}"
method="POST"
>
@csrf
@method('DELETE')
@if(!$bot->is_protected)
<button class="form__button form__button--text">
{{ __('common.delete') }}
</button>
@endif
</form>
</li>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</tbody>
</table>
</div>
</div>
</section>
@endsection
@@ -1,52 +0,0 @@
<div id="editChatroom-{{ $chatroom->id }}" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog{{ modal_style() }}">
<div class="modal-content">
<div class="modal-header" style="text-align: center;">
<h3>{{ __('common.edit') }} {{ __('common.chat-room') }} ({{ $chatroom->name }})</h3>
</div>
<form class="form-horizontal" role="form" method="POST"
action="{{ route('staff.rooms.update', ['id' => $chatroom->id]) }}">
@csrf
<div class="modal-body" style="text-align: center;">
<h4>Please enter the new name you want to use for {{ $chatroom->name }}</h4>
<label for="chatroom_name"></label> <label for="name"></label><input
style="margin:0 auto; width:300px;" type="text" class="form-control" name="name" id="name"
placeholder="Enter {{ __('common.name') }} Here..." value="{{ $chatroom->name }}" required>
</div>
<div class="modal-footer">
<button class="btn btn-md btn-primary" data-dismiss="modal">{{ __('common.cancel') }}</button>
<input class="btn btn-md btn-success" type="submit">
</div>
</form>
</div>
</div>
</div>
<div id="deleteChatroom-{{ $chatroom->id }}" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog{{ modal_style() }}">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">{{ __('common.delete') }} Chatroom ({{ $chatroom->name }}) Permanently</h4>
</div>
<form class="form-horizontal" role="form" method="POST"
action="{{ route('staff.rooms.destroy', ['id' => $chatroom->id]) }}">
@csrf
@method('DELETE')
<div class="modal-body">
<p>Are you sure about this?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-md btn-primary"
data-dismiss="modal">{{ __('common.cancel') }}</button>
<input class="btn btn-md btn-danger" type="submit">
</div>
</form>
</div>
</div>
</div>
+111 -50
View File
@@ -29,42 +29,51 @@
</li>
@endsection
@section('content')
<div class="container box">
<h2>{{ __('common.chat-rooms') }}</h2>
@section('page', 'page__chat-room--index')
<button class="btn btn-primary" data-toggle="modal" data-target="#addChatroom">
{{ __('common.add') }} {{ __('common.chat-room') }}
</button>
<div id="addChatroom" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog{{ modal_style() }}">
<div class="modal-content">
<div class="modal-header" style="text-align: center;">
<h3>{{ __('common.add') }} {{ __('common.chat-room') }}</h3>
</div>
<form class="form-horizontal" role="form" method="POST" action="{{ route('staff.rooms.store') }}">
@csrf
<div class="modal-body" style="text-align: center;">
<h4>Please enter the name of the chatroom you would like to create.</h4>
<label for="chatroom_name"> {{ __('common.name') }}:</label> <label for="name"></label><input
style="margin:0 auto; width:300px;" type="text" class="form-control" name="name"
@section('main')
<section class="panelV2">
<header class="panel__header">
<h2 class="panel__heading">{{ __('common.chat-rooms') }}</h2>
<div class="panel__actions">
<div class="panel__action" x-data>
<button class="form__button form__button--text" x-on:click.stop="$refs.dialog.showModal()">
{{ __('common.add') }}
</button>
<dialog class="dialog" x-ref="dialog">
<h3 class="dialog__heading">{{ __('common.add') }} {{ __('common.chat-room') }}</h2>
<form
class="dialog__form"
method="POST"
action="{{ route('staff.rooms.store') }}"
x-on:click.outside="$refs.dialog.close()"
>
@csrf
<p class="form__group">
<input
type="text"
class="form__text"
name="name"
id="name"
placeholder="Enter {{ __('common.name') }} Here..." required>
</div>
<div class="modal-footer">
<button class="btn btn-md btn-primary" data-dismiss="modal">{{ __('common.cancel') }}</button>
<input class="btn btn-md btn-success" type="submit">
</div>
</form>
required
>
<label class="form__label form__label--floating" for="chatroom_name">{{ __('common.name') }}</label>
</p>
<p class="form__group">
<button class="form__button form__button--filled">
{{ __('common.submit') }}
</button>
<button x-on:click.prevent="$refs.dialog.close()" class="form__button form__button--outlined">
{{ __('common.cancel') }}
</button>
</p>
</form>
</dialog>
</div>
</div>
</div>
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered table-hover">
</header>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th>ID</th>
@@ -75,29 +84,81 @@
<tbody>
@foreach ($chatrooms as $chatroom)
<tr>
<td>{{ $chatroom->id }}</td>
<td>{{ $chatroom->name }}</td>
<td>
{{ $chatroom->id }}
</td>
<td>
<a href="#">
{{ $chatroom->name }}
</a>
</td>
<td>
<button class="btn btn-xs btn-warning" data-toggle="modal"
data-target="#editChatroom-{{ $chatroom->id }}">
<i class="{{ config('other.font-awesome') }} fa-pen-square"></i>
</button>
<button class="btn btn-xs btn-danger" data-toggle="modal"
data-target="#deleteChatroom-{{ $chatroom->id }}">
<i class="{{ config('other.font-awesome') }} fa-trash"></i>
</button>
@include('Staff.chat.room.chatroom_modals', ['chatroom' => $chatroom])
<menu class="data-table__actions">
<li class="data-table__action" x-data>
<button class="form__button form__button--text" x-on:click.stop="$refs.dialog.showModal()">
{{ __('common.edit') }}
</button>
<dialog class="dialog" x-ref="dialog">
<h3 class="dialog__heading">
{{ __('common.edit') }} {{ __('common.chat-room') }} ({{ $chatroom->name }})
</h3>
<form
class="dialog__form"
method="POST"
action="{{ route('staff.rooms.update', ['id' => $chatroom->id]) }}"
x-on:click.outside="$refs.dialog.close()"
>
@csrf
<p class="form__group">
<input
id="name"
class="form__text"
name="name"
required
type="text"
value="{{ $chatroom->name }}"
>
<label class="form__label form__label--floating" for="chatroom_name">
{{ __('common.name') }}
</label>
</p>
<p class="form__group">
<button class="form__button form__button--filled">
{{ __('common.submit') }}
</button>
<button x-on:click.prevent="$refs.dialog.close()" class="form__button form__button--outlined">
{{ __('common.cancel') }}
</button>
</p>
</form>
</dialog>
</li>
<li class="data-table__action">
<form
method="POST"
action="{{ route('staff.rooms.destroy', ['id' => $chatroom->id]) }}"
x-data
>
@csrf
@method('DELETE')
<button
x-on:click.prevent="Swal.fire({
title: 'Are you sure?',
text: 'Are you sure you want to delete this chatroom: {{ $chatroom->name }}?',
icon: 'warning',
showConfirmButton: true,
showCancelButton: true,
}).then((result) => {
if (result.isConfirmed) {
$root.submit();
}
})"
class="form__button form__button--text"
>
{{ __('common.delete') }}
</button>
</form>
</li>
</menu>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</section>
@endsection
@@ -1,58 +0,0 @@
<div id="editChatStatus-{{ $chatstatus->id }}" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog{{ modal_style() }}">
<div class="modal-content">
<div class="modal-header" style="text-align: center;">
<h3>{{ __('common.edit') }} Chat Status ({{ $chatstatus->name }})</h3>
</div>
<form class="form-horizontal" role="form" method="POST"
action="{{ route('staff.statuses.update', ['id' => $chatstatus->id]) }}">
@csrf
<div class="modal-body" style="text-align: center;">
<h4>Please enter the new settings you want to use for {{ $chatstatus->name }}</h4>
<label for="chatstatus_name"> {{ __('common.name') }}:</label> <label for="name"></label><input
style="margin:0 auto; width:300px;" type="text" class="form-control" name="name" id="name"
placeholder="Enter {{ __('common.name') }} Here..." value="{{ $chatstatus->name }}" required>
<label for="chatstatus_color"> Color:</label> <label for="color"></label><input
style="margin:0 auto; width:300px;" type="text" class="form-control" name="color" id="color"
placeholder="Enter Hex Color Code Here..." value="{{ $chatstatus->color }}" required>
<label for="chatstatus_icon"> Icon:</label> <label for="icon"></label><input
style="margin:0 auto; width:300px;" type="text" class="form-control" name="icon" id="icon"
placeholder="Enter Font Awesome Code Here..." value="{{ $chatstatus->icon }}" required>
</div>
<div class="modal-footer">
<button class="btn btn-md btn-primary" data-dismiss="modal">{{ __('common.cancel') }}</button>
<input class="btn btn-md btn-success" type="submit">
</div>
</form>
</div>
</div>
</div>
<div id="deleteChatStatus-{{ $chatstatus->id }}" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog{{ modal_style() }}">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">{{ __('common.delete') }} Chat Status ({{ $chatstatus->name }}) Permanently</h4>
</div>
<form class="form-horizontal" role="form" method="POST"
action="{{ route('staff.statuses.destroy', ['id' => $chatstatus->id]) }}">
@csrf
@method('DELETE')
<div class="modal-body">
<p>Are you sure about this?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-md btn-primary"
data-dismiss="modal">{{ __('common.cancel') }}</button>
<input class="btn btn-md btn-danger" type="submit">
</div>
</form>
</div>
</div>
</div>
+173 -61
View File
@@ -29,52 +29,81 @@
</li>
@endsection
@section('content')
<div class="container box">
<h2>{{ __('common.user') }} {{ __('staff.chat') }} {{ __('staff.statuses') }}</h2>
@section('page', 'page__chat-status--index')
<button class="btn btn-primary" data-toggle="modal" data-target="#addChatStatus">
{{ __('common.add') }} {{ __('staff.chat') }} {{ __('staff.status') }}
</button>
<div id="addChatStatus" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog{{ modal_style() }}">
<div class="modal-content">
<div class="modal-header" style="text-align: center;">
<h3>{{ __('common.add') }} {{ __('staff.chat') }} {{ __('staff.status') }}</h3>
</div>
<form class="form-horizontal" role="form" method="POST"
action="{{ route('staff.statuses.store') }}">
@csrf
<div class="modal-body" style="text-align: center;">
<h4>Please fill in all fields for the chat status you would like to create.</h4>
<label for="chatstatus_name"> {{ __('common.name') }}:</label> <label for="name"></label><input
style="margin:0 auto; width:300px;" type="text" class="form-control" name="name"
@section('main')
<section class="panelV2">
<header class="panel__header">
<h2 class="panel__heading">
{{ __('common.user') }} {{ __('staff.chat') }} {{ __('staff.statuses') }}
</h2>
<div class="panel__actions">
<div class="panel__action" x-data>
<button class="form__button form__button--text" x-on:click.stop="$refs.dialog.showModal()">
{{ __('common.add') }}
</button>
<dialog class="dialog" x-ref="dialog">
<h3 class="dialog__heading">
{{ __('common.add') }} {{ __('staff.chat') }} {{ __('staff.status') }}
</h3>
<form
class="dialog__form"
method="POST"
action="{{ route('staff.statuses.store') }}"
x-on:click.outside="$refs.dialog.close()"
>
@csrf
<p class="form__group">
<input
id="name"
placeholder="Enter {{ __('common.name') }} Here..." required>
<label for="chatstatus_color"> {{ __('common.color') }}:</label> <label
for="color"></label><input
style="margin:0 auto; width:300px;" type="text" class="form-control" name="color"
class="form__text"
name="name"
required
type="text"
>
<label class="form__label form__label--floating" for="name">
{{ __('common.name') }}
</label>
</p>
<p class="form__group">
<input
id="color"
placeholder="Enter Hex Color Code Here..." required>
<label for="chatstatus_icon"> {{ __('common.icon') }}:</label> <label for="icon"></label><input
style="margin:0 auto; width:300px;" type="text" class="form-control" name="icon"
class="form__text"
name="color"
required
type="text"
>
<label class="form__label form__label--floating" for="color">
{{ __('common.color') }} (e.g. #ff0000)
</label>
</p>
<p class="form__group">
<input
id="icon"
placeholder="Enter Font Awesome Code Here..." required>
</div>
<div class="modal-footer">
<button class="btn btn-md btn-primary" data-dismiss="modal">{{ __('common.cancel') }}</button>
<input class="btn btn-md btn-success" type="submit">
</div>
</form>
class="form__text"
name="icon"
required
type="text"
>
<label class="form__label form__label--floating" for="icon">
Font Awesome icon code (e.g. fas fa-comment-smile)
</label>
</p>
<p class="form__group">
<button class="form__button form__button--outlined">
{{ __('common.cancel') }}
</button>
<button class="form__button form__button--filled">
{{ __('common.submit') }}
</button>
</p>
</form>
</dialog>
</div>
</div>
</div>
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered table-hover">
</header>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th>ID</th>
@@ -87,36 +116,119 @@
<tbody>
@foreach ($chatstatuses as $chatstatus)
<tr>
<td>{{ $chatstatus->id }}</td>
<td>{{ $chatstatus->name }}</td>
<td>
{{ $chatstatus->id }}
<i
class="{{ config('other.font-awesome') }} fa-circle"
style="color: {{ $chatstatus->color }};"
></i>
{{ $chatstatus->color }}
</td>
<td>
<a href="#">
{{ $chatstatus->name }}
</a>
<i class="{{ $chatstatus->icon }}"></i>
[{{ $chatstatus->icon }}]
</td>
<td>
<i class="{{ config('other.font-awesome') }} fa-circle"
style="color: {{ $chatstatus->color }};"></i> {{ $chatstatus->color }}
</td>
<td>
<i class="{{ $chatstatus->icon }}"></i> [{{ $chatstatus->icon }}]
</td>
<td>
<button class="btn btn-xs btn-warning" data-toggle="modal"
data-target="#editChatStatus-{{ $chatstatus->id }}">
<i class="{{ config('other.font-awesome') }} fa-pen-square"></i>
</button>
<button class="btn btn-xs btn-danger" data-toggle="modal"
data-target="#deleteChatStatus-{{ $chatstatus->id }}">
<i class="{{ config('other.font-awesome') }} fa-trash"></i>
</button>
@include('Staff.chat.status.chatstatuses_modals', ['chatstatus' => $chatstatus])
<menu class="data-table__actions">
<li class="data-table__action" x-data>
<button class="form__button form__button--text" x-on:click.stop="$refs.dialog.showModal()">
{{ __('common.edit') }}
</button>
<dialog class="dialog" x-ref="dialog">
<h3 class="dialog__heading">
{{ __('common.edit') }} Chat Status ({{ $chatstatus->name }})
</h3>
<form
class="dialog__form"
method="POST"
action="{{ route('staff.statuses.update', ['id' => $chatstatus->id]) }}"
x-on:click.outside="$refs.dialog.close()"
>
@csrf
<p class="form__group">
<input
id="name"
class="form__text"
name="name"
required
type="text"
value="{{ $chatstatus->name }}"
>
<label class="form__label form__label--floating" for="name">
{{ __('common.name') }}
</label>
</p>
<p class="form__group">
<input
id="color"
class="form__text"
name="color"
required
type="text"
value="{{ $chatstatus->color }}"
>
<label class="form__label form__label--floating" for="color">
{{ __('common.color') }} (e.g. #ff0000)
</label>
</p>
<p class="form__group">
<input
id="icon"
class="form__text"
name="icon"
placeholder="Enter Font Awesome Code Here..."
required
type="text"
value="{{ $chatstatus->icon }}"
>
<label class="form__label form__label--floating" for="icon">
Font Awesome icon code (e.g. fas fa-comment-smile)
</label>
</p>
<p class="form__group">
<button class="form__button form__button--filled">
{{ __('common.submit') }}
</button>
<button x-on:click.prevent="$refs.dialog.close()" class="form__button form__button--outlined">
{{ __('common.cancel') }}
</button>
</p>
</form>
</dialog>
</li>
<li class="data-table__action">
<form
method="POST"
action="{{ route('staff.statuses.destroy', ['id' => $chatstatus->id]) }}"
x-data
>
@csrf
@method('DELETE')
<button
x-on:click.prevent="Swal.fire({
title: 'Are you sure?',
text: 'Are you sure you want to delete this chat status: {{ $chatstatus->name }}?',
icon: 'warning',
showConfirmButton: true,
showCancelButton: true,
}).then((result) => {
if (result.isConfirmed) {
$root.submit();
}
})"
class="form__button form__button--text"
>
{{ __('common.delete') }}
</button>
</form>
</li>
</menu>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</section>
@endsection
+38 -62
View File
@@ -19,67 +19,43 @@
</li>
@endsection
@section('content')
<div class="container">
<div class="block">
<h2>{{ __('staff.possible-leech-cheaters') }} (Ghost Leechers)</h2>
<hr>
<div class="row">
<div class="col-sm-12">
<p class="text-red">
<strong><i class="{{ config('other.font-awesome') }} fa-question"></i>
{{ __('staff.possible-leech-cheaters') }}
</strong>
</p>
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered table-hover">
<thead>
<tr>
<th>{{ __('common.user') }}</th>
<th>{{ __('common.group') }}</th>
<th>{{ __('user.member-since') }}</th>
<th>{{ __('user.last-login') }}</th>
</tr>
</thead>
<tbody>
@foreach ($cheaters as $cheater)
<tr>
<td>
<a class="text-bold"
href="{{ route('users.show', ['username' => $cheater->user->username]) }}">{{ $cheater->user->username }}</a>
</td>
<td>
<span class="badge-user text-bold"
style="color:{{ $cheater->user->group->color }}; background-image:{{ $cheater->user->group->effect }};">
<i class="{{ $cheater->user->group->icon }}" data-toggle="tooltip"
data-original-title="{{ $cheater->user->group->name }}"></i>
{{ $cheater->user->group->name }}
</span>
</td>
<td>
@if ($cheater->user->created_at != null)
{{ $cheater->user->created_at->toDayDateTimeString() }}
@else
N/A
@endif
</td>
<td>
@if ($cheater->user->last_login != null)
{{ $cheater->user->last_login->toDayDateTimeString() }}
@else
N/A
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
<div class="text-center">
{{ $cheaters->links() }}
</div>
@section('page', 'page__cheaters--index')
@section('main')
<section class="panelV2">
<h2 class="panel__heading">
{{ __('staff.possible-leech-cheaters') }} (Ghost Leechers)
</h2>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th>{{ __('common.user') }}</th>
<th>{{ __('user.member-since') }}</th>
<th>{{ __('user.last-login') }}</th>
</tr>
</thead>
<tbody>
@foreach ($cheaters as $cheater)
<tr>
<td>
<x-user_tag :anon="false" :user="$cheater->user" />
</td>
<td>
<time datetime="{{ $cheater->user->created_at ?? '' }}">
{{ $cheater->user->created_at ?? 'N/A' }}
</time>
</td>
<td>
<time datetime="{{ $cheater->user->last_login ?? '' }}">
{{ $cheater->user->last_login ?? 'N/A'}}
</time>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
{{ $cheaters->links('partials.pagination') }}
</section>
@endsection
+116 -168
View File
@@ -19,175 +19,123 @@
</li>
@endsection
@section('content')
<div class="container">
<div class="block">
<div class="row text-center">
<div class="col-md-4">
<div class="block">
<div class="panel-body">
<h3 class="text-bold text-green">
<i class="{{ config('other.font-awesome') }} fa-terminal"></i> Enable Maintenance Mode
</h3>
<h4 class="text-muted">This commands enables maintenance mode while whitelisting only you IP
Address.</h4>
<form role="form" method="POST" action="{{ url('/dashboard/commands/maintance-enable') }}">
@csrf
<button type="submit" class="btn btn-sm btn-primary">
<i class='{{ config('other.font-awesome') }} fa-check-circle'></i> Run Commnd
</button>
</form>
</div>
</div>
</div>
@section('page', 'page__commands--index')
<div class="col-md-4">
<div class="block">
<div class="panel-body">
<h3 class="text-bold text-green">
<i class="{{ config('other.font-awesome') }} fa-terminal"></i> Disable Maintenance Mode
</h3>
<h4 class="text-muted">This commands disables maintenance mode. Bringing the site backup for
all
to access.</h4>
<form role="form" method="POST" action="{{ url('/dashboard/commands/maintance-disable') }}">
@csrf
<button type="submit" class="btn btn-sm btn-primary">
<i class='{{ config('other.font-awesome') }} fa-check-circle'></i> Run Commnd
</button>
</form>
</div>
</div>
</div>
<div class="col-md-4">
<div class="block">
<div class="panel-body">
<h3 class="text-bold text-green">
<i class="{{ config('other.font-awesome') }} fa-terminal"></i> Clear Cache
</h3>
<h4 class="text-muted">This commands clears your sites cache. This cache depends on what
driver
you are using.</h4>
<form role="form" method="POST" action="{{ url('/dashboard/commands/clear-cache') }}">
@csrf
<button type="submit" class="btn btn-sm btn-primary">
<i class='{{ config('other.font-awesome') }} fa-check-circle'></i> Run Commnd
</button>
</form>
</div>
</div>
</div>
<br>
<br>
<div class="col-md-4">
<div class="block">
<div class="panel-body">
<h3 class="text-bold text-green">
<i class="{{ config('other.font-awesome') }} fa-terminal"></i> Clear View Cache
</h3>
<h4 class="text-muted">This commands clears your sites compiled views cache.</h4>
<form role="form" method="POST" action="{{ url('/dashboard/commands/clear-view-cache') }}">
@csrf
<button type="submit" class="btn btn-sm btn-primary">
<i class='{{ config('other.font-awesome') }} fa-check-circle'></i> Run Commnd
</button>
</form>
</div>
</div>
</div>
<div class="col-md-4">
<div class="block">
<div class="panel-body">
<h3 class="text-bold text-green">
<i class="{{ config('other.font-awesome') }} fa-terminal"></i> Clear Route Cache
</h3>
<h4 class="text-muted">This commands clears your sites compiled routes cache.</h4>
<form role="form" method="POST" action="{{ url('/dashboard/commands/clear-route-cache') }}">
@csrf
<button type="submit" class="btn btn-sm btn-primary">
<i class='{{ config('other.font-awesome') }} fa-check-circle'></i> Run Commnd
</button>
</form>
</div>
</div>
</div>
<div class="col-md-4">
<div class="block">
<div class="panel-body">
<h3 class="text-bold text-green">
<i class="{{ config('other.font-awesome') }} fa-terminal"></i> Clear Config Cache
</h3>
<h4 class="text-muted">This commands clears your sites compiled configs cache.</h4>
<form role="form" method="POST"
action="{{ url('/dashboard/commands/clear-config-cache') }}">
@csrf
<button type="submit" class="btn btn-sm btn-primary">
<i class='{{ config('other.font-awesome') }} fa-check-circle'></i> Run Commnd
</button>
</form>
</div>
</div>
</div>
<br>
<br>
<div class="col-md-4">
<div class="block">
<div class="panel-body">
<h3 class="text-bold text-green">
<i class="{{ config('other.font-awesome') }} fa-terminal"></i> Clear All Cache
</h3>
<h4 class="text-muted">This commands clears ALL of your sites cache.</h4>
<form role="form" method="POST" action="{{ url('/dashboard/commands/clear-all-cache') }}">
@csrf
<button type="submit" class="btn btn-sm btn-primary">
<i class='{{ config('other.font-awesome') }} fa-check-circle'></i> Run Commnd
</button>
</form>
</div>
</div>
</div>
<div class="col-md-4">
<div class="block">
<div class="panel-body">
<h3 class="text-bold text-green">
<i class="{{ config('other.font-awesome') }} fa-terminal"></i> Set All Cache
</h3>
<h4 class="text-muted">This commands sets ALL of your sites cache.</h4>
<form role="form" method="POST" action="{{ url('/dashboard/commands/set-all-cache') }}">
@csrf
<button type="submit" class="btn btn-sm btn-primary">
<i class='{{ config('other.font-awesome') }} fa-check-circle'></i> Run Commnd
</button>
</form>
</div>
</div>
</div>
<div class="col-md-4">
<div class="block">
<div class="panel-body">
<h3 class="text-bold text-green">
<i class="{{ config('other.font-awesome') }} fa-terminal"></i> Send Test Email
</h3>
<h4 class="text-muted">This commands tests your email configuration.</h4>
<form role="form" method="POST" action="{{ url('/dashboard/commands/test-email') }}">
@csrf
<button type="submit" class="btn btn-sm btn-primary">
<i class='{{ config('other.font-awesome') }} fa-check-circle'></i> Run Commnd
</button>
</form>
</div>
</div>
</div>
@section('main')
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem;">
<section class="panelV2">
<h2 class="panel__heading">Maintenance Mode</h2>
<div class="panel__body">
<p class="form__group form__group--horizontal">
<form role="form" method="POST" action="{{ url('/dashboard/commands/maintance-enable') }}">
@csrf
<button
class="form__button form__button--text"
title="This commands enables maintenance mode while whitelisting only your IP Address."
>
Enable Maintenance Mode
</button>
</form>
</p>
<p class="form__group form__group--horizontal">
<form role="form" method="POST" action="{{ url('/dashboard/commands/maintance-disable') }}">
@csrf
<button
class="form__button form__button--text"
title="This commands disables maintenance mode. Bringing the site backup for all to access."
>
Disable Maintenance Mode
</button>
</form>
</p>
</div>
</div>
</section>
<section class="panelV2">
<h2 class="panel__heading">Caching</h2>
<div class="panel__body">
<p class="form__group form__group--horizontal">
<form method="POST" action="{{ url('/dashboard/commands/clear-cache') }}">
@csrf
<button
class="form__button form__button--text"
title="This commands clears your sites cache. This cache depends on what driver you are using."
>
Clear cache
</button>
</form>
</p>
<p class="form__group form__group--horizontal">
<form method="POST" action="{{ url('/dashboard/commands/clear-view-cache') }}">
@csrf
<button
class="form__button form__button--text"
title="This commands clears your sites compiled views cache."
>
Clear view cache
</button>
</form>
</p>
<p class="form__group form__group--horizontal">
<form method="POST" action="{{ url('/dashboard/commands/clear-route-cache') }}">
@csrf
<button
class="form__button form__button--text"
title="This commands clears your sites compiled routes cache."
>
Clear route cache
</button>
</form>
</p>
<p class="form__group form__group--horizontal">
<form method="POST" action="{{ url('/dashboard/commands/clear-config-cache') }}">
@csrf
<button
class="form__button form__button--text"
title="This commands clears your sites compiled configs cache."
>
Clear config cache
</button>
</form>
</p>
<p class="form__group form__group--horizontal">
<form method="POST" action="{{ url('/dashboard/commands/clear-all-cache') }}">
@csrf
<button
class="form__button form__button--text"
title="This commands clears ALL of your sites cache."
>
Clear all cache
</button>
</form>
</p>
<p class="form__group form__group--horizontal">
<form method="POST" action="{{ url('/dashboard/commands/set-all-cache') }}">
@csrf
<button
class="form__button form__button--text"
title="This commands sets ALL of your sites cache."
>
Set all cache
</button>
</form>
</p>
</div>
</section>
<section class="panelV2">
<h2 class="panel__heading">Email</h2>
<div class="panel__body">
<p class="form__group form__group--horizontal">
<form method="POST" action="{{ url('/dashboard/commands/test-email') }}">
@csrf
<button
class="form__button form__button--text"
title="This commands tests your email configuration."
>
Send test email
</button>
</form>
</p>
</div>
</section>
</div>
@endsection
+467 -226
View File
@@ -14,236 +14,477 @@
</li>
@endsection
@section('content')
<div class="container-fluid">
<div class="row">
@include('partials.dashboardmenu')
@section('page', 'page__dashboard')
<div class="col-sm-5 col-lg-5">
<div class="block" id="vue">
<div class="panel-body">
<h2 class="text-bold text-center text-green">
<i class="{{ config('other.font-awesome') }} fa-terminal"></i> Codebase
</h2>
<h3 class="text-bold text-center">Currently Running {{ config('unit3d.codebase') }}
{{ config('unit3d.version') }}</h3>
<version></version>
</div>
</div>
@section('main')
<div class="dashboard__menus">
<section class="panelV2 panel--grid-item">
<h2 class="panel__heading">
<i class="{{ config('other.font-awesome') }} fa-link"></i>
{{ __('staff.links') }}
</h2>
<div class="panel__body">
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('home.index') }}">
<i class="{{ config('other.font-awesome') }} fa-columns"></i>
{{ __('staff.frontend') }}
</a>
</p>
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.dashboard.index') }}">
<i class="{{ config('other.font-awesome') }} fa-columns"></i>
{{ __('staff.staff-dashboard') }}
</a>
</p>
@if (auth()->user()->group->is_owner)
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.backups.index') }}">
<i class="{{ config('other.font-awesome') }} fa-hdd"></i>
{{ __('backup.backup') }}
{{ __('backup.manager') }}
</a>
</p>
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.commands.index') }}">
<i class="fab fa-laravel"></i> Commands
</a>
</p>
@endif
</div>
<div class="col-sm-5 col-lg-5">
<div class="block">
<div class="panel-body">
@if (request()->secure())
<h2 class="text-bold text-center text-green">
<i class=" {{ config('other.font-awesome') }} fa-lock"></i> SSL Cert
</h2>
<h3 class="text-bold text-center">
{{ config('app.url') }}
</h3>
<div class="text-center" style="padding-top: 15px;">
<span class="text-red">Issued By: {{ (!is_string($certificate)) ? $certificate->getIssuer() : "No Certificate Info Found" }}</span>
<br>
<span class="text-red">Expires: {{ (!is_string($certificate)) ? $certificate->expirationDate()->diffForHumans() : "No Certificate Info Found" }}</span>
</div>
@else
<h2 class="text-bold text-center text-red">
<i class=" {{ config('other.font-awesome') }} fa-unlock"></i> SSL Cert
</h2>
<h3 class="text-bold text-center">
{{ config('app.url') }} -- <span class="text-muted">Connection Not Secure</span>
</h3>
<div style="padding-top: 15px;">
<span class="text-red text-left">Issued By: N/A</span>
<span class="text-red" style="float: right;">Expires: N/A</span>
</div>
</section>
<section class="panelV2 panel--grid-item">
<h2 class="panel__heading">
<i class="{{ config('other.font-awesome') }} fa-wrench"></i>
{{ __('staff.chat-tools') }}
</h2>
<div class="panel__body">
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.statuses.index') }}">
<i class="{{ config('other.font-awesome') }} fa-comment-dots"></i>
{{ __('staff.statuses') }}
</a>
</p>
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.rooms.index') }}">
<i class="{{ config('other.font-awesome') }} fa-comment-dots"></i>
{{ __('staff.rooms') }}
</a>
</p>
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.bots.index') }}">
<i class="{{ config('other.font-awesome') }} fa-robot"></i>
{{ __('staff.bots') }}
</a>
</p>
<p class="form__group form__group--horizontal">
<form method="POST" action="{{ route('staff.flush.chat') }}" x-data>
@csrf
<button
x-on:click.prevent="Swal.fire({
title: 'Are you sure?',
text: 'Are you sure you want to delete all chatbox messages in all chatrooms (including private chatbox messages)?',
icon: 'warning',
showConfirmButton: true,
showCancelButton: true,
}).then((result) => {
if (result.isConfirmed) {
$root.submit();
}
})"
class="form__button form__button--text" href
>
<i class="{{ config('other.font-awesome') }} fa-broom"></i>
{{ __('staff.flush-chat') }}
</button>
</form>
</p>
</div>
</section>
<section class="panelV2 panel--grid-item">
<h2 class="panel__heading">
<i class="{{ config('other.font-awesome') }} fa-wrench"></i>
{{ __('staff.general-tools') }}
</h2>
<div class="panel__body">
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.articles.index') }}">
<i class="{{ config('other.font-awesome') }} fa-newspaper"></i>
{{ __('staff.articles') }}
</a>
</p>
@if (auth()->user()->group->is_admin)
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.forums.index') }}">
<i class="fab fa-wpforms"></i>
{{ __('staff.forums') }}
</a>
</p>
@endif
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.pages.index') }}">
<i class="{{ config('other.font-awesome') }} fa-file"></i>
{{ __('staff.pages') }}
</a>
</p>
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.polls.index') }}">
<i class="{{ config('other.font-awesome') }} fa-chart-pie"></i>
{{ __('staff.polls') }}
</a>
</p>
</div>
</section>
<section class="panelV2 panel--grid-item">
<h2 class="panel__heading">
<i class="{{ config('other.font-awesome') }} fa-wrench"></i>
{{ __('staff.torrent-tools') }}
</h2>
<div class="panel__body">
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.moderation.index') }}">
<i class="{{ config('other.font-awesome') }} fa-columns"></i>
{{ __('staff.torrent-moderation') }}
</a>
</p>
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.categories.index') }}">
<i class="{{ config('other.font-awesome') }} fa-columns"></i>
{{ __('staff.torrent-categories') }}
</a>
</p>
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.types.index') }}">
<i class="{{ config('other.font-awesome') }} fa-columns"></i>
{{ __('staff.torrent-types') }}
</a>
</p>
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.resolutions.index') }}">
<i class="{{ config('other.font-awesome') }} fa-columns"></i>
{{ __('staff.torrent-resolutions') }}
</a>
</p>
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.rss.index') }}">
<i class="{{ config('other.font-awesome') }} fa-rss"></i>
{{ __('staff.rss') }}
</a>
</p>
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.media_languages.index') }}">
<i class="{{ config('other.font-awesome') }} fa-columns"></i>
{{ __('common.media-languages') }}
</a>
</p>
<p class="form__group form__group--horizontal">
<form method="POST" action="{{ route('staff.flush.peers') }}" x-data>
@csrf
<button
x-on:click.prevent="Swal.fire({
title: 'Are you sure?',
text: 'Are you sure you want to delete all ghost peers?',
icon: 'warning',
showConfirmButton: true,
showCancelButton: true,
}).then((result) => {
if (result.isConfirmed) {
$root.submit();
}
})"
class="form__button form__button--text" href
>
<i class="{{ config('other.font-awesome') }} fa-ghost"></i>
{{ __('staff.flush-ghost-peers') }}
</button>
</form>
</p>
</div>
</section>
<section class="panelV2 panel--grid-item">
<h2 class="panel__heading">
<i class="{{ config('other.font-awesome') }} fa-wrench"></i>
{{ __('staff.user-tools') }}
</h2>
<div class="panel__body">
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.applications.index') }}">
<i class="{{ config('other.font-awesome') }} fa-list"></i>
{{ __('staff.applications') }} ({{ $apps->pending }})
@if ($apps->pending > 0)
<x-animation.notification />
@endif
</div>
</div>
</a>
</li>
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('user_search') }}">
<i class="{{ config('other.font-awesome') }} fa-users"></i>
{{ __('staff.user-search') }}
</a>
</p>
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.watchlist.index') }}">
<i class="{{ config('other.font-awesome') }} fa-eye"></i>
Watchlist
</a>
</p>
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.gifts.index') }}">
<i class="{{ config('other.font-awesome') }} fa-gift"></i>
{{ __('staff.user-gifting') }}
</a>
</p>
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.mass-pm.create') }}">
<i class="{{ config('other.font-awesome') }} fa-envelope-square"></i>
{{ __('staff.mass-pm') }}
</a>
</p>
<p class="form__group form__group--horizontal">
<form method="GET" action="{{ route('staff.mass-actions.validate') }}" x-data>
@csrf
<button
x-on:click.prevent="Swal.fire({
title: 'Are you sure?',
text: 'Are you sure you want to automatically validate all users even if their email address isn\'t confirmed?',
icon: 'warning',
showConfirmButton: true,
showCancelButton: true,
}).then((result) => {
if (result.isConfirmed) {
$root.submit();
}
})"
class="form__button form__button--text" href
>
<i class="{{ config('other.font-awesome') }} fa-history"></i>
{{ __('staff.mass-validate-users') }}
</button>
</form>
</p>
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.cheaters.index') }}">
<i class="{{ config('other.font-awesome') }} fa-question"></i>
{{ __('staff.possible-leech-cheaters') }}
</a>
</p>
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.seedboxes.index') }}">
<i class="{{ config('other.font-awesome') }} fa-server"></i>
{{ __('staff.seedboxes') }}
</a>
</p>
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.internals.index') }}">
<i class="{{ config('other.font-awesome') }} fa-magic"></i>
Internals
</a>
</p>
@if (auth()->user()->group->is_admin)
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.groups.index') }}">
<i class="{{ config('other.font-awesome') }} fa-users"></i>
{{ __('staff.groups') }}
</a>
</p>
@endif
</div>
<div class="col-sm-10 col-lg-10">
<div class="block" style=" margin-top: 30px;">
<div class="panel-heading">
<h1 class="text-center">
<u>Statistics</u>
</h1>
</div>
<div class="panel-body">
<div class="row black-list">
<div class="col-xs-6 col-sm-4 col-md-4">
<div class="text-center black-item">
<h1 style=" color: #ffffff;">Torrents</h1>
<span class="badge-user">Total: {{ $torrents->total }}</span>
<br>
<span class="badge-user">Pending: {{ $torrents->pending }}</span>
<span class="badge-user">Rejected: {{ $torrents->rejected }}</span>
<i class="fal fa-magnet black-icon text-green"></i>
</div>
</div>
<div class="col-xs-6 col-sm-4 col-md-4">
<div class="text-center black-item">
<h1 style=" color: #ffffff;">Peers</h1>
<span class="badge-user">Total: {{ $peers->total }}</span>
<br>
<span class="badge-user">Seeders: {{ $peers->seeders }}</span>
<span class="badge-user">Leechers: {{ $peers->leechers }}</span>
<i class="fal fa-wifi black-icon text-green"></i>
</div>
</div>
<div class="col-xs-6 col-sm-4 col-md-4">
<div class="text-center black-item">
<h1 style=" color: #ffffff;">Users</h1>
<span class="badge-user">Total: {{ $users->total }}</span>
<br>
<span class="badge-user">Validating: {{ $users->validating }}</span>
<span class="badge-user">Banned: {{ $users->banned }}</span>
<i class="fal fa-users black-icon text-green"></i>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="panelV2 panel--grid-item">
<h2 class="panel__heading">
<i class="{{ config('other.font-awesome') }} fa-file"></i>
{{ __('staff.logs') }}
</h2>
<div class="panel__body">
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.audits.index') }}">
<i class="{{ config('other.font-awesome') }} fa-file"></i>
{{ __('staff.audit-log') }}
</a>
</p>
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.bans.index') }}">
<i class="{{ config('other.font-awesome') }} fa-file"></i>
{{ __('staff.bans-log') }}
</a>
</p>
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.authentications.index') }}">
<i class="{{ config('other.font-awesome') }} fa-file"></i>
{{ __('staff.failed-login-log') }}
</a>
</p>
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.invites.index') }}">
<i class="{{ config('other.font-awesome') }} fa-file"></i>
{{ __('staff.invites-log') }}
</a>
</p>
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.notes.index') }}">
<i class="{{ config('other.font-awesome') }} fa-file"></i>
{{ __('staff.user-notes') }}
</a>
</p>
@if (auth()->user()->group->is_owner)
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.laravellog.index') }}">
<i class="fa fa-file"></i> {{ __('staff.laravel-log') }}
</a>
</p>
@endif
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.reports.index') }}">
<i class="{{ config('other.font-awesome') }} fa-file"></i>
{{ __('staff.reports-log') }} ({{ $reports->unsolved }})
@if ($reports->unsolved > 0)
<x-animation.notification />
@endif
</a>
</p>
<p class="form__group form__group--horizontal">
<a class="form__button form__button--text" href="{{ route('staff.warnings.index') }}">
<i class="{{ config('other.font-awesome') }} fa-file"></i>
{{ __('staff.warnings-log') }}
</a>
</p>
</div>
<div class="col-sm-10 col-lg-10">
<div class="block" style=" margin-top: 30px;">
<div class="panel-heading">
<h1 class="text-center">
<u>Server Information</u>
</h1>
</div>
<div class="panel-body">
<div class="row black-list">
<div class="col-xs-6 col-sm-3 col-md-3">
<div class="text-center black-item">
<h1 style=" color: #ffffff;">OS</h1>
<span class="badge-user">Currently Running</span>
<br>
<span class="badge-user">{{ $basic['os'] }}</span>
<i class="fal fa-desktop black-icon text-green"></i>
</div>
</div>
<div class="col-xs-6 col-sm-3 col-md-3">
<div class="text-center black-item">
<h1 style=" color: #ffffff;">PHP</h1>
<span class="badge-user">Currently Running</span>
<br>
<span class="badge-user">php{{ $basic['php'] }}</span>
<i class="fal fa-terminal black-icon text-green"></i>
</div>
</div>
<div class="col-xs-6 col-sm-3 col-md-3">
<div class="text-center black-item">
<h1 style=" color: #ffffff;">DATABASE</h1>
<span class="badge-user">Currently Running</span>
<br>
<span class="badge-user">{{ $basic['database'] }}</span>
<i class="fal fa-database black-icon text-green"></i>
</div>
</div>
<div class="col-xs-6 col-sm-3 col-md-3">
<div class="text-center black-item">
<h1 style=" color: #ffffff;">LARAVEL</h1>
<span class="badge-user">Currently Running</span>
<br>
<span class="badge-user">Ver. {{ $basic['laravel'] }}</span>
<i class="fal fa-code-merge black-icon text-green"></i>
</div>
</div>
</div>
<div class="row black-list">
<div class="col-xs-6 col-sm-4 col-md-4">
<div class="text-center black-item">
<h1 style=" color: #ffffff;">RAM</h1>
<span class="badge-user">Total: {{ $ram['total'] }}</span>
<br>
<span class="badge-user">Available: {{ $ram['available'] }}</span>
<span class="badge-user">Used: {{ $ram['used'] }}</span>
<i class="fal fa-memory black-icon text-green"></i>
</div>
</div>
<div class="col-xs-6 col-sm-4 col-md-4">
<div class="text-center black-item">
<h1 style=" color: #ffffff;">DISK</h1>
<span class="badge-user">Total: {{ $disk['total'] }}</span>
<br>
<span class="badge-user">Free: {{ $disk['free'] }}</span>
<span class="badge-user">Used: {{ $disk['used'] }}</span>
<i class="fal fa-hdd black-icon text-green"></i>
</div>
</div>
<div class="col-xs-6 col-sm-4 col-md-4">
<div class="text-center black-item">
<h1 style=" color: #ffffff;">LOAD</h1>
<span class="badge-user">Average: {{ $avg }}</span>
<br>
<span class="badge-user">Estimated</span>
<i class="fal fa-balance-scale-right black-icon text-green"></i>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-10 col-lg-10">
<div class="block" style=" margin-top: 30px;">
<div class="panel-heading">
<h1 class="text-center">
<u>Directory Permissions</u>
</h1>
</div>
<div class="panel-body">
<table class="table table-hover">
<thead>
<tr>
<th width="80%">Directory</th>
<th>Current</th>
<th>Recommended</th>
</tr>
</thead>
<tbody>
@foreach ($file_permissions as $permission)
<tr>
<td>{{ $permission['directory'] }}</td>
<td>
@if ($permission['permission'] == $permission['recommended'])
<span class="bold text-success">
<i class="{{ config('other.font-awesome') }} fa-check-circle"></i>
{{ $permission['permission'] }}
</span>
@else
<span class="bold text-danger">
<i class="{{ config('other.font-awesome') }} fa-times-circle"></i>
{{ $permission['permission'] }}
</span>
@endif
</td>
<td>{{ $permission['recommended'] }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>
</div>
@endsection
@section('sidebar')
<section class="panelV2">
<h2 class="panel__heading">SSL Certificate</h2>
<dl class="key-value">
<dt>URL</dt>
<dd>{{ config('app.url') }}</dd>
@if (request()->secure())
<dt>Connection</dt>
<dd>Secure</dd>
<dt>Issued By</dt>
<dd>{{ (!is_string($certificate)) ? $certificate->getIssuer() : "No Certificate Info Found" }}</dd>
<dt>Expires</dt>
<dd>{{ (!is_string($certificate)) ? $certificate->expirationDate()->diffForHumans() : "No Certificate Info Found" }}</dd>
@else
<dt>Connection</dt>
<dd>
<strong>Not Secure</strong>
</dd>
<dt>Issued By</dt>
<dd>N/A</dd>
<dt>Expires</dt>
<dd>N/A</dd>
@endif
</dl>
</section>
<section class="panelV2">
<h2 class="panel__heading">Server Information</h2>
<dl class="key-value">
<dt>OS</dt>
<dd>{{ $basic['os'] }}</dd>
<dt>PHP</dt>
<dd>{{ $basic['php'] }}</dd>
<dt>Database</dt>
<dd>{{ $basic['database'] }}</dd>
<dt>Laravel</dt>
<dd>{{ $basic['laravel'] }}</dd>
<dt>{{ config('unit3d.codebase') }}</dt>
<dd>{{ config('unit3d.version') }}</dd>
</dl>
</section>
<div class="dashboard__stats">
<section class="panelV2 panel--grid-item">
<h2 class="panel__heading">Torrents</h2>
<dl class="key-value">
<dt>Total</dt>
<dd>{{ $torrents->total }}</dd>
<dt>Pending</dt>
<dd>{{ $torrents->pending }}</dd>
<dt>Rejected</dt>
<dd>{{ $torrents->rejected }}</dd>
</dl>
</section>
<section class="panelV2 panel--grid-item">
<h2 class="panel__heading">Peers</h2>
<dl class="key-value">
<dt>Total</dt>
<dd>{{ $peers->total }}</dd>
<dt>Seeds</dt>
<dd>{{ $peers->seeders }}</dd>
<dt>Leeches</dt>
<dd>{{ $peers->leechers }}</dd>
</dl>
</section>
<section class="panelV2 panel--grid-item">
<h2 class="panel__heading">Users</h2>
<dl class="key-value">
<dt>Total</dt>
<dd>{{ $users->total }}</dd>
<dt>Validating</dt>
<dd>{{ $users->validating }}</dd>
<dt>Banned</dt>
<dd>{{ $users->banned }}</dd>
</dl>
</section>
<section class="panelV2 panel--grid-item">
<h2 class="panel__heading">RAM</h2>
<dl class="key-value">
<dt>Total</dt>
<dd>{{ $ram['total'] }}</dd>
<dt>Used</dt>
<dd>{{ $ram['used'] }}</dd>
<dt>Free</dt>
<dd>{{ $ram['available'] }}</dd>
</dl>
</section>
<section class="panelV2 panel--grid-item">
<h2 class="panel__heading">Disk</h2>
<dl class="key-value">
<dt>Total</dt>
<dd>{{ $disk['total'] }}</dd>
<dt>Used</dt>
<dd>{{ $disk['used'] }}</dd>
<dt>Free</dt>
<dd>{{ $disk['free'] }}</dd>
</dl>
</section>
<section class="panelV2 panel--grid-item">
<h2 class="panel__heading">Load</h2>
<dl class="key-value">
<dt>Average</dt>
<dd>{{ $avg }}</dd>
</dl>
</section>
</div>
<section class="panelV2">
<h2 class="panel__heading">Directory Permissions</h2>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th>Directory</th>
<th>Current</th>
<th><abbr title="Recommended">Rec.</abbr></th>
</tr>
</thead>
<tbody>
@foreach ($file_permissions as $permission)
<tr>
<td>{{ $permission['directory'] }}</td>
<td>
@if ($permission['permission'] === $permission['recommended'])
<i class="{{ config('other.font-awesome') }} fa-check-circle"></i>
{{ $permission['permission'] }}
@else
<i class="{{ config('other.font-awesome') }} fa-times-circle"></i>
{{ $permission['permission'] }}
@endif
</td>
<td>{{ $permission['recommended'] }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</section>
@endsection
+82 -79
View File
@@ -24,88 +24,91 @@
</li>
@endsection
@section('content')
<div class="container box">
<h2>Add a new Forum</h2>
@section('page', 'page__forums-admin--create')
<form role="form" method="POST" action="{{ route('staff.forums.store') }}">
@csrf
<div class="form-group">
<label for="forum_type">Forum Type</label>
<label>
<select name="forum_type" class="form-control">
<option value="category">Category</option>
<option value="forum">Forum</option>
@section('main')
<section class="panelV2">
<h2 class="panel__heading">Add a new Forum</h2>
<div class="panel__body">
<form class="form" method="POST" action="{{ route('staff.forums.store') }}">
@csrf
<p class="form__group">
<select id ="forum_type" class="form__select" name="forum_type" required>
<option class="form__option" value="category">Category</option>
<option class="form__option" value="forum">Forum</option>
</select>
</label>
</div>
<div class="form-group">
<label for="title">Title</label>
<label>
<input type="text" name="title" class="form-control">
</label>
</div>
<div class="form-group">
<label for="description">Description</label>
<label>
<textarea name="description" class="form-control" cols="30" rows="10"></textarea>
</label>
</div>
<div class="form-group">
<label for="parent_id">Parent forum</label>
<label>
<select name="parent_id" class="form-control">
<label class="form__label form__label--floating" for="forum_type">Forum Type</label>
</p>
<p class="form__group">
<input id="title" class="form__text" type="text" name="title" required>
<label class="form__label form__label--floating" for="title">Title</label>
</p>
<p class="form__group">
<textarea id="description" class="form__textarea" name="description" placeholder=""></textarea>
<label class="form__label form__label--floating" for="description">Description</label>
</p>
<p class="form__group">
<select id="parent_id" class="form__select" name="parent_id" required>
<option value="0">New Category</option>
@foreach ($categories as $c)
<option value="{{ $c->id }}">New Forum In {{ $c->name }} Category</option>
@foreach ($categories as $category)
<option class="form__option" value="{{ $category->id }}">
New Forum In {{ $category->name }} Category
</option>
@endforeach
</select>
</label>
</div>
<div class="form-group">
<label for="position">{{ __('common.position') }}</label>
<label>
<input type="text" name="position" class="form-control" placeholder="The position number">
</label>
</div>
<h3>Permissions</h3>
<table class="table table-striped">
<thead>
<tr>
<th>Groups</th>
<th>View the forum</th>
<th>Read topics</th>
<th>Start new topic</th>
<th>Reply to topics</th>
</tr>
</thead>
<tbody>
@foreach ($groups as $g)
<tr>
<td>{{ $g->name }}</td>
<td><label>
<input type="checkbox" name="permissions[{{ $g->id }}][show_forum]" value="1" checked>
</label></td>
<td><label>
<input type="checkbox" name="permissions[{{ $g->id }}][read_topic]" value="1" checked>
</label></td>
<td><label>
<input type="checkbox" name="permissions[{{ $g->id }}][start_topic]" value="1" checked>
</label></td>
<td><label>
<input type="checkbox" name="permissions[{{ $g->id }}][reply_topic]" value="1" checked>
</label></td>
</tr>
@endforeach
</tbody>
</table>
<button type="submit" class="btn btn-default">Save Forum</button>
</form>
</div>
<label class="form__label form__label--floating" for="parent_id">Parent forum</label>
</p>
<p class="form__group">
<input
id="position"
class="form__text"
inputmode="numeric"
name="position"
pattern="[0-9]*"
placeholder=""
type="text"
>
<label class="form__label form__label--floating" for="position">{{ __('common.position') }}</label>
</p>
<p class="form__group">
<h3>Permissions</h3>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th>Groups</th>
<th>View the forum</th>
<th>Read topics</th>
<th>Start new topic</th>
<th>Reply to topics</th>
</tr>
</thead>
<tbody>
@foreach ($groups as $group)
<tr>
<th>{{ $group->name }}</th>
<td><label>
<input type="checkbox" name="permissions[{{ $group->id }}][show_forum]" value="1" checked>
</label></td>
<td><label>
<input type="checkbox" name="permissions[{{ $group->id }}][read_topic]" value="1" checked>
</label></td>
<td><label>
<input type="checkbox" name="permissions[{{ $group->id }}][start_topic]" value="1" checked>
</label></td>
<td><label>
<input type="checkbox" name="permissions[{{ $group->id }}][reply_topic]" value="1" checked>
</label></td>
</tr>
@endforeach
</tbody>
</table>
</div>
</p>
<p class="form__group">
<button class="form__button form__button--filled">Save Forum</button>
</p>
</form>
</div>
</section>
@endsection
+113 -117
View File
@@ -19,36 +19,36 @@
{{ __('staff.forums') }}
</a>
</li>
<li class="breadcrumbV2">
{{ $forum->name }}
</li>
<li class="breadcrumb--active">
{{ __('common.edit') }}
</li>
@endsection
@section('content')
<div class="container box">
<h2>{{ __('common.edit') }}: {{ $forum->name }}</h2>
@section('page', 'page__forums-admin--edit')
<form role="form" method="POST" action="{{ route('staff.forums.update', ['id' => $forum->id]) }}">
@csrf
<div class="form-group">
<label for="title">Title</label>
<label>
<input type="text" name="title" class="form-control" value="{{ $forum->name }}">
</label>
</div>
<div class="form-group">
<label for="description">Description</label>
<label>
<textarea name="description" class="form-control" cols="30"
rows="10">{{ $forum->description }}</textarea>
</label>
</div>
<div class="form-group">
<label for="forum_type">Forum Type</label>
<label>
<select name="forum_type" class="form-control">
@section('main')
<section class="panelV2">
<h2 class="panel__heading">{{ __('common.edit') }} {{ __('forum.forum') }}</h2>
<div class="panel__body">
<form class="form" method="POST" action="{{ route('staff.forums.update', ['id' => $forum->id]) }}">
@csrf
<p class="form__group">
<input id="title" class="form__text" type="text" name="title" value="{{ $forum->name }}">
<label class="form__label form__label--floating" for="title">Title</label>
</p>
<p class="form__group">
<textarea
id="description"
name="description"
class="form__textarea"
>{{ $forum->description }}</textarea>
<label class="form__label form__label--floating" for="description">Description</label>
</p>
<p class="form__group">
<select name="forum_type" class="form__select">
@if ($forum->getCategory() == null)
<option value="category" selected>Category (Current)</option>
<option value="forum">Forum</option>
@@ -57,102 +57,98 @@
<option value="forum" selected>Forum (Current)</option>
@endif
</select>
</label>
</div>
<div class="form-group">
<label for="parent_id">Parent forum</label>
<label>
<select name="parent_id" class="form-control">
<label class="form__label form__label--floating" for="forum_type">Forum Type</label>
</p>
<p class="form__group">
<select name="parent_id" class="form__select">
@if ($forum->getCategory() != null)
<option value="{{ $forum->parent_id }}" selected>{{ $forum->getCategory()->name }}
(Current)
<option value="{{ $forum->parent_id }}" selected>
{{ $forum->getCategory()->name }} (Current)
</option>
@endif
@foreach ($categories as $c)
<option value="{{ $c->id }}">{{ $c->name }}</option>
@foreach ($categories as $category)
<option value="{{ $category->id }}">{{ $category->name }}</option>
@endforeach
</select>
</label>
</div>
<div class="form-group">
<label for="position">{{ __('common.position') }}</label>
<label>
<input type="text" name="position" class="form-control" placeholder="The position number"
value="{{ $forum->position }}">
</label>
</div>
<h3>Permissions</h3>
<table class="table table-striped">
<thead>
<tr>
<th>Groups</th>
<th>View the forum</th>
<th>Read topics</th>
<th>Start new topic</th>
<th>Reply to topics</th>
</tr>
</thead>
<tbody>
@foreach ($groups as $g)
<tr>
<td>{{ $g->name }}</td>
<td>
@if ($g->getPermissionsByForum($forum)->show_forum == true)
<label>
<input type="checkbox" checked name="permissions[{{ $g->id }}][show_forum]"
value="1">
</label>
@else
<label>
<input type="checkbox" name="permissions[{{ $g->id }}][show_forum]" value="1">
</label>
@endif
</td>
<td>
@if ($g->getPermissionsByForum($forum)->read_topic == true)
<label>
<input type="checkbox" checked name="permissions[{{ $g->id }}][read_topic]"
value="1">
</label>
@else
<label>
<input type="checkbox" name="permissions[{{ $g->id }}][read_topic]" value="1">
</label>
@endif
</td>
<td>
@if ($g->getPermissionsByForum($forum)->start_topic == true)
<label>
<input type="checkbox" checked name="permissions[{{ $g->id }}][start_topic]"
value="1">
</label>
@else
<label>
<input type="checkbox" name="permissions[{{ $g->id }}][start_topic]" value="1">
</label>
@endif
</td>
<td>
@if ($g->getPermissionsByForum($forum)->reply_topic == true)
<label>
<input type="checkbox" checked name="permissions[{{ $g->id }}][reply_topic]"
value="1">
</label>
@else
<label>
<input type="checkbox" name="permissions[{{ $g->id }}][reply_topic]" value="1">
</label>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
<button type="submit" class="btn btn-default">Save Forum</button>
</form>
</div>
<label class="form__label form__label--floating" for="parent_id">Parent forum</label>
</p>
<p class="form__group">
<input
id="position"
class="form__text"
inputmode="numeric"
name="position"
pattern="[0-9]*"
placeholder=""
type="text"
value="{{ $forum->position }}"
required
>
<label class="form__label form__label--floating" for="position">
{{ __('common.position') }}
</label>
</p>
<p class="form__group">
<label class="form__label">Permissions</label>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th>Groups</th>
<th>View the forum</th>
<th>Read topics</th>
<th>Start new topic</th>
<th>Reply to topics</th>
</tr>
</thead>
<tbody>
@foreach ($groups as $group)
<tr>
<td>{{ $group->name }}</td>
<td>
<input
type="checkbox"
name="permissions[{{ $group->id }}][show_forum]"
value="1"
@checked($group->getPermissionsByForum($forum)->show_forum)
/>
</td>
<td>
<input
type="checkbox"
name="permissions[{{ $group->id }}][read_topic]"
value="1"
@checked($group->getPermissionsByForum($forum)->read_topic)
/>
</td>
<td>
<input
type="checkbox"
name="permissions[{{ $group->id }}][start_topic]"
value="1"
@checked($group->getPermissionsByForum($forum)->start_topic)
/>
</td>
<td>
<input
type="checkbox"
name="permissions[{{ $group->id }}][reply_topic]"
value="1"
@checked($group->getPermissionsByForum($forum)->reply_topic)
/>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</p>
<p class="form__group">
<button class="form__button form__button--filled">
Save Forum
</button>
</p>
</form>
</div>
</section>
@endsection
+92 -32
View File
@@ -19,12 +19,18 @@
</li>
@endsection
@section('content')
<div class="container box">
<h2>Forums</h2>
<a href="{{ route('staff.forums.create') }}" class="btn btn-primary">Add New Category/Forum</a>
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered table-hover">
@section('page', 'page__forums-admin--index')
@section('main')
<section class="panelV2">
<header class="panel__header">
<h2 class="panel__heading">Forums</h2>
<a href="{{ route('staff.forums.create') }}" class="form__button form__button--text">
{{ __('common.add') }}
</a>
</header>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th>{{ __('common.name') }}</th>
@@ -35,41 +41,95 @@
</thead>
<tbody>
@foreach ($categories as $category)
<tr class="success">
<tr>
<td>
<a href="{{ route('staff.forums.edit', ['id' => $category->id]) }}">{{ $category->name }}</a>
</td>
<td>Category</td>
<td>{{ $category->position }}</td>
<td>
Category
</td>
<td>
{{ $category->position }}
</td>
<td>
<form action="{{ route('staff.forums.destroy', ['id' => $category->id]) }}" method="POST">
@csrf
@method('DELETE')
<button type="submit" class="btn btn-danger">{{ __('common.delete') }}</button>
</form>
<menu class="data-table__actions">
<li class="data-table__action">
<a
class="form__button form__button--text"
href="{{ route('staff.forums.edit', ['id' => $category->id]) }}"
>
{{ __('common.edit') }}
</a>
</li>
<li class="data-table__action">
<form
method="POST"
action="{{ route('staff.forums.destroy', ['id' => $category->id]) }}"
x-data
>
@csrf
@method('DELETE')
<button
x-on:click.prevent="Swal.fire({
title: 'Are you sure?',
text: 'Are you sure you want to delete this forum category: {{ $category->name }}?',
icon: 'warning',
showConfirmButton: true,
showCancelButton: true,
}).then((result) => {
if (result.isConfirmed) {
$root.submit();
}
})"
class="form__button form__button--text"
>
{{ __('common.delete') }}
</button>
</form>
</li>
</menu>
</td>
</tr>
@foreach ($category->getForumsInCategory()->sortBy('position') as $forum)
<tr>
<td>
<a href="{{ route('staff.forums.edit', ['id' => $forum->id]) }}">---- {{ $forum->name }}</a>
<td style="padding-left: 50px">
<a href="{{ route('staff.forums.edit', ['id' => $forum->id]) }}">{{ $forum->name }}</a>
</td>
<td>Forum</td>
<td>{{ $forum->position }}</td>
<td>
Forum
</td>
<td>
{{ $forum->position }}
</td>
<td>
<form action="{{ route('staff.forums.destroy', ['id' => $forum->id]) }}" method="POST">
@csrf
@method('DELETE')
<button type="submit" class="btn btn-danger">{{ __('common.delete') }}</button>
</form>
<menu class="data-table__actions">
<li class="data-table__action">
<a
class="form__button form__button--text"
href="{{ route('staff.forums.edit', ['id' => $forum->id]) }}"
>
{{ __('common.edit') }}
</a>
</li>
<li class="data-table__action">
<form
method="POST"
action="{{ route('staff.forums.destroy', ['id' => $forum->id]) }}"
x-data
>
@csrf
@method('DELETE')
<button
x-on:click.prevent="Swal.fire({
title: 'Are you sure?',
text: 'Are you sure you want to delete this forum: {{ $forum->name }}?',
icon: 'warning',
showConfirmButton: true,
showCancelButton: true,
}).then((result) => {
if (result.isConfirmed) {
$root.submit();
}
})"
class="form__button form__button--text"
>
{{ __('common.delete') }}
</button>
</form>
</li>
</menu>
</td>
</tr>
@endforeach
@@ -77,5 +137,5 @@
</tbody>
</table>
</div>
</div>
</section>
@endsection
+71 -34
View File
@@ -19,40 +19,77 @@
</li>
@endsection
@section('page', 'page__gift--index')
@section('content')
<div class="container box">
<h2>{{ __('bon.gifts') }}</h2>
<form action="{{ route('staff.gifts.store') }}" method="POST">
@csrf
<div class="form-group">
<label for="users">{{ __('common.username') }}</label>
<label>
<input name="username" class="form-control" placeholder="{{ __('common.username') }}" required>
</label>
</div>
<div class="form-group">
<label for="name">{{ __('bon.bon') }}</label>
<label>
<input type="number" class="form-control" name="seedbonus" value="0">
</label>
</div>
<div class="form-group">
<label for="name">{{ __('user.invites') }}</label>
<label>
<input type="number" class="form-control" name="invites" value="0">
</label>
</div>
<div class="form-group">
<label for="name">{{ __('torrent.freeleech-token') }}</label>
<label>
<input type="number" class="form-control" name="fl_tokens" value="0">
</label>
</div>
<button type="submit" class="btn btn-default">{{ __('bon.send-gift') }}</button>
</form>
<section class="panelV2">
<h2 class="panel__heading">{{ __('bon.gifts') }}</h2>
<div class="panel__body">
<form class="form" action="{{ route('staff.gifts.store') }}" method="POST">
@csrf
<p class="form__group">
<input
id="users"
class="form__text"
name="username"
required
type="text"
>
<label class="form__label form__label--floating" for="users">
{{ __('common.username') }}
</label>
</p>
<p class="form__group">
<input
id="seedbonus"
class="form__text"
inputmode="numeric"
name="seedbonus"
pattern="[0-9]*"
required
type="text"
value="0"
>
<label class="form__label form__label--floating" for="seedbonus">
{{ __('bon.bon') }}
</label>
</p>
<p class="form__group">
<input
id="invites"
class="form__text"
inputmode="numeric"
name="invites"
pattern="[0-9]*"
required
type="text"
value="0"
>
<label class="form__label form__label--floating" for="invites">
{{ __('user.invites') }}
</label>
</p>
<p class="form__group">
<input
id="name"
class="form__text"
inputmode="numeric"
name="fl_tokens"
pattern="[0-9]*"
required
type="text"
value="0"
>
<label class="form__label form__label--floating" for="fl_tokens">
{{ __('torrent.freeleech-token') }}
</label>
</p>
<p class="form__group">
<button class="form__button form__button--filled">
{{ __('bon.send-gift') }}
</button>
</p>
</form>
</div>
</div>
@endsection
+234 -145
View File
@@ -16,152 +16,241 @@
</li>
@endsection
@section('content')
<div class="container box">
<h2>Add New Group</h2>
<div class="table-responsive">
<form role="form" method="POST" action="{{ route('staff.groups.store') }}">
@csrf
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered table-hover">
<thead>
<tr>
<th>{{ __('common.name') }}</th>
<th>{{ __('common.position') }}</th>
<th>Level</th>
<th>DL Slots</th>
<th>Color</th>
<th>Icon</th>
<th>Effect</th>
<th>Internal</th>
<th>Modo</th>
<th>Admin</th>
<th>Owner</th>
<th>Trusted</th>
<th>Immune</th>
<th>Freeleech</th>
<th>Double Upload</th>
<th>Incognito</th>
<th>Upload</th>
<th>Autogroup</th>
</tr>
</thead>
@section('page', 'page__groups--create')
<tbody>
<tr>
<td>
<label>
<input type="text" name="name" value="" placeholder="{{ __('common.name') }}"
class="form-control"/>
</label>
</td>
<td>
<label>
<input type="number" name="position" value="" placeholder="{{ __('common.position') }}"
class="form-control"/>
</label>
</td>
<td>
<label>
<input type="number" name="level" value="" placeholder="Level"
class="form-control"/>
</label>
</td>
<td>
<label>
<input type="number" name="download_slots" value="" placeholder="Download Slots"
class="form-control"/>
</label>
</td>
<td>
<label>
<input type="text" name="color" value="" placeholder="HEX Color ID"
class="form-control"/>
</label>
</td>
<td>
<label>
<input type="text" name="icon" value="" placeholder="FontAwesome Icon"
class="form-control"/>
</label></td>
<td>
<label>
<input type="text" name="effect" value="none" placeholder="GIF Effect"
class="form-control"/>
</label>
</td>
<td>
<input type="hidden" name="is_internal" value="0">
<label>
<input type="checkbox" name="is_internal" value="1">
</label>
</td>
<td>
<input type="hidden" name="is_modo" value="0">
<label>
<input type="checkbox" name="is_modo" value="1">
</label>
</td>
<td>
<input type="hidden" name="is_admin" value="0">
<label>
<input type="checkbox" name="is_admin" value="1">
</label>
</td>
<td>
<input type="hidden" name="is_owner" value="0">
<label>
<input type="checkbox" name="is_owner" value="1">
</label>
</td>
<td>
<input type="hidden" name="is_trusted" value="0">
<label>
<input type="checkbox" name="is_trusted" value="1">
</label>
</td>
<td>
<input type="hidden" name="is_immune" value="0">
<label>
<input type="checkbox" name="is_immune" value="1">
</label>
</td>
<td>
<input type="hidden" name="is_freeleech" value="0">
<label>
<input type="checkbox" name="is_freeleech" value="1">
</label>
</td>
<td>
<input type="hidden" name="is_double_upload" value="0">
<label>
<input type="checkbox" name="is_double_upload" value="1">
</label>
</td>
<td>
<input type="hidden" name="is_incognito" value="0">
<label>
<input type="checkbox" name="is_incognito" value="1">
</label>
</td>
<td>
<input type="hidden" name="can_upload" value="0">
<label>
<input type="checkbox" name="can_upload" value="1">
</label>
</td>
<td>
<input type="hidden" name="autogroup" value="0">
<label>
<input type="checkbox" name="autogroup" value="1">
</label>
</td>
</tr>
</tbody>
</table>
</div>
<button type="submit" class="btn btn-primary">{{ __('common.add') }}</button>
@section('main')
<section class="panelV2">
<h2 class="panel__heading">Add New Group</h2>
<div class="panel__body">
<form class="form" method="POST" action="{{ route('staff.groups.store') }}">
@csrf
<p class="form__group">
<input
class="form__text"
type="text"
name="name"
placeholder=""
/>
<label class="form__label form__label--floating">
{{ __('common.name') }}
</label>
</p>
<p class="form__group">
<input
class="form__text"
type="text"
name="position"
placeholder=""
/>
<label class="form__label form__label--floating">
{{ __('common.position') }}
</label>
</p>
<p class="form__group">
<input
class="form__text"
type="text"
name="level"
placeholder=""
/>
<label class="form__label form__label--floating">
Level
</label>
</p>
<p class="form__group">
<input
class="form__text"
type="text"
name="download_slots"
placeholder=""
/>
<label class="form__label form__label--floating">
DL Slots
</label>
</p>
<p class="form__group">
<input
class="form__text"
type="text"
name="color"
placeholder=""
/>
<label class="form__label form__label--floating">
Color (e.g. #ff0000)
</label>
</p>
<p class="form__group">
<input
class="form__text"
type="text"
name="icon"
placeholder=""
/>
<label class="form__label form__label--floating">
FontAwesome Icon (e.g. fas fa-user)
</label>
</p>
<p class="form__group">
<input
class="form__text"
type="text"
name="effect"
value="none"
placeholder="GIF Effect"
/>
<label class="form__label form__label--floating">
Effect (e.g. url(/img/sparkels.gif))
</label>
</p>
<p class="form__group">
<input name="is_internal" type="hidden" value="0">
<input
id="is_internal"
class="form__checkbox"
name="is_internal"
type="checkbox"
value="1"
>
<label class="form__label" for="is_internal">
Internal
</label>
</p>
<p class="form__group">
<input name="is_modo" type="hidden" value="0">
<input
id="is_modo"
class="form__checkbox"
name="is_modo"
type="checkbox"
value="1"
>
<label class="form__label" for="is_modo">
Modo
</label>
</p>
<p class="form__group">
<input name="is_admin" type="hidden" value="0">
<input
id="is_admin"
class="form__checkbox"
name="is_admin"
type="checkbox"
value="1"
>
<label class="form__label" for="is_admin">
Admin
</label>
</p>
<p class="form__group">
<input name="is_owner" type="hidden" value="0">
<input
id="is_owner"
class="form__checkbox"
name="is_owner"
type="checkbox"
value="1"
>
<label class="form__label" for="is_owner">
Owner
</label>
</p>
<p class="form__group">
<input name="is_trusted" type="hidden" value="0">
<input
id="is_trusted"
class="form__checkbox"
name="is_trusted"
type="checkbox"
value="1"
>
<label class="form__label" for="is_trusted">
Trusted
</label>
</p>
<p class="form__group">
<input name="is_immune" type="hidden" value="0">
<input
id="is_immune"
class="form__checkbox"
name="is_immune"
type="checkbox"
value="1"
>
<label class="form__label" for="is_immune">
Immune
</label>
</p>
<p class="form__group">
<input name="is_freeleech" type="hidden" value="0">
<input
id="is_freeleech"
class="form__checkbox"
name="is_freeleech"
type="checkbox"
value="1"
>
<label class="form__label" for="is_freeleech">
Freeleech
</label>
</p>
<p class="form__group">
<input name="is_double_upload" type="hidden" value="0">
<input
id="is_double_upload"
class="form__checkbox"
name="is_double_upload"
type="checkbox"
value="1"
>
<label class="form__label" for="is_double_upload">
Double Upload
</label>
</p>
<p class="form__group">
<input name="is_incognito" type="hidden" value="0">
<input
id="is_incognito"
class="form__checkbox"
name="is_incognito"
type="checkbox"
value="1"
>
<label class="form__label" for="is_incognito">
Incognito
</label>
</p>
<p class="form__group">
<input name="can_upload" type="hidden" value="0">
<input
id="can_upload"
class="form__checkbox"
name="can_upload"
type="checkbox"
value="1"
>
<label class="form__label" for="can_upload">
Upload
</label>
</p>
<p class="form__group">
<input name="autogroup" type="hidden" value="0">
<input
id="autogroup"
class="form__checkbox"
name="autogroup"
type="checkbox"
value="1"
>
<label class="form__label" for="autogroup">
Autogroup
</label>
</p>
<p class="form__group">
<button class="form__button form__button--filled">
{{ __('common.add') }}
</button>
</p>
</form>
</div>
</div>
</section>
@endsection
+254 -212
View File
@@ -11,224 +11,266 @@
{{ __('staff.groups') }}
</a>
</li>
<li class="breadcrumbV2">
{{ $group->name }}
</li>
<li class="breadcrumb--active">
{{ __('common.edit') }}
</li>
@endsection
@section('content')
<div class="container box">
<h2>{{ $group->name }} Permissions</h2>
<div class="table-responsive">
<form role="form" method="POST"
action="{{ route('staff.groups.update', ['group' => $group->name, 'id' => $group->id]) }}">
@csrf
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered table-hover">
<thead>
<tr>
<th>{{ __('common.name') }}</th>
<th>{{ __('common.position') }}</th>
<th>Level</th>
<th>DL Slots</th>
<th>Color</th>
<th>Icon</th>
<th>Effect</th>
<th>Internal</th>
<th>Modo</th>
<th>Admin</th>
<th>Owner</th>
<th>Trusted</th>
<th>Immune</th>
<th>Freeleech</th>
<th>Double Upload</th>
<th>Incognito</th>
<th>Upload</th>
<th>Autogroup</th>
</tr>
</thead>
@section('page', 'page__groups--edit')
<tbody>
<tr>
<td><label>
<input type="text" name="name" value="{{ $group->name }}" class="form-control"/>
</label></td>
<td><label>
<input type="text" name="position" value="{{ $group->position }}"
class="form-control"/>
</label>
</td>
<td><label>
<input type="text" name="level" value="{{ $group->level }}" class="form-control"/>
</label>
</td>
<td>
<label>
<input type="text" name="download_slots" value="{{ $group->download_slots }}"
class="form-control"/>
</label>
</td>
<td><label>
<input type="text" name="color" value="{{ $group->color }}" class="form-control"/>
</label>
</td>
<td><label>
<input type="text" name="icon" value="{{ $group->icon }}" class="form-control"/>
</label></td>
<td><label>
<input type="text" name="effect" value="{{ $group->effect }}"
class="form-control"/>
</label>
</td>
<td>
@if ($group->is_internal == 1)
<input type="hidden" name="is_internal" value="0">
<label>
<input type="checkbox" name="is_internal" value="1" checked>
</label>
@else
<input type="hidden" name="is_internal" value="0">
<label>
<input type="checkbox" name="is_internal" value="1">
</label>
@endif
</td>
<td>
@if ($group->is_modo == 1)
<input type="hidden" name="is_modo" value="0">
<label>
<input type="checkbox" name="is_modo" value="1" checked>
</label>
@else
<input type="hidden" name="is_modo" value="0">
<label>
<input type="checkbox" name="is_modo" value="1">
</label>
@endif
</td>
<td>
@if ($group->is_admin == 1)
<input type="hidden" name="is_admin" value="0">
<label>
<input type="checkbox" name="is_admin" value="1" checked>
</label>
@else
<input type="hidden" name="is_admin" value="0">
<label>
<input type="checkbox" name="is_admin" value="1">
</label>
@endif
</td>
<td>
@if ($group->is_owner == 1)
<input type="hidden" name="is_owner" value="0">
<label>
<input type="checkbox" name="is_owner" value="1" checked>
</label>
@else
<input type="hidden" name="is_owner" value="0">
<label>
<input type="checkbox" name="is_owner" value="1">
</label>
@endif
</td>
<td>
@if ($group->is_trusted == 1)
<input type="hidden" name="is_trusted" value="0">
<label>
<input type="checkbox" name="is_trusted" value="1" checked>
</label>
@else
<input type="hidden" name="is_trusted" value="0">
<label>
<input type="checkbox" name="is_trusted" value="1">
</label>
@endif
</td>
<td>
@if ($group->is_immune == 1)
<input type="hidden" name="is_immune" value="0">
<label>
<input type="checkbox" name="is_immune" value="1" checked>
</label>
@else
<input type="hidden" name="is_immune" value="0">
<label>
<input type="checkbox" name="is_immune" value="1">
</label>
@endif
</td>
<td>
@if ($group->is_freeleech == 1)
<input type="hidden" name="is_freeleech" value="0">
<label>
<input type="checkbox" name="is_freeleech" value="1" checked>
</label>
@else
<input type="hidden" name="is_freeleech" value="0">
<label>
<input type="checkbox" name="is_freeleech" value="1">
</label>
@endif
</td>
<td>
@if ($group->is_double_upload == 1)
<input type="hidden" name="is_double_upload" value="0">
<label>
<input type="checkbox" name="is_double_upload" value="1" checked>
</label>
@else
<input type="hidden" name="is_double_upload" value="0">
<label>
<input type="checkbox" name="is_double_upload" value="1">
</label>
@endif
</td>
<td>
@if ($group->is_incognito == 1)
<input type="hidden" name="is_incognito" value="0">
<label>
<input type="checkbox" name="is_incognito" value="1" checked>
</label>
@else
<input type="hidden" name="is_incognito" value="0">
<label>
<input type="checkbox" name="is_incognito" value="1">
</label>
@endif
</td>
<td>
@if ($group->can_upload == 1)
<input type="hidden" name="can_upload" value="0">
<label>
<input type="checkbox" name="can_upload" value="1" checked>
</label>
@else
<input type="hidden" name="can_upload" value="0">
<label>
<input type="checkbox" name="can_upload" value="1">
</label>
@endif
</td>
<td>
@if ($group->autogroup == 1)
<input type="hidden" name="autogroup" value="0">
<label>
<input type="checkbox" name="autogroup" value="1" checked>
</label>
@else
<input type="hidden" name="autogroup" value="0">
<label>
<input type="checkbox" name="autogroup" value="1">
</label>
@endif
</td>
</tr>
</tbody>
</table>
</div>
<button type="submit" class="btn btn-primary">{{ __('common.submit') }}</button>
@section('main')
<section class="panelV2">
<h2 class="panel__heading">Edit Group: {{ $group->name }}</h2>
<div class="panel__body">
<form class="form" method="POST" action="{{ route('staff.groups.update', ['group' => $group->name, 'id' => $group->id]) }}">
@csrf
<p class="form__group">
<input
class="form__text"
type="text"
name="name"
placeholder=""
value="{{ $group->name }}"
/>
<label class="form__label form__label--floating">
{{ __('common.name') }}
</label>
</p>
<p class="form__group">
<input
class="form__text"
type="text"
name="position"
placeholder=""
value="{{ $group->position }}"
/>
<label class="form__label form__label--floating">
{{ __('common.position') }}
</label>
</p>
<p class="form__group">
<input
class="form__text"
type="text"
name="level"
placeholder=""
value="{{ $group->level }}"
/>
<label class="form__label form__label--floating">
Level
</label>
</p>
<p class="form__group">
<input
class="form__text"
type="text"
name="download_slots"
placeholder=""
value="{{ $group->download_slots }}"
/>
<label class="form__label form__label--floating">
DL Slots
</label>
</p>
<p class="form__group">
<input
class="form__text"
type="text"
name="color"
placeholder=""
value="{{ $group->color }}"
/>
<label class="form__label form__label--floating">
Color (e.g. #ff0000)
</label>
</p>
<p class="form__group">
<input
class="form__text"
type="text"
name="icon"
placeholder=""
value="{{ $group->icon }}"
/>
<label class="form__label form__label--floating">
FontAwesome Icon (e.g. fas fa-user)
</label>
</p>
<p class="form__group">
<input
class="form__text"
type="text"
name="effect"
placeholder="GIF Effect"
value="{{ $group->effect }}"
/>
<label class="form__label form__label--floating">
Effect (e.g. url(/img/sparkels.gif))
</label>
</p>
<p class="form__group">
<input name="is_internal" type="hidden" value="0">
<input
id="is_internal"
class="form__checkbox"
name="is_internal"
type="checkbox"
value="1"
@checked($group->is_internal)
>
<label class="form__label" for="is_internal">
Internal
</label>
</p>
<p class="form__group">
<input name="is_modo" type="hidden" value="0">
<input
id="is_modo"
class="form__checkbox"
name="is_modo"
type="checkbox"
value="1"
@checked($group->is_modo)
>
<label class="form__label" for="is_modo">
Modo
</label>
</p>
<p class="form__group">
<input name="is_admin" type="hidden" value="0">
<input
id="is_admin"
class="form__checkbox"
name="is_admin"
type="checkbox"
value="1"
@checked($group->is_admin)
>
<label class="form__label" for="is_admin">
Admin
</label>
</p>
<p class="form__group">
<input name="is_owner" type="hidden" value="0">
<input
id="is_owner"
class="form__checkbox"
name="is_owner"
type="checkbox"
value="1"
@checked($group->is_owner)
>
<label class="form__label" for="is_owner">
Owner
</label>
</p>
<p class="form__group">
<input name="is_trusted" type="hidden" value="0">
<input
id="is_trusted"
class="form__checkbox"
name="is_trusted"
type="checkbox"
value="1"
@checked($group->is_trusted)
>
<label class="form__label" for="is_trusted">
Trusted
</label>
</p>
<p class="form__group">
<input name="is_immune" type="hidden" value="0">
<input
id="is_immune"
class="form__checkbox"
name="is_immune"
type="checkbox"
value="1"
@checked($group->is_immune)
>
<label class="form__label" for="is_immune">
Immune
</label>
</p>
<p class="form__group">
<input name="is_freeleech" type="hidden" value="0">
<input
id="is_freeleech"
class="form__checkbox"
name="is_freeleech"
type="checkbox"
value="1"
@checked($group->is_freeleech)
>
<label class="form__label" for="is_freeleech">
Freeleech
</label>
</p>
<p class="form__group">
<input name="is_double_upload" type="hidden" value="0">
<input
id="is_double_upload"
class="form__checkbox"
name="is_double_upload"
type="checkbox"
value="1"
@checked($group->is_double_upload)
>
<label class="form__label" for="is_double_upload">
Double Upload
</label>
</p>
<p class="form__group">
<input name="is_incognito" type="hidden" value="0">
<input
id="is_incognito"
class="form__checkbox"
name="is_incognito"
type="checkbox"
value="1"
@checked($group->is_incognito)
>
<label class="form__label" for="is_incognito">
Incognito
</label>
</p>
<p class="form__group">
<input name="can_upload" type="hidden" value="0">
<input
id="can_upload"
class="form__checkbox"
name="can_upload"
type="checkbox"
value="1"
@checked($group->can_upload)
>
<label class="form__label" for="can_upload">
Upload
</label>
</p>
<p class="form__group">
<input name="autogroup" type="hidden" value="0">
<input
id="autogroup"
class="form__checkbox"
name="autogroup"
type="checkbox"
value="1"
@checked($group->autogroup)
>
<label class="form__label" for="autogroup">
Autogroup
</label>
</p>
<p class="form__group">
<button class="form__button form__button--filled">
{{ __('common.submit') }}
</button>
</p>
</form>
</div>
</div>
</section>
@endsection
+110 -47
View File
@@ -11,12 +11,23 @@
</li>
@endsection
@section('content')
<div class="container box">
<h2>Groups</h2>
<a href="{{ route('staff.groups.create') }}" class="btn btn-primary">Add New Group</a>
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered table-hover">
@section('page', 'page__groups--index')
@section('main')
<section class="panelV2">
<header class="panel__header">
<h2 class="panel__heading">Groups</h2>
<div class="panel__actions">
<a
href="{{ route('staff.groups.create') }}"
class="panel__action form__button form__button--text"
>
{{ __('common.add') }}
</a>
</div>
</header>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th>ID</th>
@@ -45,53 +56,105 @@
<tr>
<td>{{ $group->id }}</td>
<td>
<a href="{{ route('staff.groups.edit', ['group' => $group->name, 'id' => $group->id]) }}">
<a href="{{ route('staff.groups.edit', ['id' => $group->id]) }}">
{{ $group->name }}
</a>
</td>
<td>{{ $group->position }}</td>
<td>{{ $group->level }}</td>
<td>{{ $group->download_slots ?? 'Unlimited' }}</td>
<td><i class="{{ config('other.font-awesome') }} fa-circle"
style="color: {{ $group->color }};"></i>
{{ $group->color }}</td>
<td><i class="{{ $group->icon }}"></i> [{{ $group->icon }}]</td>
<td>@if ($group->effect == '' || $group->effect == 'none')<i
class="{{ config('other.font-awesome') }} fa-times text-red"></i>@else<i
class="{{ config('other.font-awesome') }} fa-check text-green"></i>@endif</td>
<td>@if ($group->is_internal == 0)<i
class="{{ config('other.font-awesome') }} fa-times text-red"></i>@else<i
class="{{ config('other.font-awesome') }} fa-check text-green"></i>@endif</td>
<td>@if ($group->is_modo == 0)<i
class="{{ config('other.font-awesome') }} fa-times text-red"></i>@else<i
class="{{ config('other.font-awesome') }} fa-check text-green"></i>@endif</td>
<td>@if ($group->is_admin == 0)<i
class="{{ config('other.font-awesome') }} fa-times text-red"></i>@else<i
class="{{ config('other.font-awesome') }} fa-check text-green"></i>@endif</td>
<td>@if ($group->is_owner == 0)<i
class="{{ config('other.font-awesome') }} fa-times text-red"></i>@else<i
class="{{ config('other.font-awesome') }} fa-check text-green"></i>@endif</td>
<td>@if ($group->is_trusted == 0)<i
class="{{ config('other.font-awesome') }} fa-times text-red"></i>@else<i
class="{{ config('other.font-awesome') }} fa-check text-green"></i>@endif</td>
<td>@if ($group->is_immune == 0)<i
class="{{ config('other.font-awesome') }} fa-times text-red"></i>@else<i
class="{{ config('other.font-awesome') }} fa-check text-green"></i>@endif</td>
<td>@if ($group->is_freeleech == 0)<i
class="{{ config('other.font-awesome') }} fa-times text-red"></i>@else<i
class="{{ config('other.font-awesome') }} fa-check text-green"></i>@endif</td>
<td>@if ($group->is_double_upload == 0)<i
class="{{ config('other.font-awesome') }} fa-times text-red"></i>@else<i
class="{{ config('other.font-awesome') }} fa-check text-green"></i>@endif</td>
<td>@if ($group->is_incognito == 0)<i
class="{{ config('other.font-awesome') }} fa-times text-red"></i>@else<i
class="{{ config('other.font-awesome') }} fa-check text-green"></i>@endif</td>
<td>@if ($group->can_upload == 0)<i
class="{{ config('other.font-awesome') }} fa-times text-red"></i>@else<i
class="{{ config('other.font-awesome') }} fa-check text-green"></i>@endif</td>
<td>@if ($group->autogroup == 0)<i
class="{{ config('other.font-awesome') }} fa-times text-red"></i>@else<i
class="{{ config('other.font-awesome') }} fa-check text-green"></i>@endif</td>
<td>
<i class="{{ config('other.font-awesome') }} fa-circle" style="color: {{ $group->color }};"></i>
{{ $group->color }}
</td>
<td>
<i class="{{ $group->icon }}"></i>
[{{ $group->icon }}]
</td>
<td>
@if ($group->effect !== '' && $group->effect !== 'none')
<i class="{{ config('other.font-awesome') }} fa-check text-green"></i>
@else
<i class="{{ config('other.font-awesome') }} fa-times text-red"></i>
@endif
</td>
<td>
@if ($group->is_internal)
<i class="{{ config('other.font-awesome') }} fa-check text-green"></i>
@else
<i class="{{ config('other.font-awesome') }} fa-times text-red"></i>
@endif
</td>
<td>
@if ($group->is_modo)
<i class="{{ config('other.font-awesome') }} fa-check text-green"></i>
@else
<i class="{{ config('other.font-awesome') }} fa-times text-red"></i>
@endif
</td>
<td>
@if ($group->is_admin)
<i class="{{ config('other.font-awesome') }} fa-check text-green"></i>
@else
<i class="{{ config('other.font-awesome') }} fa-times text-red"></i>
@endif
</td>
<td>
@if ($group->is_owner)
<i class="{{ config('other.font-awesome') }} fa-check text-green"></i>
@else
<i class="{{ config('other.font-awesome') }} fa-times text-red"></i>
@endif
</td>
<td>
@if ($group->is_trusted)
<i class="{{ config('other.font-awesome') }} fa-check text-green"></i>
@else
<i class="{{ config('other.font-awesome') }} fa-times text-red"></i>
@endif
</td>
<td>
@if ($group->is_immune)
<i class="{{ config('other.font-awesome') }} fa-check text-green"></i>
@else
<i class="{{ config('other.font-awesome') }} fa-times text-red"></i>
@endif
</td>
<td>
@if ($group->is_freeleech)
<i class="{{ config('other.font-awesome') }} fa-check text-green"></i>
@else
<i class="{{ config('other.font-awesome') }} fa-times text-red"></i>
@endif
</td>
<td>
@if ($group->is_double_upload)
<i class="{{ config('other.font-awesome') }} fa-check text-green"></i>
@else
<i class="{{ config('other.font-awesome') }} fa-times text-red"></i>
@endif
</td>
<td>
@if ($group->is_incognito)
<i class="{{ config('other.font-awesome') }} fa-check text-green"></i>
@else
<i class="{{ config('other.font-awesome') }} fa-times text-red"></i>
@endif
</td>
<td>
@if ($group->can_upload)
<i class="{{ config('other.font-awesome') }} fa-check text-green"></i>
@else
<i class="{{ config('other.font-awesome') }} fa-times text-red"></i>
@endif
</td>
<td>
@if ($group->autogroup)
<i class="{{ config('other.font-awesome') }} fa-check text-green"></i>
@else
<i class="{{ config('other.font-awesome') }} fa-times text-red"></i>
@endif
</td>
</tr>
@endforeach
</tbody>
@@ -16,47 +16,58 @@
</li>
@endsection
@section('content')
<div class="container box">
<h2>{{ __('common.add') }} Internal-Group</h2>
<div class="table-responsive">
<form role="form" method="POST" action="{{ route('staff.internals.store') }}" enctype="multipart/form-data">
@section('page', 'page__internals--create')
@section('main')
<section class="panelV2">
<h2 class="panel__heading">{{ __('common.add') }} Internal Group</h2>
<div class="panel__body">
<form class="form" method="POST" action="{{ route('staff.internals.store') }}" enctype="multipart/form-data">
@csrf
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered table-hover">
<thead>
<tr>
<th>{{ __('common.name') }}</th>
<th>Icon</th>
<th>Effect</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<label>
<input type="text" class="form-control" name="name" required>
</label>
</td>
<td>
<label>
<input type="text" class="form-control" name="icon" value="fa-magic">
</label>
</td>
<td>
<label>
<input type="text" class="form-control" name="effect" value="none">
</label>
</td>
</tr>
</tbody>
</table>
</div>
<button type="submit" class="btn btn-default">{{ __('common.submit') }}</button>
<p class="form__group">
<input
id="name"
class="form__text"
name="name"
required
type="text"
>
<label class="form__label form__label--floating" for="name">
{{ __('common.name') }}
</label>
</p>
<p class="form__group">
<input
id="icon"
class="form__text"
name="icon"
required
type="text"
value="fa-magic"
>
<label class="form__label form__label--floating" for="icon">
Icon
</label>
</p>
<p class="form__group">
<input
id="effect"
class="form__text"
name="effect"
required
type="text"
value="none"
>
<label class="form__label form__label--floating" for="effect">
Effect
</label>
</p>
<p class="form__group">
<button class="form__button form__button--filled">
{{ __('common.submit') }}
</button>
</p>
</form>
</div>
</div>
</section>
@endsection
+59 -43
View File
@@ -11,55 +11,71 @@
Internals
</a>
</li>
<li class="breadcrumbV2">
{{ $internal->name }}
</li>
<li class="breadcrumb--active">
{{ __('common.edit') }}
</li>
@endsection
@section('content')
<div class="container box">
<h2>{{ $internal->name }} Internal Group</h2>
<div class="table-responsive">
<form role="form" method="POST"
action="{{ route('staff.internals.update', ['name' => $internal->name, 'id' => $internal->id]) }}">
@section('page', 'page__internals--edit')
@section('main')
<section class="panelV2">
<h2 class="panel__heading">{{ __('common.edit') }} Interal Group: {{ $internal->name }}</h2>
<div class="panel__body">
<form
class="form"
method="POST"
action="{{ route('staff.internals.update', ['name' => $internal->name, 'id' => $internal->id]) }}"
>
@csrf
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered table-hover">
<thead>
<tr>
<th>Name</th>
<th>Icon</th>
<th>Effect</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<label>
<input type="text" name="name" value="{{ $internal->name }}" class="form-control"/>
</label>
</td>
<td>
<label>
<input type="text" name="icon" value="{{ $internal->icon }}" class="form-control"/>
</label>
</td>
<td>
<label>
<input type="text" name="effect" value="{{ $internal->effect }}"
class="form-control"/>
</label>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<button type="submit" class="btn btn-primary">{{ __('common.submit') }}</button>
<p class="form__group">
<input
id="name"
class="form__text"
name="name"
required
type="text"
value="{{ $internal->name }}"
>
<label class="form__label form__label--floating" for="name">
{{ __('common.name') }}
</label>
</p>
<p class="form__group">
<input
id="icon"
class="form__text"
name="icon"
required
type="text"
value="{{ $internal->icon }}"
>
<label class="form__label form__label--floating" for="icon">
Icon
</label>
</p>
<p class="form__group">
<input
id="effect"
class="form__text"
name="effect"
required
type="text"
value="{{ $internal->effect }}"
>
<label class="form__label form__label--floating" for="effect">
Effect
</label>
</p>
<p class="form__group">
<button class="form__button form__button--filled">
{{ __('common.submit') }}
</button>
</p>
</form>
</div>
</div>
</section>
@endsection
+60 -28
View File
@@ -11,12 +11,23 @@
</li>
@endsection
@section('content')
<div class="container box">
<h2>Internal Groups</h2>
<a href="{{ route('staff.internals.create') }}" class="btn btn-primary">Add New Internal Group</a><br><br>
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered table-hover">
@section('page', 'page__internals--index')
@section('main')
<section class="panelV2">
<header class="panel__header">
<h2 class="panel__heading">Internal Groups</h2>
<div class="panel__actions">
<a
href="{{ route('staff.internals.create') }}"
class="panel__action form__button form__button--text"
>
{{ __('common.add') }}
</a>
</div>
</header>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th>ID</th>
@@ -29,35 +40,56 @@
<tbody>
@foreach ($internals as $internal)
<tr>
<td>{{ $internal->id }}</td>
<td>
{{ $internal->id }}
<a href="{{ route('staff.internals.edit', ['id' => $internal->id]) }}">
{{ $internal->name }}
</a>
</td>
<td>{{ $internal->icon }}</td>
<td>{{ $internal->effect }}</td>
<td>
{{ $internal->name }}
</td>
<td>
{{ $internal->icon }}
</td>
<td>
{{ $internal->effect }}
</td>
<td>
<form action="{{ route('staff.internals.destroy', ['id' => $internal->id]) }}"
method="POST">
@csrf
@method('DELETE')
<a href="{{ route('staff.internals.edit', ['id' => $internal->id]) }}"
class="btn btn-warning">{{ __('common.edit') }}</a>
<button type="submit" class="btn btn-danger">{{ __('common.delete') }}</button>
</form>
<menu class="data-table__actions">
<li class="data-table__action">
<a
href="{{ route('staff.internals.edit', ['id' => $internal->id]) }}"
class="form__button form__button--text"
>
{{ __('common.edit') }}
</a>
</li>
<li class="data-table__action">
<form
method="POST"
action="{{ route('staff.internals.destroy', ['id' => $internal->id]) }}"
x-data
>
@csrf
@method('DELETE')
<button
x-on:click.prevent="Swal.fire({
title: 'Are you sure?',
text: 'Are you sure you want to delete this internal group: {{ $internal->name }}?',
icon: 'warning',
showConfirmButton: true,
showCancelButton: true,
}).then((result) => {
if (result.isConfirmed) {
$root.submit();
}
})"
class="form__button form__button--text"
>
{{ __('common.delete') }}
</button>
</form>
</li>
</menu>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</section>
@endsection
+60 -81
View File
@@ -19,86 +19,65 @@
</li>
@endsection
@section('content')
<div class="container-fluid">
<div class="block">
<h2>{{ __('staff.invites-log') }}</h2>
<hr>
<div class="row">
<div class="col-sm-12">
<h2><span class="text-blue"><strong><i class="{{ config('other.font-awesome') }} fa-note"></i>
{{ $invitecount }} </strong></span>{{ __('user.invites-send') }} </h2>
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered table-hover">
<thead>
<tr>
<th>{{ __('user.sender') }}</th>
<th>{{ __('common.email') }}</th>
<th>Token</th>
<th>{{ __('user.created-on') }}</th>
<th>{{ __('user.expires-on') }}</th>
<th>{{ __('user.accepted-by') }}</th>
<th>{{ __('user.accepted-at') }}</th>
</tr>
</thead>
<tbody>
@if (count($invites) == 0)
<p>The are no invite logs in the database for this user!</p>
@else
@foreach ($invites as $invite)
<tr>
<td>
<a href="{{ route('users.show', ['username' => $invite->sender->username]) }}">
<span class="text-bold"
style="color:{{ $invite->sender->group->color }}; ">
<i class="{{ $invite->sender->group->icon }}"></i>
{{ $invite->sender->username }}
</span>
</a>
</td>
<td>
{{ $invite->email }}
</td>
<td>
{{ $invite->code }}
</td>
<td>
{{ $invite->created_at }}
</td>
<td>
{{ $invite->expires_on }}
</td>
<td>
@if ($invite->accepted_by != null && $invite->accepted_by != 1)
<a href="{{ route('users.show', ['username' => $invite->receiver->username]) }}">
<span class="text-bold"
style="color:{{ $invite->receiver->group->color }}; ">
<i class="{{ $invite->receiver->group->icon }}"></i>
{{ $invite->receiver->username }}
</span>
</a>
@else
N/A
@endif
</td>
<td>
@if ($invite->accepted_at != null)
{{ $invite->accepted_at }}
@else
N/A
@endif
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
</div>
</div>
<div class="text-center">
{{ $invites->links() }}
</div>
@section('page', 'page__invite-log--index')
@section('main')
<section class="panelV2">
<h2 class="panel__heading">{{ __('staff.invites-log') }}</h2>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th>#</th>
<th>{{ __('user.sender') }}</th>
<th>{{ __('common.email') }}</th>
<th>Token</th>
<th>{{ __('user.created-on') }}</th>
<th>{{ __('user.expires-on') }}</th>
<th>{{ __('user.accepted-by') }}</th>
<th>{{ __('user.accepted-at') }}</th>
</tr>
</thead>
<tbody>
@forelse ($invites as $invite)
<tr>
<td>{{ $invite->id }}</td>
<td>
<x-user_tag :anon="false" :user="$invite->sender" />
</td>
<td>{{ $invite->email }}</td>
<td>{{ $invite->code }}</td>
<td>
<time datetime="{{ $invite->created_at }}">
{{ $invite->created_at }}
</time>
</td>
<td>
<time datetime="{{ $invite->expires_on }}">
{{ $invite->expires_on }}
</time>
</td>
<td>
@if ($invite->accepted_by === null)
N/A
@else
<x-user_tag :anon="false" :user="$invite->receiver" />
@endif
</td>
<td>
<time datetime="{{ $invite->accepted_at ?? '' }}">
{{ $invite->accepted_at ?? 'N/A' }}
</time>
</td>
</tr>
@empty
<tr>
<td colspan="8">No invites exist</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
</section>
{{ $invites->links('partials.pagination') }}
@endsection
+42 -19
View File
@@ -19,24 +19,47 @@
</li>
@endsection
@section('content')
<div class="container box">
<h2>{{ __('staff.mass-pm') }}</h2>
<form action="{{ route('staff.mass-pm.store') }}" method="POST">
@csrf
<div class="form-group">
<label for="subject">{{ __('pm.subject') }}</label>
<label>
<input type="text" class="form-control" name="subject">
</label>
</div>
@section('page', 'page__mass-pm--index')
<div class="form-group">
<label for="message">{{ __('pm.message') }}</label>
<textarea id="editor" name="message" cols="30" rows="10" class="form-control"></textarea>
</div>
<button type="submit" class="btn btn-default">{{ __('pm.send') }}</button>
</form>
</div>
@section('main')
<section class="panelV2">
<h2 class="panel__heading">{{ __('staff.mass-pm') }}</h2>
<div class="panel__body">
<form class="form" action="{{ route('staff.mass-pm.store') }}" method="POST" x-data>
@csrf
<p class="form__group">
<input
id="subject"
class="form__text"
minlength="5"
name="subject"
type="text"
required
>
<label class="form__label form__label--floating" for="subject">
{{ __('pm.subject') }}
</label>
</p>
@livewire('bbcode-input', ['name' => 'message', 'label' => __('pm.message'), 'required' => true])
<p class="form__group">
<button
x-on:click.prevent="Swal.fire({
title: 'Are you sure?',
text: 'Are you sure you want to send this private message to every user on the site?',
icon: 'warning',
showConfirmButton: true,
showCancelButton: true,
}).then((result) => {
if (result.isConfirmed) {
$root.submit();
}
})"
class="form__button form__button--filled"
>
{{ __('pm.send') }}
</button>
</p>
</form>
</div>
</section>
@endsection
@@ -16,29 +16,46 @@
</li>
@endsection
@section('content')
<div class="container box">
<h2>
{{ __('common.add') }} {{ __('common.media-language') }} {{ __('staff.media-languages-desc') }}
@section('page', 'page__media-language--create')
@section('main')
<section class="panelV2">
<h2 class="panel__heading">
{{ __('common.add') }}
</h2>
<form role="form" method="POST" action="{{ route('staff.media_languages.store') }}">
@csrf
<div class="form-group">
<label for="name">{{ __('common.name') }}</label>
<label>
<input type="text" class="form-control" name="name">
</label>
</div>
<div class="form-group">
<label for="name">{{ __('common.code') }}</label>
<label>
<input type="text" class="form-control" name="code">
</label>
</div>
<button type="submit" class="btn btn-default">{{ __('common.add') }}</button>
</form>
<div class="panel__body">
<form class="form" method="POST" action="{{ route('staff.media_languages.store') }}">
@csrf
<p class="form__group">
<input
id="name"
class="form__text"
name="name"
type="text"
required
>
<label class="form__label form__label--floating" for="name">
{{ __('common.name') }}
</label>
</p>
<p class="form__group">
<input
id="code"
class="form__text"
name="code"
type="text"
required
>
<label class="form__label form__label--floating" for="name">
{{ __('common.code') }}
</label>
</p>
<p class="form__group">
<button class="form__button form__button--filled">
{{ __('common.submit') }}
</button>
</p>
</form>
</div>
</div>
@endsection
@@ -8,39 +8,63 @@
</li>
<li class="breadcrumbV2">
<a href="{{ route('staff.media_languages.index') }}" class="breadcrumb__link">
{{ __('common.media_languages') }}
{{ __('common.media-languages') }}
</a>
</li>
<li class="breadcrumbV2">
{{ $media_language->name }}
</li>
<li class="breadcrumb--active">
{{ __('common.edit') }}
</li>
@endsection
@section('content')
<div class="container box">
<h2>
{{ __('common.edit') }} {{ __('common.media-language') }} {{ __('staff.media-languages-desc') }}</h2>
<form role="form" method="POST"
action="{{ route('staff.media_languages.update', ['id' => $media_language->id]) }}">
@csrf
@section('page', 'page__media-language--edit')
<div class="form-group">
<label for="name">{{ __('common.name') }}</label>
<label>
<input type="text" class="form-control" name="name" value="{{ $media_language->name }}">
</label>
</div>
<div class="form-group">
<label for="name">{{ __('common.code') }}</label>
<label>
<input type="text" class="form-control" name="code" value="{{ $media_language->code }}">
</label>
</div>
<button type="submit" class="btn btn-default">
{{ __('common.submit') }}
</button>
</form>
</div>
@section('main')
<section class="panelV2">
<h2 class="panel__heading">
{{ __('common.edit') }} {{ __('common.media-language') }}
</h2>
<div class="panel__body">
<form
class="form"
method="POST"
action="{{ route('staff.media_languages.update', ['id' => $media_language->id]) }}"
>
@csrf
<p class="form__group">
<input
id="name"
class="form__text"
name="name"
required
type="text"
value="{{ $media_language->name }}"
>
<label class="form__label form__label--floating" for="name">
{{ __('common.name') }}
</label>
</p>
<p class="form__group">
<input
id="code"
class="form__text"
name="code"
required
type="text"
value="{{ $media_language->code }}"
>
<label class="form__label form__label--floating" for="code">
{{ __('common.code') }}
</label>
</p>
<p class="form__group">
<button class="form__button form__button--filled">
{{ __('common.submit') }}
</button>
</p>
</form>
</div>
</section>
@endsection
@@ -12,47 +12,83 @@
</li>
@endsection
@section('content')
<div class="container box">
<h2>{{ __('common.media-languages') }}</h2>
<p>{{ __('staff.media-languages-desc') }}</p>
@section('page', 'page__media-language--index')
<a href="{{ route('staff.media_languages.create') }}" class="btn btn-primary">
{{ __('common.add') }}
{{ trans_choice('common.a-an-art',false) }}
{{ __('common.media-language') }}
</a>
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered table-hover">
@section('main')
<section class="panelV2">
<header class="panel__header">
<h2 class="panel__heading">
{{ __('common.media-languages') }} {{ __('staff.media-languages-desc') }}
</h2>
<div class="panel__actions">
<a
class="panel__action form__button form__button--text"
href="{{ route('staff.media_languages.create') }}"
>
{{ __('common.add') }}
</a>
</div>
</header>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th>{{ __('common.name') }}</th>
<th>{{ __('common.code') }}</th>
<th>{{ __('common.action') }}</th>
</tr>
<tr>
<th>{{ __('common.name') }}</th>
<th>{{ __('common.code') }}</th>
<th>{{ __('common.action') }}</th>
</tr>
</thead>
<tbody>
@foreach($media_languages as $media_language)
<tr>
<td>
<a href="{{ route('staff.media_languages.edit', ['id' => $media_language->id]) }}">
{{ $media_language->name }}
</a>
</td>
<td>
<span>{{ $media_language->code }}</span>
</td>
<td>
<a href="{{ route('staff.media_languages.edit', ['id' => $media_language->id]) }}"
class="btn btn-warning">
{{ __('common.edit') }}
</a>
</td>
</tr>
@endforeach
@foreach($media_languages as $media_language)
<tr>
<td>
<a href="{{ route('staff.media_languages.edit', ['id' => $media_language->id]) }}">
{{ $media_language->name }}
</a>
</td>
<td>{{ $media_language->code }}</td>
<td>
<menu class="data-table__actions">
<li class="data-table__action">
<a
class="form__button form__button--text"
href="{{ route('staff.media_languages.edit', ['id' => $media_language->id]) }}"
>
{{ __('common.edit') }}
</a>
</li>
<li class="data-table__action">
<form
method="POST"
action="{{ route('staff.media_languages.destroy', ['id' => $media_language->id]) }}"
x-data
>
@csrf
@method('DELETE')
<button
x-on:click.prevent="Swal.fire({
title: 'Are you sure?',
text: 'Are you sure you want to delete this media language: {{ $media_language->name }}?',
icon: 'warning',
showConfirmButton: true,
showCancelButton: true,
}).then((result) => {
if (result.isConfirmed) {
$root.submit();
}
})"
class="form__button form__button--text"
>
{{ __('common.delete') }}
</button>
</form>
</li>
</menu>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</section>
@endsection
+161 -413
View File
@@ -15,10 +15,13 @@
</li>
@endsection
@section('content')
<div class="container box">
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered">
@section('page', 'page__moderation')
@section('main')
<section class="panelV2">
<h2 class="panel__heading">{{ __('common.pending-torrents') }}</h2>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th>{{ __('torrent.uploaded') }}</th>
@@ -28,171 +31,66 @@
<th>{{ __('common.resolution') }}</th>
<th>{{ __('torrent.size') }}</th>
<th>{{ __('torrent.uploader') }}</th>
<th>{{ __('common.moderation-approve') }}</th>
<th>{{ __('common.moderation-postpone') }}</th>
<th>{{ __('common.moderation-reject') }}</th>
<th>{{ __('common.action') }}</th>
</tr>
</thead>
<tbody>
@foreach ($pending as $p)
@forelse ($pending as $torrent)
<tr>
<td><span class="text-red text-bold">{{ $p->created_at->diffForHumans() }}</span></td>
<td><a href="{{ route('torrent', ['id' => $p->id]) }}" itemprop="url"
class="l-breadcrumb-item-link"><span itemprop="title"
class="l-breadcrumb-item-link-title">{{ $p->name }}</span></a>
</td>
<td><i class="{{ $p->category->icon }} torrent-icon" data-toggle="tooltip"
data-original-title="{{ $p->category->name }} Torrent"></i></td>
<td>{{ $p->type->name }}</td>
<td>{{ $p->resolution->name ?? 'No Res' }}</td>
<td>{{ $p->getSize() }}</td>
<td><a href="{{ route('users.show', ['username' => $p->user->username]) }}"
itemprop="url" class="l-breadcrumb-item-link"><span itemprop="title"
class="l-breadcrumb-item-link-title">{{ $p->user->username }}
({{ $p->user->group->name }})</span></a></td>
<td>
<form role="form" method="POST"
action="{{ route('staff.moderation.approve', ['id' => $p->id]) }}"
style="display: inline-block;">
@csrf
<button type="submit" class="btn btn-labeled btn-success">
<span class="btn-label">
<i class="{{ config('other.font-awesome') }} fa-thumbs-up"></i>
</span>
{{ __('common.moderation-approve') }}
</button>
</form>
<time datetime="{{ $torrent->created_at }}" title="{{ $torrent->created_at }}">
{{ $torrent->created_at->diffForHumans() }}
</time>
</td>
<td>
<button data-target="#pendpostpone-{{ $p->id }}" data-toggle="modal"
class="btn btn-labeled btn-danger">
<span class="btn-label"><i
class="{{ config('other.font-awesome') }} fa-pause"></i></span>
{{ __('common.moderation-postpone') }}
</button>
<div class="modal fade" id="pendpostpone-{{ $p->id }}" tabindex="-1" role="dialog"
aria-hidden="true">
<form method="POST" action="{{ route('staff.moderation.postpone') }}">
@csrf
<div class="modal-dialog{{ modal_style() }}">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-label="{{ __('common.close') }}"><span
aria-hidden="true">×</span>
</button>
<h4 class="modal-title" id="myModalLabel">
{{ __('common.moderation-postpone') }} {{ __('torrent.torrent') }}
: {{ $p->name }}
</h4>
</div>
<div class="modal-body">
<div class="form-group">
<input id="type" name="type" type="hidden"
value="{{ __('torrent.torrent') }}">
<input id="id" name="id" type="hidden" value="{{ $p->id }}">
<input id="slug" name="slug" type="hidden" value="{{ $p->slug }}">
<label for="postpone_reason"
class="col-sm-2 control-label">{{ __('common.reason') }}</label>
<div class="col-sm-10">
<label for="message"></label>
<textarea title="Postpone message" class="form-control" rows="5"
name="message" cols="50" id="message"></textarea>
</div>
</div>
<div class="form-group">
<div class="col-sm-10 col-sm-offset-2">
<button class="btn btn-danger" type="submit">
{{ __('common.moderation-postpone') }}
</button>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-sm btn-primary"
data-dismiss="modal">{{ __('common.close') }}</button>
</div>
</div>
</div>
</form>
</div>
<a href="{{ route('torrent', ['id' => $torrent->id]) }}">
{{ $torrent->name }}
</a>
</td>
<td>
<button data-target="#pendreject-{{ $p->id }}" data-toggle="modal"
class="btn btn-labeled btn-danger">
<span class="btn-label">
<i class="{{ config('other.font-awesome') }} fa-thumbs-down"></i>
</span>
{{ __('common.moderation-reject') }}
</button>
<div class="modal fade" id="pendreject-{{ $p->id }}" tabindex="-1" role="dialog"
aria-hidden="true">
<form method="POST" action="{{ route("staff.moderation.reject") }}">
@csrf
<div class="modal-dialog{{ modal_style() }}">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-label="{{ __('common.close') }}"><span
aria-hidden="true">×</span>
</button>
<h4 class="modal-title" id="myModalLabel">
{{ __('common.moderation-reject') }} {{ __('torrent.torrent') }}
: {{ $p->name }}
</h4>
</div>
<div class="modal-body">
<div class="form-group">
<input id="type" type="hidden" name="type"
value="{{ __('torrent.torrent') }}">
<input id="id" type="hidden" name="id" value="{{ $p->id }}">
<input id="slug" type="hidden" name="slug" value="{{ $p->slug }}">
<label for="file_name"
class="col-sm-2 control-label">{{ __('torrent.torrent') }}</label>
<div class="col-sm-10">
<p id="title" name="title"
class="form-control-static">{{ $p->name }}</p>
</div>
</div>
<div class="form-group">
<label for="report_reason"
class="col-sm-2 control-label">{{ __('common.reason') }}</label>
<div class="col-sm-10">
<label for="message"></label>
<textarea title="Rejection Message" class="form-control"
rows="5" name="message" cols="50"
id="message"></textarea>
</div>
</div>
<div class="form-group">
<div class="col-sm-10 col-sm-offset-2">
<button class="btn btn-danger" type="submit">
{{ __('common.moderation-reject') }}
</button>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-sm btn-primary"
data-dismiss="modal">{{ __('common.close') }}</button>
</div>
</div>
</div>
</form>
</div>
<i
class="{{ $torrent->category->icon }} torrent-icon"
data-original-title="{{ $torrent->category->name }} Torrent"
></i>
</td>
<td>{{ $torrent->type->name }}</td>
<td>{{ $torrent->resolution->name ?? 'No Res' }}</td>
<td>{{ $torrent->getSize() }}</td>
<td>
<x-user_tag :anon="false" :user="$torrent->user" />
</td>
<td>
<menu class="data-table__actions">
<li class="data-table__action">
<form
method="POST"
action="{{ route('staff.moderation.approve', ['id' => $torrent->id]) }}"
>
@csrf
<button class="form__button form__button--filled">
<i class="{{ config('other.font-awesome') }} fa-thumbs-up"></i>
{{ __('common.moderation-approve') }}
</button>
</form>
</li>
@include('Staff.moderation.partials._postpone_dialog', ['torrent' => $torrent])
@include('Staff.moderation.partials._reject_dialog', ['torrent' => $torrent])
</menu>
</td>
</tr>
@endforeach
@empty
<tr>
<td colspan="8">No pending torrents</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
<div class="text-center"><h1>{{ __('torrent.postponed-torrents') }}</h1></div>
<div class="container box">
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered">
</section>
<section class="panelV2">
<h2 class="panel__heading">{{ __('torrent.postponed-torrents') }}</h2>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th>{{ __('staff.moderation-since') }}</th>
@@ -203,122 +101,75 @@
<th>{{ __('torrent.size') }}</th>
<th>{{ __('torrent.uploader') }}</th>
<th>{{ __('common.staff') }}</th>
<th>{{ __('common.moderation-approve') }}</th>
<th>{{ __('common.edit') }}</th>
<th>{{ __('common.delete') }}</th>
<th>{{ __('common.action') }}</th>
</tr>
</thead>
<tbody>
@foreach ($postponed as $post)
@forelse ($postponed as $torrent)
<tr>
<td><span class="text-red text-bold">{{ $post->moderated_at->diffForHumans() }}</span></td>
<td><a href="{{ route('torrent', ['id' => $post->id]) }}" itemprop="url"
class="l-breadcrumb-item-link"><span itemprop="title"
class="l-breadcrumb-item-link-title">{{ $post->name }}</span></a>
<td>
<time datetime="{{ $torrent->moderated_at }}" title="{{ $torrent->moderated_at }}">
{{ $torrent->moderated_at->diffForHumans() }}
</time>
</td>
<td><i class="{{ $post->category->icon }} torrent-icon" data-toggle="tooltip"
data-original-title="{{ $post->category->name }} Torrent"></i></td>
<td>{{ $post->type->name }}</td>
<td>{{ $post->resolution->name ?? 'No Res' }}</td>
<td>{{ $post->getSize() }}</td>
<td>
<a href="{{ route('users.show', ['username' => $post->user->username]) }}"
itemprop="url" class="l-breadcrumb-item-link"><span itemprop="title"
class="l-breadcrumb-item-link-title">{{ $post->user->username }}
({{ $post->user->group->name }})</span></a></td>
<td>
<a href="{{ route('users.show', ['username' => $post->moderated->username]) }}"
itemprop="url" class="l-breadcrumb-item-link"><span itemprop="title"
class="l-breadcrumb-item-link-title">{{ $post->moderated->username }}
({{ $post->moderated->group->name }})</span></a></td>
<td>
<form role="form" method="POST"
action="{{ route('staff.moderation.approve', ['id' => $post->id]) }}"
style="display: inline-block;">
@csrf
<button type="submit" class="btn btn-labeled btn-success">
<span class="btn-label">
<i class="{{ config('other.font-awesome') }} fa-thumbs-up"></i>
</span>
{{ __('common.moderation-approve') }}
</button>
</form>
<a href="{{ route('torrent', ['id' => $torrent->id]) }}">{{ $torrent->name }}</a>
</td>
<td><a href="{{ route('edit', ['id' => $post->id]) }}" role='button'
class='btn btn-labeled btn-info'><span class="btn-label"><i
class="{{ config('other.font-awesome') }} fa-pencil"></i></span>{{ __('common.edit') }}
</a></td>
<td>
<button data-target="#postdelete-{{ $post->id }}" data-toggle="modal"
class="btn btn-labeled btn-danger"><span class="btn-label"><i
class="{{ config('other.font-awesome') }} fa-thumbs-down"></i></span>{{ __('common.delete') }}
</button>
<div class="modal fade" id="postdelete-{{ $post->id }}" tabindex="-1" role="dialog"
aria-hidden="true">
<form method="POST" action="{{ route('delete') }}">
@csrf
<div class="modal-dialog{{ modal_style() }}">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-label="{{ __('common.close') }}"><span
aria-hidden="true">×</span>
</button>
<h4 class="modal-title" id="myModalLabel">
{{ __('common.delete') }} {{ __('torrent.torrent') }}: {{ $post->name }}
</h4>
</div>
<div class="modal-body">
<div class="form-group">
<input id="type" type="hidden" name="type"
value="{{ __('torrent.torrent') }}">
<input id="id" type="hidden" name="id" value="{{ $post->id }}">
<input id="slug" type="hidden" name="slug"
value="{{ $post->slug }}">
<label for="file_name"
class="col-sm-2 control-label">{{ __('torrent.torrent') }}</label>
<div class="col-sm-10">
<p id="title" name="title"
class="form-control-static">{{ $post->name }}</p>
</div>
</div>
<div class="form-group">
<label for="report_reason"
class="col-sm-2 control-label">{{ __('common.reason') }}</label>
<div class="col-sm-10">
<label for="message"></label>
<textarea title="Deletion message" class="form-control" rows="5"
name="message" cols="50" id="message"></textarea>
</div>
</div>
<div class="form-group">
<div class="col-sm-10 col-sm-offset-2">
<button class="btn btn-danger"
type="submit">{{ __('common.delete') }}</button>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-sm btn-primary"
data-dismiss="modal">{{ __('common.close') }}</button>
</div>
</div>
</div>
</form>
</div>
<i
class="{{ $torrent->category->icon }} torrent-icon"
title="{{ $torrent->category->name }} Torrent"
></i>
</td>
<td>{{ $torrent->type->name }}</td>
<td>{{ $torrent->resolution->name ?? 'No Res' }}</td>
<td>{{ $torrent->getSize() }}</td>
<td>
<x-user_tag :anon="false" :user="$torrent->user" />
</td>
<td>
<x-user_tag :anon="false" :user="$torrent->moderated" />
</td>
<td>
<menu class="data-table__actions">
<li class="data-table__action">
<form
method="POST"
action="{{ route('staff.moderation.approve', ['id' => $torrent->id]) }}"
>
@csrf
<button class="form__button form__button--filled">
<i class="{{ config('other.font-awesome') }} fa-thumbs-up"></i>
{{ __('common.moderation-approve') }}
</button>
</form>
</li>
<li class="data-table__action">
<a
href="{{ route('edit', ['id' => $torrent->id]) }}"
class="form__button form__button--filled"
>
<i class="{{ config('other.font-awesome') }} fa-pencil"></i>
{{ __('common.edit') }}
</a>
</li>
@include('Staff.moderation.partials._delete_dialog', ['torrent' => $torrent])
</menu>
</td>
</tr>
@endforeach
@empty
<tr>
<td colspan="9">No postponed torrents</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
<div class="text-center"><h1>{{ __('torrent.rejected') }}</h1></div>
<div class="container box">
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered">
</section>
<section class="panelV2">
<h2 class="panel__heading">{{ __('torrent.rejected') }}</h2>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th>{{ __('staff.moderation-since') }}</th>
@@ -329,173 +180,70 @@
<th>{{ __('torrent.size') }}</th>
<th>{{ __('torrent.uploader') }}</th>
<th>{{ __('common.staff') }}</th>
<th>{{ __('common.moderation-approve') }}</th>
<th>{{ __('common.moderation-postpone') }}</th>
<th>{{ __('common.edit') }}</th>
<th>{{ __('common.delete') }}</th>
<th>{{ __('common.action') }}</th>
</tr>
</thead>
<tbody>
@foreach ($rejected as $reject)
@forelse ($rejected as $torrent)
<tr>
<td><span class="text-red text-red">{{ $reject->moderated_at->diffForHumans() }}</span></td>
<td><a href="{{ route('torrent', ['id' => $reject->id]) }}"
itemprop="url" class="l-breadcrumb-item-link"><span itemprop="title"
class="l-breadcrumb-item-link-title">{{ $reject->name }}</span></a>
</td>
<td><i class="{{ $reject->category->icon }} torrent-icon" data-toggle="tooltip"
data-original-title="{{ $reject->category->name }} Torrent"></i></td>
<td>{{ $reject->type->name }}</td>
<td>{{ $reject->resolution->name ?? 'No Res' }}</td>
<td>{{ $reject->getSize() }}</td>
<td>@if ($reject->user) <a
href="{{ route('users.show', ['username' => $reject->user->username]) }}"
itemprop="url" class="l-breadcrumb-item-link"><span itemprop="title"
class="l-breadcrumb-item-link-title">{{ $reject->user->username }}
({{ $reject->user->group->name }})</span></a> @else System @endif </td>
<td>
<a href="{{ route('users.show', ['username' => $reject->moderated->username]) }}"
itemprop="url" class="l-breadcrumb-item-link"><span itemprop="title"
class="l-breadcrumb-item-link-title">{{ $reject->moderated->username }}
({{ $reject->moderated->group->name }})</span></a></td>
<td>
<form role="form" method="POST"
action="{{ route('staff.moderation.approve', ['id' => $reject->id]) }}"
style="display: inline-block;">
@csrf
<button type="submit" class="btn btn-labeled btn-success">
<span class="btn-label">
<i class="{{ config('other.font-awesome') }} fa-thumbs-up"></i>
</span>
{{ __('common.moderation-approve') }}
</button>
</form>
<time datetime="{{ $torrent->moderated_at }}" title="{{ $torrent->moderated_at }}">
{{ $torrent->moderated_at->diffForHumans() }}
</time>
</td>
<td>
<button data-target="#rejectpost-{{ $reject->id }}" data-toggle="modal"
class="btn btn-labeled btn-danger">
<span class="btn-label"><i
class="{{ config('other.font-awesome') }} fa-pause"></i></span>
{{ __('common.moderation-postpone') }}
</button>
<div class="modal fade" id="rejectpost-{{ $reject->id }}" tabindex="-1" role="dialog"
aria-hidden="true">
<form method="POST" action="{{ route('staff.moderation.postpone') }}">
@csrf
<div class="modal-dialog{{ modal_style() }}">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-label="{{ __('common.close') }}"><span
aria-hidden="true">×</span>
</button>
<h4 class="modal-title" id="myModalLabel">
{{ __('common.moderation-postpone') }} {{ __('torrent.torrent') }}
: {{ $reject->name }}
</h4>
</div>
<div class="modal-body">
<div class="form-group">
<input id="type" name="type" type="hidden"
value="{{ __('torrent.torrent') }}">
<input id="id" name="id" type="hidden" value="{{ $reject->id }}">
<input id="slug" name="slug" type="hidden"
value="{{ $reject->slug }}">
<label for="postpone_reason"
class="col-sm-2 control-label">{{ __('common.reason') }}</label>
<div class="col-sm-10">
<label for="message"></label>
<textarea title="Postpone message" class="form-control" rows="5"
name="message" cols="50" id="message"></textarea>
</div>
</div>
<div class="form-group">
<div class="col-sm-10 col-sm-offset-2">
<button class="btn btn-danger" type="submit">
{{ __('common.moderation-postpone') }}
</button>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-sm btn-primary" type="button"
data-dismiss="modal">{{ __('common.close') }}</button>
</div>
</div>
</div>
</form>
</div>
<a href="{{ route('torrent', ['id' => $torrent->id]) }}">{{ $torrent->name }}</a>
</td>
<td><a href="{{ route('edit', ['id' => $reject->id]) }}" role='button'
class='btn btn-labeled btn-info'><span class="btn-label"><i
class="{{ config('other.font-awesome') }} fa-pencil"></i></span>{{ __('common.edit') }}
</a></td>
<td>
<button data-target="#rejectdelete-{{ $reject->id }}" data-toggle="modal"
class="btn btn-labeled btn-danger"><span class="btn-label"><i
class="{{ config('other.font-awesome') }} fa-thumbs-down"></i></span>{{ __('common.delete') }}
</button>
<div class="modal fade" id="rejectdelete-{{ $reject->id }}" tabindex="-1" role="dialog"
aria-hidden="true">
<form method="POST" action=" {{ route('delete') }}">
@csrf
<div class="modal-dialog{{ modal_style() }}">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-label="{{ __('common.close') }}"><span
aria-hidden="true">×</span>
</button>
<h4 class="modal-title" id="myModalLabel">
{{ __('common.delete') }} {{ __('torrent.torrent') }}: {{ $reject->name }}
</h4>
</div>
<div class="modal-body">
<div class="form-group">
<input id="type" type="hidden" name="type"
value="{{ __('torrent.torrent') }}">
<input id="id" type="hidden" name="id" value="{{ $reject->id }}">
<input id="slug" type="hidden" name="slug"
value="{{ $reject->slug }}">
<label for="file_name"
class="col-sm-2 control-label">{{ __('torrent.torrent') }}</label>
<div class="col-sm-10">
<p id="title" name="title"
class="form-control-static">{{ $reject->name }}</p>
</div>
</div>
<div class="form-group">
<label for="report_reason"
class="col-sm-2 control-label">{{ __('common.reason') }}</label>
<div class="col-sm-10">
<label for="message"></label>
<textarea title="Deletion message" class="form-control" rows="5"
name="message" cols="50" id="message"></textarea>
</div>
</div>
<div class="form-group">
<div class="col-sm-10 col-sm-offset-2">
<button class="btn btn-danger"
type="submit">{{ __('common.delete') }}</button>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-sm btn-primary" type="button"
data-dismiss="modal">{{ __('common.close') }}</button>
</div>
</div>
</div>
</form>
</div>
<i
class="{{ $torrent->category->icon }} torrent-icon"
title="{{ $torrent->category->name }} Torrent"
></i>
</td>
<td>{{ $torrent->type->name }}</td>
<td>{{ $torrent->resolution->name ?? 'No Res' }}</td>
<td>{{ $torrent->getSize() }}</td>
<td>
<x-user_tag :anon="false" :user="$torrent->user" />
</td>
<td>
<x-user_tag :anon="false" :user="$torrent->moderated" />
</td>
<td>
<menu class="data-table__actions">
<li class="data-table__action">
<form
method="POST"
action="{{ route('staff.moderation.approve', ['id' => $torrent->id]) }}"
>
@csrf
<button class="form__button form__button--filled">
<i class="{{ config('other.font-awesome') }} fa-thumbs-up"></i>
{{ __('common.moderation-approve') }}
</button>
</form>
</li>
@include('Staff.moderation.partials._postpone_dialog', ['torrent' => $torrent])
<li class="data-table__action">
<a
href="{{ route('edit', ['id' => $torrent->id]) }}"
class="form__button form__button--filled"
>
<i class="{{ config('other.font-awesome') }} fa-pencil"></i>
{{ __('common.edit') }}
</a>
</li>
@include('Staff.moderation.partials._delete_dialog', ['torrent' => $torrent])
</menu>
</td>
</tr>
@endforeach
@empty
<tr>
<td colspan="9">No rejected torrents</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
</section>
@endsection
@@ -0,0 +1,36 @@
<li class="data-table__action" x-data>
<button class="form__button form__button--filled" x-on:click.stop="$refs.dialog.showModal()">
<i class="{{ config('other.font-awesome') }} fa-thumbs-down"></i>
{{ __('common.delete') }}
</button>
<dialog class="dialog" x-ref="dialog">
<h4 class="dialog__heading">
{{ __('common.delete') }} {{ __('torrent.torrent') }}: {{ $torrent->name }}
</h4>
<form
class="dialog__form"
method="POST"
action="{{ route('delete') }}"
x-on:click.outside="$refs.dialog.close()"
>
@csrf
<p class="form__group">
<input id="type" type="hidden" name="type" value="{{ __('torrent.torrent') }}">
<input id="id" type="hidden" name="id" value="{{ $torrent->id }}">
<input id="slug" type="hidden" name="slug" value="{{ $torrent->slug }}">
</p>
<p class="form__group">
<textarea class="form__textarea" name="message" id="message"></textarea>
<label class="form__label form__label--floating" for="message">Deletion Reason</label>
</p>
<p class="form__group">
<button class="form__button form__button--filled">
{{ __('common.delete') }}
</button>
<button x-on:click.prevent="$refs.dialog.close()" class="form__button form__button--outlined">
{{ __('common.cancel') }}
</button>
</p>
</form>
</dialog>
</li>
@@ -0,0 +1,34 @@
<li class="data-table__action" x-data>
<button class="form__button form__button--filled" x-on:click.stop="$refs.dialog.showModal()">
<i class="{{ config('other.font-awesome') }} fa-pause"></i>
{{ __('common.moderation-postpone') }}
</button>
<dialog class="dialog" x-ref="dialog">
<h4 class="dialog__heading">
{{ __('common.moderation-postpone') }} {{ __('torrent.torrent') }}: {{ $torrent->name }}
</h4>
<form
class="dialog__form"
method="POST"
action="{{ route('staff.moderation.postpone') }}"
x-on:click.outside="$refs.dialog.close()"
>
@csrf
<input type="hidden" name="type" value="{{ __('torrent.torrent') }}">
<input type="hidden" name="id" value="{{ $torrent->id }}">
<input type="hidden" name="slug" value="{{ $torrent->slug }}">
<p class="form__group">
<textarea class="form__textarea" name="message" id="message"></textarea>
<label class="form__label form__label--floating" for="message">Postpone Message</label>
</p>
<p class="form__group">
<button class="form__button form__button--filled">
{{ __('common.moderation-postpone') }}
</button>
<button class="form__button form__button--outlined" x-on:click.prevent="$refs.dialog.close()">
{{ __('common.cancel') }}
</button>
</p>
</form>
</dialog>
</li>
@@ -0,0 +1,34 @@
<li class="data-table__action" x-data>
<button class="form__button form__button--filled" x-on:click.stop="$refs.dialog.showModal()">
<i class="{{ config('other.font-awesome') }} fa-thumbs-down"></i>
{{ __('common.moderation-reject') }}
</button>
<dialog class="dialog" x-ref="dialog">
<h3 class="dialog__heading">
{{ __('common.moderation-reject') }} {{ __('torrent.torrent') }}: {{ $torrent->name }}
</h3>
<form
class="dialog__form"
method="POST"
action="{{ route("staff.moderation.reject") }}"
x-on:click.outside="$refs.dialog.close()"
>
@csrf
<input id="type" type="hidden" name="type" value="{{ __('torrent.torrent') }}">
<input id="id" type="hidden" name="id" value="{{ $torrent->id }}">
<input id="slug" type="hidden" name="slug" value="{{ $torrent->slug }}">
<p class="form__group">
<textarea id="message" class="form__textarea" name="message"></textarea>
<label for="message" class="form__label form__label__floating">Rejection Message</label>
</p>
<p class="form__group">
<button class="form__button form__button--filled">
{{ __('common.moderation-reject') }}
</button>
<button x-on:click.prevent="$refs.dialog.close()" class="form__button form__button--outlined">
{{ __('common.cancel') }}
</button>
</p>
</form>
</dialog>
</li>
+72 -65
View File
@@ -19,70 +19,77 @@
</li>
@endsection
@section('content')
<div class="container">
<div class="block">
<h2>{{ __('staff.user-notes') }}</h2>
<hr>
<div class="row">
<div class="col-sm-12">
<h2>{{ __('user.note') }} <span class="text-blue"><strong><i
class="{{ config('other.font-awesome') }} fa-note"></i>
{{ $notes->count() }} </strong></span>
</h2>
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered table-hover">
<thead>
<tr>
<th>{{ __('common.user') }}</th>
<th>{{ __('common.staff') }}</th>
<th>{{ __('common.message') }}</th>
<th>{{ __('user.created-on') }}</th>
<th>{{ __('common.delete') }}</th>
</tr>
</thead>
<tbody>
@if (count($notes) == 0)
<p>The are no notes in database for this user!</p>
@else
@foreach ($notes as $note)
<tr>
<td>
<a class="name"
href="{{ route('users.show', ['username' => $note->noteduser->username]) }}">{{ $note->noteduser->username }}</a>
</td>
<td>
<a class="name"
href="{{ route('users.show', ['username' => $note->staffuser->username]) }}">{{ $note->staffuser->username }}</a>
</td>
<td>
{{ $note->message }}
</td>
<td>
{{ $note->created_at->toDayDateTimeString() }}
({{ $note->created_at->diffForHumans() }})
</td>
<td>
<form action="{{ route('staff.notes.destroy', ['id' => $note->id]) }}"
method="POST">
@csrf
@method('DELETE')
<button type="submit" class="btn btn-xs btn-danger"><i
class="{{ config('other.font-awesome') }} fa-trash"></i>
</button>
</form>
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
</div>
</div>
<div class="text-center">
{{ $notes->links() }}
</div>
@section('page', 'page__notes-log--index')
@section('main')
<section class="panelV2">
<h2 class="panel__heading">{{ __('staff.user-notes') }}</h2>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th>#</th>
<th>{{ __('common.user') }}</th>
<th>{{ __('common.staff') }}</th>
<th>{{ __('common.message') }}</th>
<th>{{ __('user.created-on') }}</th>
<th>{{ __('common.actions') }}</th>
</tr>
</thead>
<tbody>
@forelse ($notes as $note)
<tr>
<td>{{ $note->id }}</td>
<td>
<x-user_tag :anon="false" :user="$note->noteduser" />
</td>
<td>
<x-user_tag :anon="false" :user="$note->staffuser" />
</td>
<td>{{ $note->message }}</td>
<td>
<time datetime="{{ $note->created_at }}" title="{{ $note->created_at }}">
{{ $note->created_at->diffForHumans() }}
</time>
</td>
<td>
<menu class="data-table__actions">
<li class="data-table__action">
<form
action="{{ route('staff.notes.destroy', ['id' => $note->id]) }}"
method="POST"
x-data
>
@csrf
@method('DELETE')
<button
x-on:click.prevent="Swal.fire({
title: 'Are you sure?',
text: 'Are you sure you want to delete this note: {{ $note->message }}?',
icon: 'warning',
showConfirmButton: true,
showCancelButton: true,
}).then((result) => {
if (result.isConfirmed) {
$root.submit();
}
})"
class="form__button form__button--text"
>
{{ __('common.delete') }}
</button>
</form>
</li>
</menu>
</td>
</tr>
@empty
<tr>
<td colspan="6">No notes</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
</section>
@endsection
+28 -19
View File
@@ -16,29 +16,38 @@
</li>
@endsection
@section('content')
<div class="container box">
<h2>
@section('page', 'page__page-admin--create')
@section('main')
<section class="panelV2">
<h2 class="panel__heading">
{{ __('common.add') }}
{{ trans_choice('common.a-an-art',false) }}
{{ __('common.new-adj') }}
{{ __('staff.page') }}
</h2>
<form role="form" method="POST" action="{{ route('staff.pages.store') }}">
@csrf
<div class="form-group">
<label for="name">{{ __('staff.page') }} {{ __('common.name') }}</label>
<label>
<input type="text" name="name" class="form-control">
</label>
</div>
<div class="form-group">
<label for="content">{{ __('common.content') }}</label>
<textarea name="content" id="editor" cols="30" rows="10" class="form-control"></textarea>
</div>
<button type="submit" class="btn btn-default">{{ __('common.submit') }}</button>
</form>
<div class="panel__body">
<form class="form" method="POST" action="{{ route('staff.pages.store') }}">
@csrf
<p class="form__group">
<input
id="name"
class="form__text"
type="text"
name="name"
required
>
<label class="form__label form__label--floating" for="name">
{{ __('staff.page') }} {{ __('common.name') }}
</label>
</p>
@livewire('bbcode-input', ['name' => 'content', 'label' => __('common.content'), 'required' => true])
<p class="form__group">
<button class="form__button form__button--filled">
{{ __('common.submit') }}
</button>
</p>
</form>
</div>
</div>
@endsection
+38 -24
View File
@@ -11,34 +11,48 @@
{{ __('staff.pages') }}
</a>
</li>
<li class="breadcrumbV2">
{{ $page->name }}
</li>
<li class="breadcrumb--active">
{{ __('common.edit') }}
</li>
@endsection
@section('content')
<div class="container box">
<h2>
{{ __('common.edit') }}
{{ __('staff.page') }}
{{ $page->name }}
@section('page', 'page__page-admin--edit')
@section('main')
<section class="panelV2">
<h2 class="panel__heading">
{{ __('common.edit') }} {{ __('staff.page') }}: {{ $page->name }}
</h2>
<form role="form" method="POST" action="{{ route('staff.pages.update', ['id' => $page->id]) }}">
@csrf
<div class="form-group">
<label for="name">{{ __('staff.page') }} {{ __('common.name') }}</label>
<label>
<input type="text" name="name" class="form-control" value="{{ $page->name }}">
</label>
</div>
<div class="form-group">
<label for="content">{{ __('common.content') }}</label>
<textarea name="content" id="editor" cols="30" rows="10"
class="form-control">{{ $page->content }}</textarea>
</div>
<button type="submit" class="btn btn-default">{{ __('common.save') }}</button>
</form>
</div>
<div class="panel__body">
<form
class="form"
method="POST"
action="{{ route('staff.pages.update', ['id' => $page->id]) }}"
>
@csrf
<p class="form__group">
<input
id="name"
class="form__text"
name="name"
required
type="text"
value="{{ $page->name }}"
>
<label class="form__label form__label--floating" for="name">
{{ __('common.name') }}
</label>
</p>
@livewire('bbcode-input', ['name' => 'content', 'label' => __('common.content'), 'required' => true, 'content' => $page->content])
<p class="form__group">
<button class="form__button form__button--filled">
{{ __('common.save') }}
</button>
</p>
</form>
</div>
</section>
@endsection
+69 -24
View File
@@ -11,49 +11,94 @@
</li>
@endsection
@section('content')
<div class="container box">
<h2>{{ __('staff.pages') }}</h2>
<a href="{{ route('staff.pages.create') }}" class="btn btn-primary">
{{ __('common.add') }}
{{ trans_choice('common.a-an-art',false) }}
{{ __('common.new-adj') }}
{{ __('staff.page') }}
</a>
@section('page', 'page__page-admin--index')
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered table-hover">
@section('main')
<section class="panelV2">
<header class="panel__header">
<h2 class="panel__heading">{{ __('staff.pages') }}</h2>
<div class="panel__actions">
<a href="{{ route('staff.pages.create') }}" class="panel__action form__button form__button--text">
{{ __('common.add') }}
</a>
</div>
</header>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th>{{ __('common.title') }}</th>
<th>{{ __('common.date') }}</th>
<th>{{ __('common.action') }}</th>
<th>{{ __('common.actions') }}</th>
</tr>
</thead>
<tbody>
@foreach ($pages as $page)
@forelse ($pages as $page)
<tr>
<td>
<a href="{{ route('pages.show', ['id' => $page->id]) }}">
<a href="{{ route('staff.pages.edit', ['id' => $page->id]) }}">
{{ $page->name }}
</a>
</td>
<td>
{{ $page->created_at }} ({{ $page->created_at->diffForHumans() }})
<time datetime="{{ $page->created_at }}" title="{{ $page->created_at }}">
{{ $page->created_at->diffForHumans() }}
</time>
</td>
<td>
<form action="{{ route('staff.pages.destroy', ['id' => $page->id]) }}" method="POST">
@csrf
@method('DELETE')
<a href="{{ route('staff.pages.edit', ['id' => $page->id]) }}"
class="btn btn-warning">{{ __('common.edit') }}</a>
<button type="submit" class="btn btn-danger">{{ __('common.delete') }}</button>
</form>
<menu class="data-table__actions">
<li class="data-table__action">
<a
href="{{ route('pages.show', ['id' => $page->id]) }}"
class="form__button form__button--text"
>
{{ __('common.view') }}
</a>
</li>
<li class="data-table__action">
<a
href="{{ route('staff.pages.edit', ['id' => $page->id]) }}"
class="form__button form__button--text"
>
{{ __('common.edit') }}
</a>
</li>
<li class="data-table__action">
<form
action="{{ route('staff.pages.destroy', ['id' => $page->id]) }}"
method="POST"
x-data
>
@csrf
@method('DELETE')
<button
x-on:click.prevent="Swal.fire({
title: 'Are you sure?',
text: 'Are you sure you want to delete this page: {{ $page->name }}?',
icon: 'warning',
showConfirmButton: true,
showCancelButton: true,
}).then((result) => {
if (result.isConfirmed) {
$root.submit();
}
})"
class="form__button form__button--text"
>
{{ __('common.delete') }}
</button>
</form>
</li>
</menu>
</td>
</tr>
@endforeach
@empty
<tr>
<td colspan="3">No pages</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
</section>
@endsection
+74 -20
View File
@@ -20,25 +20,79 @@
</li>
@endsection
@section('content')
<div class="container">
<div class="row">
<div class="page-title">
<h1>{{ __('poll.create-poll') }}</h1>
</div>
<div class="col-md-12">
<div class="panel panel-chat">
<div class="panel-heading">
{{ __('common.create') }}
{{ trans_choice('common.a-an-art',false) }}
{{ __('poll.poll') }}
</div>
<div class="panel-body">
@include('Staff.poll.forms.make')
</div>
</div>
</div>
</div>
</div>
@section('page', 'page__poll-admin--create')
@section('main')
<section class="panelV2">
<h2 class="panel__heading">{{ __('poll.create-poll') }}</h2>
<div class="panel-body">
<form
class="form"
method="POST"
action="{{ route('staff.polls.store') }}"
x-data="{ options: 2 }"
>
@csrf
<p class="form__group">
<input
id="title"
class="form__text"
minlength="10"
name="title"
required
type="text"
value="{{ old('title') }}"
>
<label class="form__label form__label--floating" for="title">
{{ __('common.title') }}
</label>
</p>
<template x-for="option in options">
<p class="form__group">
<input
x-bind:id="'option' + option"
class="form__text"
name="options[]"
type="text"
placeholder=""
>
<label class="form__label form__label--floating" x-bind:for="'option' + option">
{{ __('poll.option') }}
</label>
</p>
</template>
<p class="form__group">
<button
x-on:click.prevent="options++"
class="form__button form__button--outlined"
>
{{ __('poll.add-option') }}
</button>
<button
class="form__button form__button--outlined"
x-on:click.prevent="options = Math.max(2, options - 1)"
>
{{ __('poll.delete-option') }}
</button>
</p>
<p class="form__group">
<input
id="multiple_choice"
class="form__checkbox"
name="multiple_choice"
type="checkbox"
value="1"
>
<label class="form__label" for="multiple_choice">
{{ __('poll.multiple-choice') }}
</label>
</p>
<p class="form__group">
<button class="form__button form__button--filled">
{{ __('poll.create-poll') }}
</button>
</p>
</form>
</div>
</section>
@endsection
+63 -17
View File
@@ -20,23 +20,69 @@
</li>
@endsection
@section('content')
<div class="container">
<div class="row">
<div class="page-title">
<h1>{{ __('poll.edit-poll') }}</h1>
</div>
<div class="col-md-12">
<div class="panel panel-chat">
<div class="panel-heading">
{{ __('poll.edit-poll') }} {{$poll->title}}
</div>
<div class="panel-body">
@include('Staff.poll.forms.update')
</div>
</div>
</div>
@section('page', 'page__poll-admin--edit')
@section('main')
<section class="panelV2">
<h2 class="panel__heading">{{ __('poll.edit-poll') }}: {{$poll->title}}</h2>
<div class="panel__body">
<form
class="form"
method="POST"
action="{{ route('staff.polls.update', ['id' => $poll->id]) }}"
x-data='{ extraOptions: {!! $poll->options->map(fn ($item) => $item->only(['id', 'name'])) !!} }''
>
@csrf
<input type="hidden" name="poll-id" value="{{ $poll->id }}">
<p class="form__group">
<input
id="title"
class="form__text"
minlength="10"
name="title"
required
type="text"
value="{{ $poll->title }}"
>
<label class="form__label form__label--floating" for="title">
{{ __('poll.title') }}
</label>
</p>
<template x-for="(option, i) in extraOptions">
<p class="form__group">
<input type="hidden" name="option-id[]" x-bind:value="option['id']">
<input
x-bind:id="'option' + i"
class="form__text"
type="text"
name="option-content[]"
x-bind:value="option['name']"
required
>
<label class="form__label form__label--floating" x-bind:for="'option' + i">
{{ __('poll.option') }}
</label>
</p>
</template>
<p class="form__group">
<button x-on:click.prevent='extraOptions.push({"id": null, "name": ""})' class="form__button form__button--outlined">
{{ __('poll.add-option') }}
</button>
<button x-on:click.prevent="extraOptions.length > 2 ? extraOptions.pop() : null" id="del" class="form__button form__button--outlined">
{{ __('poll.delete-option') }}
</button>
</p>
<p class="form__group">
<input type="checkbox" name="multiple_choice" @checked($poll->multiple_choice)>
<label class="form__label">{{ __('poll.multiple-choice') }}</label>
</p>
<p class="form__group">
<button class="form__button form__button--filled">
{{ __('poll.edit-poll') }}
</button>
</p>
</form>
</div>
</div>
</section>
@endsection
@@ -1,76 +0,0 @@
<form method="POST" action="{{ route('staff.polls.store') }}">
@if (count($errors) > 0)
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
@csrf
<div class="form-group">
<label for="stitle">{{ __('common.title') }}:</label>
<label>
<input type="text" name="title" class="form-control" value="" required>
</label>
</div>
<div class="form-group">
<label for="option1">{{ __('poll.option') }} 1:</label>
<label>
<input type="text" name="options[]" class="form-control" value="">
</label>
</div>
<div class="form-group">
<label for="option2">{{ __('poll.option') }} 2:</label>
<label>
<input type="text" name="options[]" class="form-control" value="">
</label>
</div>
<div class="more-options"></div>
<div class="form-group">
<button id="add" class="btn btn-primary">{{ __('poll.add-option') }}</button>
<button id="del" class="btn btn-primary">{{ __('poll.delete-option') }}</button>
</div>
<hr>
<div class="checkbox">
<label>
<input type="checkbox" name="multiple_choice" value="1">{{ __('poll.multiple-choice') }}
</label>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary">{{ __('poll.create-poll') }}</button>
</div>
</form>
@section('javascripts')
<script nonce="{{ HDVinnie\SecureHeaders\SecureHeaders::nonce('script') }}">
let options = 2
const langOption = "<?php echo __('poll.option') ?>"
$('#add').on('click', function (e) {
e.preventDefault()
options += 1
const optionHTML = '<div class="form-group extra-option"><label for="option' + options + '">' + langOption
+ options
+ ':</label><input type="text" name="options[]" class="form-control" value="" required></div>'
$('.more-options').append(optionHTML)
})
$('#del').on('click', function (e) {
e.preventDefault()
options = (options > 2) ? options - 1 : 2
$('.extra-option').last().remove()
})
</script>
@endsection
@@ -1,74 +0,0 @@
<form method="POST" action="{{ route('staff.polls.update', ['id' => $poll->id]) }}">
@if (count($errors) > 0)
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
@csrf
<div class="form-group">
<label for="stitle">{{ __('poll.title') }}:</label>
<label>
<input readonly type="number" name="poll-id" style="visibility: hidden;" value="{{ $poll->id }}">
<input type="text" name="title" class="form-control" value="{{ $poll->title }}" required>
</label>
</div>
@foreach($poll->options as $key => $option)
<div class="form-group <?php echo(++$key) >= 3 ? 'extra-option' : '' ?>">
<label for="{{ 'option' . $key }}">{{ __('poll.option') }} {{ $key }}:</label>
<label>
<input readonly type="number" name="option-id[]" style="visibility: hidden;" value="{{ $option->id }}">
<input type="text" name="option-content[]" class="form-control" value="{{ $option->name }}">
</label>
</div>
@endforeach
<div class="more-options"></div>
<div class="form-group">
<button id="add" class="btn btn-primary">{{ __('poll.add-option') }}</button>
<button id="del" class="btn btn-primary">{{ __('poll.delete-option') }}</button>
</div>
<hr>
<div class="checkbox">
<label>
<input type="checkbox" name="multiple_choice" @if ($poll->multiple_choice) checked @endif >
{{ __('poll.multiple-choice') }}
</label>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary">{{ __('poll.edit-poll') }}</button>
</div>
</form>
@section('javascripts')
<script nonce="{{ HDVinnie\SecureHeaders\SecureHeaders::nonce('script') }}">
let options = parseInt({{ $poll->options->count() }}) // Get the size of options passing in
const langOption = "{{ __('poll.option') }} "
$('#add').on('click', function (e) {
e.preventDefault()
options += 1
const optionHTML = `<div class="form-group extra-option"><label for="option${options}">${langOption}${options}:</label><input type="text" name="new-option-content[]" class="form-control" value="" required></div>`
$('.more-options').append(optionHTML)
})
$('#del').on('click', function (e) {
e.preventDefault()
options = (options > 2) ? options - 1 : 2
$('.extra-option').last().remove()
})
</script>
@endsection
+67 -21
View File
@@ -15,16 +15,18 @@
</li>
@endsection
@section('content')
<div class="container box">
<h2>{{ __('poll.poll') }}</h2>
<a href="{{ route('staff.polls.create') }}" class="btn btn-primary">
{{ __('common.add') }}
{{ trans_choice('common.a-an-art',false) }}
{{ __('poll.poll') }}
</a>
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered table-hover">
@section('page', 'page__poll-admin--index')
@section('main')
<section class="panelV2">
<header class="panel__header">
<h2 class="panel__heading">{{ __('poll.poll') }}</h2>
<a href="{{ route('staff.polls.create') }}" class="form__button form__button--text">
{{ __('common.add') }}
</a>
</header>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th>{{ __('poll.title') }}</th>
@@ -35,22 +37,66 @@
<tbody>
@foreach ($polls as $poll)
<tr>
<td><a href="{{ route('staff.polls.show', ['id' => $poll->id]) }}">{{ $poll->title }}</a></td>
<td>{{ date('d M Y', $poll->created_at->getTimestamp()) }}</td>
<td>
<form action="{{ route('staff.polls.destroy', ['id' => $poll->id]) }}" method="POST">
@csrf
@method('DELETE')
<a href="{{ route('staff.polls.edit', ['id' => $poll->id]) }}"
class="btn btn-warning">{{ __('common.edit') }}</a>
<button type="submit" class="btn btn-danger">{{ __('common.delete') }}</button>
</form>
<a href="{{ route('staff.polls.show', ['id' => $poll->id]) }}">
{{ $poll->title }}
</a>
</td>
<td>
<time datetime="{{ $poll->created_at }}" title="{{ $poll->created_at }}">
{{ date('d M Y', $poll->created_at->getTimestamp()) }}
</time>
</td>
<td>
<menu class="data-table__actions">
<li class="data-table__action">
<a
href="{{ route('poll', ['id' => $poll->id]) }}"
class="form__button form__button--text"
>
{{ __('common.view') }}
</a>
</li>
<li class="data-table__action">
<a
href="{{ route('staff.polls.edit', ['id' => $poll->id]) }}"
class="form__button form__button--text"
>
{{ __('common.edit') }}
</a>
</li>
<li class="data-table__action">
<form
action="{{ route('staff.polls.destroy', ['id' => $poll->id]) }}"
method="POST"
x-data
>
@csrf
@method('DELETE')
<button
x-on:click.prevent="Swal.fire({
title: 'Are you sure?',
text: 'Are you sure you want to delete this poll: {{ $poll->title }}?',
icon: 'warning',
showConfirmButton: true,
showCancelButton: true,
}).then((result) => {
if (result.isConfirmed) {
$root.submit();
}
})"
class="form__button form__button--text"
>
{{ __('common.delete') }}
</button>
</form>
</li>
</menu>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</section>
@endsection
+27 -32
View File
@@ -15,43 +15,38 @@
{{ __('poll.polls') }}
</a>
</li>
<li class="breadcrumbV2">
{{ $poll->name }}
</li>
<li class="breadcrumb--active">
{{ __('poll.results') }}
</li>
@endsection
@section('content')
<div class="container">
<div class="page-title">
<h1>{{ __('poll.poll') }} {{ __('poll.results') }}</h1>
@section('page', 'page__poll-admin--show')
@section('main')
<section class="panelV2">
<h2 class="panel__heading">{{ __('poll.results') }}: {{ $poll->title }}</h2>
<div class="panel__body">
@php($total = $poll->options->sum('votes'))
@foreach ($poll->options as $option)
<p class="form__group">
<label class="form__label" for="option{{ $loop->iteration }}">
{{ $option->name }} ({{ \number_format($total === 0 ? 0 : 100 * $option->votes / $total, 2) }}%)
</label>
<meter
id="option{{ $loop->iteration }}"
class="form__meter"
min="0"
max="{{ $total }}"
value="{{ $option->votes }}"
>
{{ \number_format($total === 0 ? 0 : 100 * $option->votes / $total, 1) }} - {{ $option->votes === 1 ? __('poll.vote') : __('poll.votes') }}
</meter>
</p>
@endforeach
</div>
<div class="row">
<div class="col-md-12">
<div class="panel panel-chat">
<div class="panel-heading">
<h1 class="panel-title">{{ $poll->title }}</h1>
</div>
<div class="panel-body">
@foreach ($poll->options as $option)
<strong>{{ $option->name }}</strong><span class="pull-right">{{ $option->votes }}
@if ($option->votes == 1)
{{ __('poll.vote') }}
@else
{{ __('poll.votes') }}
@endif
</span>
<div class="progress">
<div class="progress-bar progress-bar-striped active" role="progressbar"
aria-valuenow="{{ $option->votes }}" aria-valuemin="0" aria-valuemax="100"
style="width: {{ $option->votes }}%;">
{{ $option->votes }}
</div>
</div>
@endforeach
</div>
</div>
</div>
</div>
</div>
</section>
@endsection
+63 -83
View File
@@ -19,89 +19,69 @@
</li>
@endsection
@section('content')
<div class="container">
<div class="block">
<h2>{{ __('staff.reports-log') }}</h2>
<hr>
<div class="row">
<div class="col-sm-12">
<p class="text-red"><strong><i class="{{ config('other.font-awesome') }} fa-list"></i>
{{ __('common.report') }}</strong>
</p>
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered table-hover">
<thead>
<tr>
<th>ID</th>
<th>Type</th>
<th>{{ __('common.title') }}</th>
<th>Reported</th>
<th>{{ __('common.reporter') }}</th>
<th class="col-md-2">{{ __('user.created-on') }}</th>
<th>{{ __('user.judge') }}</th>
<th>{{ __('forum.solved') }}</th>
</tr>
</thead>
<tbody>
@if (count($reports) == 0)
<p>The are no reports in database</p>
@else
@foreach ($reports as $report)
<tr>
<td>
{{ $report->id }}
</td>
<td>
{{ $report->type }}
</td>
<td>
<a
href="{{ route('staff.reports.show', ['id' => $report->id]) }}">{{ $report->title }}</a>
</td>
<td class="user-name">
<a class="name"
href="{{ route('users.show', ['username' => $report->reported->username]) }}">
{{ $report->reported->username }}
</a>
</td>
<td class="user-name">
<a class="name"
href="{{ route('users.show', ['username' => $report->reporter->username]) }}">
{{ $report->reporter->username }}
</a>
</td>
<td>
{{ $report->created_at->toDayDateTimeString() }}
</td>
<td class="user-name">
<a class="name"
href="{{ $report->staff->username ? route('users.show', ['username' => $report->staff->username]) : route('home') }}">
{{ $report->staff_id ? $report->staff->username : '' }}
</a>
</td>
<td>
@if ($report->solved == 0)
<span class="text-red">
<strong><i class="{{ config('other.font-awesome') }} fa-times"></i> {{ __('common.no') }}</strong>
</span>
@else
<span class="text-green">
<strong><i class="{{ config('other.font-awesome') }} fa-check"></i> {{ __('common.yes') }}</strong>
</span>
@endif
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
</div>
</div>
<div class="text-center">
{{ $reports->links() }}
</div>
@section('page', 'page__report--index')
@section('main')
<div class="panelV2">
<h2 class="panel__heading">{{ __('staff.reports-log') }}</h2>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th>ID</th>
<th>Type</th>
<th>{{ __('common.title') }}</th>
<th>Reported</th>
<th>{{ __('common.reporter') }}</th>
<th>{{ __('user.created-on') }}</th>
<th>{{ __('user.judge') }}</th>
<th>{{ __('forum.solved') }}</th>
</tr>
</thead>
<tbody>
@forelse ($reports as $report)
<tr>
<td>{{ $report->id }}</td>
<td>{{ $report->type }}</td>
<td>
<a href="{{ route('staff.reports.show', ['id' => $report->id]) }}">
{{ $report->title }}
</a>
</td>
<td>
<x-user_tag :anon="false" :user="$report->reported" />
</td>
<td>
<x-user_tag :anon="false" :user="$report->reporter" />
</td>
<td>
<time datetime="{{ $report->created_at }}" title="{{ $report->created_at }}">
{{ $report->created_at->toDayDateTimeString() }}
</time>
</td>
<td>
@if ($report->staff_id !== null)
<x-user_tag :anon="false" :user="$report->staff" />
@endif
</td>
<td>
@if ($report->solved)
<i class="{{ config('other.font-awesome') }} fa-check text-green"></i>
{{ __('common.yes') }}
@else
<i class="{{ config('other.font-awesome') }} fa-times text-red"></i>
{{ __('common.no') }}
@endif
</td>
</tr>
@empty
<tr>
<td colspan="8">No reports</td>
</tr>
@endforelse
</tbody>
</table>
</div>
{{ $reports->links('partials.pagination') }}
</div>
@endsection
+92 -91
View File
@@ -19,101 +19,102 @@
</a>
</li>
<li class="breadcrumb--active">
{{ __('common.report') }}
{{ __('common.report') }} Details
</li>
@endsection
@section('content')
<div class="container">
<div class="block">
<h2>Report Details
@if ($report->solved == 0)
<span class="text-red"><strong><i class="{{ config('other.font-awesome') }} fa-times"></i> UNSOLVED
</strong></span>
@else
<span class="text-green"><strong><i class="{{ config('other.font-awesome') }} fa-check"></i> SOLVED BY
<a class="name" href="{{ route('users.show', ['username' => $report->staff->username]) }}">
{{ $report->staff->username }}
</a>
</strong>
</span>
@endif
</h2>
<hr>
<div class="row">
<div class="col-sm-12">
<h3>Reported {{ __('common.user') }}:</h3>
<p class="well well-sm">
<a href="{{ route('users.show', ['username' => $report->reported->username]) }}">
{{ $report->reported->username }}
</a>
</p>
<h3>{{ __('common.reporter') }}:</h3>
<p class="well well-sm">
<a href="{{ route('users.show', ['username' => $report->reporter->username]) }}">
{{ $report->reporter->username }}
</a>
</p>
@section('page', 'page__poll--show')
@if ($report->torrent)
<h3>{{ __('torrent.torrent') }} {{ __('torrent.title') }}:</h3>
<p class="well well-sm">
<a href="{{ route('torrent', ['id' => $report->torrent->id]) }}">
{{ $report->title }}
</a>
</p>
@endif
@if ($report->request)
<h3>{{ __('torrent.torrent-request') }} {{ __('request.title') }}:</h3>
<p class="well well-sm">
<a href="{{ route('request', ['id' => $report->request->id]) }}">
{{ $report->title }}
</a>
</p>
@endif
<h3>{{ __('common.message') }}:</h3>
<p class="well well-lg">
{{ $report->message }}
</p>
@if (count($urls) > 0)
<h3>Referenced Links:</h3>
<p class="well">
@foreach ($urls as $url)
<a href="{{ $url }}" target="_blank">{{ $url }}</a><br/>
@endforeach
</p>
@endif
</div>
@section('main')
@if ($report->torrent)
<section class="panelV2">
<h2 class="panel__heading">{{ __('torrent.torrent') }} {{ __('torrent.title') }}</h2>
<div class="panel__body">
<a href="{{ route('torrent', ['id' => $report->torrent->id]) }}">
{{ $report->title }}
</a>
</div>
<h2>Resolve {{ __('common.report') }}</h2>
<hr>
<div class="row">
<div class="col-sm-12">
<form role="form" method="POST" action="{{ route('staff.reports.update', ['id' => $report->id]) }}">
@csrf
@if ($report->solved == 0)
<div class="form-group">
<label for="message">Verdict</label>
<label>
<textarea name="verdict" class="form-control"></textarea>
</label>
</div>
<button type="submit" class="btn btn-primary">{{ __('common.submit') }}</button>
@else
<div class="form-group">
<h3>Verdict</h3>
<p class="well">
{{ $report->verdict }}
</p>
</div>
@endif
</form>
</div>
</section>
@endif
@if ($report->request)
<section class="panelV2">
<h2>{{ __('torrent.torrent-request') }} {{ __('request.title') }}</h2>
<div class="panel__body">
<a href="{{ route('request', ['id' => $report->request->id]) }}">
{{ $report->title }}
</a>
</div>
</div>
</div>
</section>
@endif
<section class="panelV2">
<h2 class="panel__heading">{{ __('common.message') }}</h2>
<div class="panel__body">{{ $report->message }}</div>
</section>
@if (count($urls) > 0)
<section class="panelV2">
<h2 class="panel__heading">Referenced Links:</h2>
<div class="panel__body">
<ul style="margin: 0; padding-left: 20px">
@foreach ($urls as $url)
<li>
<a href="{{ $url }}" target="_blank">{{ $url }}</a>
</li>
@endforeach
</ul>
</div>
</section>
@endif
@if ($report->solved)
<section class="panelV2">
<h2 class="panel__heading">Verdict</h2>
<div class="panel__body">{{ $report->verdict }}</div>
</section>
@else
<section class="panelV2">
<h2 class="panel__heading">Resolve {{ __('common.report') }}</h2>
<div class="panel__body">
<form
class="form"
method="POST"
action="{{ route('staff.reports.update', ['id' => $report->id]) }}"
>
@csrf
@livewire('bbcode-input', ['name' => 'verdict', 'label' => 'Verdict', 'required' => true])
<p class="form__group">
<button class="form__button form__button--filled">
{{ __('common.submit') }}
</button>
</p>
</form>
</div>
</section>
@endif
@endsection
@section('sidebar')
<section class="panelV2">
<h2 class="panel__heading">Reported {{ __('common.user') }}</h2>
<div class="panel__body">
<x-user_tag :anon="false" :user="$report->reported" />
</div>
</section>
<section class="panelV2">
<h2 class="panel__heading">{{ __('common.reporter') }}</h2>
<div class="panel__body"
<x-user_tag :anon="false" :user="$report->reporter" />
</div>
</section>
<section class="panelV2">
<h2 class="panel__heading">Solved by</h2>
<div class="panel__body">
@if ($report->solved)
<x-user_tag :anon="false" :user="$report->staff" />
@else
<span class="text-red">
<i class="{{ config('other.font-awesome') }} fa-times"></i>
UNSOLVED
</span>
@endif
</div>
</section>
@endsection
@@ -16,25 +16,50 @@
</li>
@endsection
@section('content')
<div class="container box">
<h2>Add A Torrent Resolution</h2>
<form role="form" method="POST" action="{{ route('staff.resolutions.store') }}">
@csrf
<div class="form-group">
<label for="name">{{ __('common.name') }}</label>
<label>
<input type="text" class="form-control" name="name">
</label>
</div>
<div class="form-group">
<label for="name">{{ __('common.position') }}</label>
<label>
<input type="text" class="form-control" name="position">
</label>
</div>
@section('page', 'page__resolution--create')
<button type="submit" class="btn btn-default">{{ __('common.add') }}</button>
</form>
</div>
@section('main')
<section class="panelV2">
<h2 class="panel__heading">Add A Torrent Resolution</h2>
<div class="panel__body">
<form
class="form"
method="POST"
action="{{ route('staff.resolutions.store') }}"
>
@csrf
<p class="form__group">
<input
id="name"
class="form__text"
name="name"
required
type="text"
>
<label class="form__label form__label--floating" for="name">
{{ __('common.name') }}
</label>
</p>
<p class="form__group">
<input
id="position"
class="form__text"
inputmode="numeric"
name="position"
pattern="[0-9]*"
type="text"
required
>
<label class="form__label form__label--floating" for="name">
{{ __('common.position') }}
</label>
</p>
<p class="form__group">
<button class="form__button form__button--filled">
{{ __('common.add') }}
</button>
</p>
</form>
</div>
</section>
@endsection
+52 -21
View File
@@ -11,32 +11,63 @@
{{ __('staff.torrent-resolutions') }}
</a>
</li>
<li class="breadcrumbV2">
{{ $resolution->name }}
</li>
<li class="breadcrumb--active">
{{ __('common.edit') }}
</li>
@endsection
@section('content')
<div class="container box">
<h2>{{ __('common.edit') }} A Torrent Resolution</h2>
<form role="form" method="POST" action="{{ route('staff.resolutions.update', ['id' => $resolution->id]) }}">
@method('PATCH')
@csrf
<div class="form-group">
<label for="name">{{ __('common.name') }}</label>
<label>
<input type="text" class="form-control" name="name" value="{{ $resolution->name }}">
</label>
</div>
@section('page', 'page__resolution--edit')
<div class="form-group">
<label for="name">{{ __('common.position') }}</label>
<label>
<input type="text" class="form-control" name="position" value="{{ $resolution->position }}">
</label>
</div>
<button type="submit" class="btn btn-default">{{ __('common.submit') }}</button>
</form>
@section('main')
<section class="panelV2">
<h2 class="panel__heading">
{{ __('common.edit') }} Torrent Resolution: {{ $resolution->name }}
</h2>
<div class="panel__body">
<form
class="form"
method="POST"
action="{{ route('staff.resolutions.update', ['id' => $resolution->id]) }}"
>
@method('PATCH')
@csrf
<p class="form__group">
<input
id="name"
class="form__text"
name="name"
required
type="text"
value="{{ $resolution->name }}"
>
<label class="form__label form__label--floating" for="name">
{{ __('common.name') }}
</label>
</p>
<p class="form__group">
<input
id="position"
class="form__text"
inputmode="numeric"
name="position"
pattern="[0-9]*"
required
type="text"
value="{{ $resolution->position }}"
>
<label class="form__label form__label--floating" for="name">
{{ __('common.position') }}
</label>
</p>
<p class="form__group">
<button class="form__button form__button--filled">
{{ __('common.submit') }}
</button>
</p>
</form>
</div>
</div>
@endsection
@@ -11,13 +11,23 @@
</li>
@endsection
@section('content')
<div class="container box">
<h2>{{ __('common.resolutions') }}</h2>
<a href="{{ route('staff.resolutions.create') }}" class="btn btn-primary">Add A Torrent Resolution</a>
@section('page', 'page__index')
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered table-hover">
@section('main')
<section class="panelV2">
<header class="panel__header">
<h2 class="panel__heading">{{ __('common.resolutions') }}</h2>
<div class="panel__actions">
<a
href="{{ route('staff.resolutions.create') }}"
class="panel__action form__button form__button--text"
>
{{ __('common.add') }}
</a>
</div>
</header>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th>{{ __('common.position') }}</th>
@@ -26,30 +36,60 @@
</tr>
</thead>
<tbody>
@foreach ($resolutions as $resolution)
@forelse ($resolutions as $resolution)
<tr>
<td>
{{ $resolution->position }}
</td>
<td>{{ $resolution->position }}</td>
<td>
<a href="{{ route('staff.resolutions.edit', ['id' => $resolution->id]) }}">
{{ $resolution->name }}
</a>
</td>
<td>
<form action="{{ route('staff.resolutions.destroy', ['id' => $resolution->id]) }}"
method="POST">
@csrf
@method('DELETE')
<a href="{{ route('staff.resolutions.edit', ['id' => $resolution->id]) }}"
class="btn btn-warning">{{ __('common.edit') }}</a>
<button type="submit" class="btn btn-danger">{{ __('common.delete') }}</button>
</form>
<menu class="data-table__actions">
<li class="data-table__action">
<a
href="{{ route('staff.resolutions.edit', ['id' => $resolution->id]) }}"
class="form__button form__button--text"
>
{{ __('common.edit') }}
</a>
</li>
<li class="data-table__action">
<form
action="{{ route('staff.resolutions.destroy', ['id' => $resolution->id]) }}"
method="POST"
x-data
>
@csrf
@method('DELETE')
<button
x-on:click.prevent="Swal.fire({
title: 'Are you sure?',
text: 'Are you sure you want to delete this resolution: {{ $resolution->name }}?',
icon: 'warning',
showConfirmButton: true,
showCancelButton: true,
}).then((result) => {
if (result.isConfirmed) {
$root.submit();
}
})"
class="form__button form__button--text"
>
{{ __('common.delete') }}
</button>
</form>
</li>
</menu>
</td>
</tr>
@endforeach
@empty
<tr>
<td colspan="3">No resolution</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
</section>
@endsection
+384 -190
View File
@@ -20,200 +20,394 @@
</li>
@endsection
@section('content')
<div class="container box">
<h2>{{ __('rss.create-public-feed') }}</h2>
<form role="form" method="POST" action="{{ route('staff.rss.store') }}">
@section('page', 'page__rss-admin--create')
@section('main')
<section class="panelV2">
<h2 class="panel__heading">{{ __('rss.create-public-feed') }}</h2>
<div class="panel__body">
<form
class="form"
method="POST"
action="{{ route('staff.rss.store') }}"
>
@csrf
<div class="form-group">
<label for="name">{{ __('rss.feed') }} {{ __('rss.name') }}</label>
<input type="text" id="name" name="name" class="form-control" required>
<p class="form__group">
<input
id="name"
class="form__text"
type="text"
name="name"
required
>
<label class="form__label form__label--floating" for="name">
{{ __('rss.feed') }} {{ __('rss.name') }}
</label>
</p>
<p class="form__group">
<input
id="position"
class="form__text"
inputmode="numeric"
name="position"
pattern="[0-9]*"
placeholder=""
type="text"
>
<label class="form__label form__label--floating" for="position">
{{ __('rss.feed') }} {{ __('common.position') }}
</label>
</p>
<p class="form__group">
<input
id="search"
class="form__text"
name="search"
placeholder=""
type="text"
>
<label class="form__label form__label--floating" for="search">
{{ __('torrent.torrent') }} {{ __('torrent.name') }}
</label>
</p>
<p class="form__group">
<input
id="description"
type="text"
class="form__text"
name="description"
placeholder=""
>
<label class="form__label form__label--floating" for="description">
{{ __('torrent.torrent') }} {{ __('torrent.description') }}
</label>
</p>
<p class="form__group">
<input
id="uploader"
type="text"
class="form__text"
name="uploader"
placeholder=""
>
<label class="form__label form__label--floating" for="uploader">
{{ __('torrent.torrent') }} {{ __('torrent.uploader') }}
</label>
</p>
<div class="form__group--horizontal">
<p class="form__group">
<input
id="autotmdb"
class="form__text"
inputmode="numeric"
name="tmdb"
pattern="[0-9]*"
placeholder=""
type="text"
>
<label class="form__label form__label--floating" for="tmdb">
TMDB ID
</label>
</p>
<p class="form__group">
<input
id="autoimdb"
class="form__text"
inputmode="numeric"
name="imdb"
pattern="[0-9]*"
placeholder=""
type="text"
>
<label class="form__label form__label--floating" for="imdb">
IMDB ID
</label>
</p>
<p class="form__group">
<input
id="autotvdb"
class="form__text"
inputmode="numeric"
name="tvdb"
pattern="[0-9]*"
placeholder=""
type="text"
>
<label class="form__label form__label--floating" for="tvdb">
TVDB ID
</label>
</p>
<p class="form__group">
<input type="hidden" name="mal" value="0" />
<input
id="automal"
class="form__text"
inputmode="numeric"
name="mal"
pattern="[0-9]*"
placeholder=""
type="text"
>
<label class="form__label form__label--floating" for="mal">
MAL ID
</label>
</p>
</div>
<div class="form-group">
<label for="position">{{ __('rss.feed') }} {{ __('common.position') }}</label>
<input type="number" id="position" name="position" class="form-control">
</div>
<div class="form-group">
<label for="search">{{ __('torrent.torrent') }} {{ __('torrent.name') }}</label>
<input type="text" class="form-control" id="search" name="search"
placeholder="{{ __('torrent.torrent') }} {{ __('torrent.name') }}">
</div>
<div class="form-group">
<label for="description">{{ __('torrent.torrent') }} {{ __('torrent.description') }}</label>
<input type="text" class="form-control" id="description" name="description"
placeholder="{{ __('torrent.torrent') }} {{ __('torrent.description') }}">
</div>
<div class="form-group">
<label for="uploader">{{ __('torrent.torrent') }} {{ __('torrent.uploader') }}</label>
<input type="text" class="form-control" id="uploader" name="uploader"
placeholder="{{ __('torrent.torrent') }} {{ __('torrent.uploader') }}">
</div>
<div class="form-group">
<label for="imdb">ID</label>
<input type="text" class="form-control" id="imdb" name="imdb" placeholder="IMDB #">
<label for="tvdb"></label><input type="text" class="form-control" id="tvdb" name="tvdb"
placeholder="TVDB #">
<label for="tmdb"></label><input type="text" class="form-control" id="tmdb" name="tmdb"
placeholder="TMDB #">
<label for="mal"></label><input type="text" class="form-control" id="mal" name="mal"
placeholder="MAL #">
</div>
<div class="form-group">
<label for="category">{{ __('torrent.category') }}</label>
<div>
@foreach ($categories as $category)
<span class="badge-user">
<label class="inline">
<input type="checkbox" id="{{ $category->name }}" name="categories[]"
value="{{ $category->id }}" class="category">
{{ $category->name }}
</label>
</span>
@endforeach
<div class="form__group--horizontal">
<div class="form__group">
<fieldset class="form__fieldset">
<legend class="form__legend">{{ __('torrent.category') }}</legend>
<div class="form__fieldset-checkbox-container">
@foreach ($categories as $category)
<p class="form__group">
<label class="form__label">
<input
id="{{ $category->name }}"
class="form__checkbox"
name="categories[]"
type="checkbox"
value="{{ $category->id }}"
>
{{ $category->name }}
</label>
</p>
@endforeach
</div>
</fieldset>
</div>
<div class="form__group">
<fieldset class="form__fieldset">
<legend class="form__legend">{{ __('torrent.type') }}</legend>
<div class="form__fieldset-checkbox-container">
@foreach ($types as $type)
<p class="form__group">
<label class="form__label">
<input
id="{{ $type->name }}"
class="form__checkbox"
name="types[]"
type="checkbox"
value="{{ $type->id }}"
>
{{ $type->name }}
</label>
</p>
@endforeach
</div>
</fieldset>
</div>
<div class="form__group">
<fieldset class="form__fieldset">
<legend class="form__legend">{{ __('torrent.resolution') }}</legend>
<div class="form__fieldset-checkbox-container">
@foreach ($resolutions as $resolution)
<p class="form__group">
<label class="form__label">
<input
id="{{ $resolution->name }}"
class="form__checkbox"
name="resolutions[]"
type="checkbox"
value="{{ $resolution->id }}"
>
{{ $resolution->name }}
</label>
</p>
@endforeach
</div>
</fieldset>
</div>
<div class="form__group">
<fieldset class="form__fieldset">
<legend class="form__legend">{{ __('torrent.genre') }}</legend>
<div class="form__fieldset-checkbox-container">
@foreach ($genres as $genre)
<p class="form__group">
<label class="form__label">
<input
id="{{ $genre->name }}"
class="form__checkbox"
name="genres[]"
type="checkbox"
value="{{ $genre->id }}"
>
{{ $genre->name }}
</label>
</p>
@endforeach
</div>
</fieldset>
</div>
<div class="form__group">
<fieldset class="form__fieldset">
<legend class="form__legend">{{ __('torrent.discounts') }}</legend>
<div class="form__fieldset-checkbox-container">
<p class="form__group">
<label class="form__label">
<input
id="freeleech"
class="form__checkbox"
name="freeleech"
type="checkbox"
value="1"
>
<span class="{{ config('other.font-awesome') }} fa-star text-gold"></span>
{{ __('torrent.freeleech') }}
</label>
</p>
<p class="form__group">
<label class="form__label">
<input
id="doubleupload"
class="form__checkbox"
name="doubleupload"
type="checkbox"
value="1"
>
<span class="{{ config('other.font-awesome') }} fa-gem text-green"></span>
{{ __('torrent.double-upload') }}
</label>
</p>
<p class="form__group">
<label class="form__label">
<input
id="featured"
class="form__checkbox"
name="featured"
type="checkbox"
value="1"
>
<span class="{{ config('other.font-awesome') }} fa-certificate text-pink"></span>
{{ __('torrent.featured') }}
</label>
</p>
</div>
</fieldset>
</div>
<div class="form__group">
<fieldset class="form__fieldset">
<legend class="form__legend">{{ __('torrent.special') }}</legend>
<div class="form__fieldset-checkbox-container">
<p class="form__group">
<label class="form__label">
<input
id="stream"
class="form__checkbox"
name="stream"
type="checkbox"
value="1"
>
<span class="{{ config('other.font-awesome') }} fa-play text-red"></span>
{{ __('torrent.stream-optimized') }}
</label>
</p>
<p class="form__group">
<label class="form__label">
<input
id="highspeed"
class="form__checkbox"
name="highspeed"
type="checkbox"
value="1"
>
<span class="{{ config('other.font-awesome') }} fa-tachometer text-red"></span>
{{ __('common.high-speeds') }}
</label>
</p>
<p class="form__group">
<label class="form__label">
<input
id="sd"
class="form__checkbox"
name="sd"
type="checkbox"
value="1"
>
<span class="{{ config('other.font-awesome') }} fa-ticket text-orange"></span>
{{ __('torrent.sd-content') }}
</label>
</p>
<p class="form__group">
<label class="form__label">
<input
id="internal"
class="form__checkbox"
name="internal"
type="checkbox"
value="1"
>
<span class="{{ config('other.font-awesome') }} fa-magic" style="color: #baaf92;"></span>
{{ __('torrent.internal') }}
</label>
</p>
<p class="form__group">
<label class="form__label">
<input
id="bookmark"
class="form__checkbox"
name="bookmark"
type="checkbox"
value="1"
>
<span class="{{ config('other.font-awesome') }} fa-bookmark text-blue"></span>
{{ __('torrent.bookmark') }}
</label>
</p>
</div>
</fieldset>
</div>
<div class="form__group">
<fieldset class="form__fieldset">
<legend class="form__legend">{{ __('torrent.health') }}</legend>
<div class="form__fieldset-checkbox-container">
<p class="form__group">
<label class="form__label">
<input
id="alive"
class="form__checkbox"
name="alive"
type="checkbox"
value="1"
>
<span class="{{ config('other.font-awesome') }} fa-smile text-green"></span>
{{ __('torrent.alive') }}
</label>
</p>
<p class="form__group">
<label class="form__label">
<input
id="dying"
class="form__checkbox"
name="dying"
type="checkbox"
value="1"
>
<span class="{{ config('other.font-awesome') }} fa-meh text-orange"></span>
{{ __('torrent.dying-torrent') }}
</label>
</p>
<p class="form__group">
<label class="form__label">
<input
id="dead"
class="form__checkbox"
name="dead"
type="checkbox"
value="0"
>
<span class="{{ config('other.font-awesome') }} fa-frown text-red"></span>
{{ __('torrent.dead-torrent') }}
</label>
</p>
</div>
</fieldset>
</div>
</div>
<div class="form-group">
<label for="type">{{ __('torrent.type') }}</label>
<div>
@foreach ($types as $type)
<span class="badge-user">
<label class="inline">
<input type="checkbox" id="{{ $type->name }}" name="types[]" value="{{ $type->id }}"
class="type">
{{ $type->name }}
</label>
</span>
@endforeach
</div>
</div>
<div class="form-group">
<label for="resolution">{{ __('torrent.resolution') }}</label>
<div>
@foreach ($resolutions as $resolution)
<span class="badge-user">
<label class="inline">
<input type="checkbox" id="{{ $resolution->name }}" value="{{ $resolution->id }}"
class="resolution" name="resolutions[]">
{{ $resolution->name }}
</label>
</span>
@endforeach
</div>
</div>
<div class="form-group">
<label for="genre">{{ __('torrent.genre') }}</label>
<div>
@foreach ($genres as $genre)
<span class="badge-user">
<label class="inline">
<input type="checkbox" id="{{ $genre->name }}" name="genres[]" value="{{ $genre->id }}"
class="genre">
{{ $genre->name }}
</label>
</span>
@endforeach
</div>
</div>
<div class="form-group">
<label for="type">{{ __('torrent.discounts') }}</label>
<div>
<span class="badge-user">
<label class="inline">
<input type="checkbox" id="freeleech" name="freeleech" value="1"> <span
class="{{ config('other.font-awesome') }} fa-star text-gold"></span>
{{ __('torrent.freeleech') }}
</label>
</span>
<span class="badge-user">
<label class="inline">
<input type="checkbox" id="doubleupload" name="doubleupload" value="1"> <span
class="{{ config('other.font-awesome') }} fa-gem text-green"></span>
{{ __('torrent.double-upload') }}
</label>
</span>
<span class="badge-user">
<label class="inline">
<input type="checkbox" id="featured" name="featured" value="1"> <span
class="{{ config('other.font-awesome') }} fa-certificate text-pink"></span>
{{ __('torrent.featured') }}
</label>
</span>
</div>
</div>
<div class="form-group">
<label for="type">{{ __('torrent.special') }}</label>
<div>
<span class="badge-user">
<label class="inline">
<input type="checkbox" id="stream" name="stream" value="1"> <span
class="{{ config('other.font-awesome') }} fa-play text-red"></span>
{{ __('torrent.stream-optimized') }}
</label>
</span>
<span class="badge-user">
<label class="inline">
<input type="checkbox" id="highspeed" name="highspeed" value="1"> <span
class="{{ config('other.font-awesome') }} fa-tachometer text-red"></span>
{{ __('common.high-speeds') }}
</label>
</span>
<span class="badge-user">
<label class="inline">
<input type="checkbox" id="sd" name="sd" value="1"> <span
class="{{ config('other.font-awesome') }} fa-ticket text-orange"></span>
{{ __('torrent.sd-content') }}
</label>
</span>
<span class="badge-user">
<label class="inline">
<input type="checkbox" id="internal" name="internal" value="1"> <span
class="{{ config('other.font-awesome') }} fa-magic" style="color: #baaf92;"></span>
{{ __('torrent.internal') }}
</label>
</span>
<span class="badge-user">
<label class="inline">
<input type="checkbox" id="bookmark" name="bookmark" value="1"> <span
class="{{ config('other.font-awesome') }} fa-bookmark text-blue"></span>
{{ __('torrent.bookmark') }}
</label>
</span>
</div>
</div>
<div class="form-group">
<label for="type">{{ __('torrent.health') }}</label>
<div>
<span class="badge-user">
<label class="inline">
<input type="checkbox" id="alive" name="alive" value="1"> <span
class="{{ config('other.font-awesome') }} fa-smile text-green"></span>
{{ __('torrent.alive') }}
</label>
</span>
<span class="badge-user">
<label class="inline">
<input type="checkbox" id="dying" name="dying" value="1"> <span
class="{{ config('other.font-awesome') }} fa-meh text-orange"></span>
{{ __('torrent.dying-torrent') }}
</label>
</span>
<span class="badge-user">
<label class="inline">
<input type="checkbox" id="dead" name="dead" value="0"> <span
class="{{ config('other.font-awesome') }} fa-frown text-red"></span>
{{ __('torrent.dead-torrent') }}
</label>
</span>
</div>
</div>
<br>
<div class="text-center">
<button type="submit" class="btn btn-primary">{{ __('common.create') }}</button>
</div>
<p class="form__group">
<button class="form__button form__button--filled">
{{ __('common.create') }}
</button>
</p>
</form>
</div>
@endsection
+408 -282
View File
@@ -20,293 +20,419 @@
</li>
@endsection
@section('content')
<div class="container box">
<h2>{{ __('rss.edit-public-feed') }}</h2>
<form role="form" method="POST" action="{{ route('staff.rss.update', ['id' => $rss->id]) }}">
@section('page', 'page__rss-admin--edit')
@section('main')
<section class="panelV2">
<h2 class="panel__heading">{{ __('rss.edit-public-feed') }}</h2>
<div class="panel__body">
<form
class="form"
method="POST"
action="{{ route('staff.rss.update', ['id' => $rss->id]) }}"
>
@csrf
@method('PATCH')
<div class="form-group">
<label for="name">{{ __('rss.feed') }} {{ __('rss.name') }}</label>
<input type="text" class="form-control" id="name" name="name" value="{{ $rss->name }}">
<p class="form__group">
<input
id="name"
class="form__text"
type="text"
name="name"
required
value="{{ $rss->name }}"
>
<label class="form__label form__label--floating" for="name">
{{ __('rss.feed') }} {{ __('rss.name') }}
</label>
</p>
<p class="form__group">
<input
id="position"
class="form__text"
inputmode="numeric"
name="position"
pattern="[0-9]*"
placeholder=""
type="text"
value="{{ $rss->position }}"
>
<label class="form__label form__label--floating" for="position">
{{ __('rss.feed') }} {{ __('common.position') }}
</label>
</p>
<p class="form__group">
<input
id="search"
class="form__text"
name="search"
placeholder=""
type="text"
value="{{ $rss->object_torrent->search }}"
>
<label class="form__label form__label--floating" for="search">
{{ __('torrent.torrent') }} {{ __('torrent.name') }}
</label>
</p>
<p class="form__group">
<input
id="description"
type="text"
class="form__text"
name="description"
placeholder=""
value="{{ $rss->object_torrent->description }}"
>
<label class="form__label form__label--floating" for="description">
{{ __('torrent.torrent') }} {{ __('torrent.description') }}
</label>
</p>
<p class="form__group">
<input
id="uploader"
type="text"
class="form__text"
name="uploader"
placeholder=""
value="{{ $rss->object_torrent->uploader }}"
>
<label class="form__label form__label--floating" for="uploader">
{{ __('torrent.torrent') }} {{ __('torrent.uploader') }}
</label>
</p>
<div class="form__group--horizontal">
<p class="form__group">
<input
id="autotmdb"
class="form__text"
inputmode="numeric"
name="tmdb"
pattern="[0-9]*"
placeholder=""
type="text"
value="{{ $rss->object_torrent->tmdb }}"
>
<label class="form__label form__label--floating" for="tmdb">
TMDB ID
</label>
</p>
<p class="form__group">
<input
id="autoimdb"
class="form__text"
inputmode="numeric"
name="imdb"
pattern="[0-9]*"
placeholder=""
type="text"
value="{{ $rss->object_torrent->imdb }}"
>
<label class="form__label form__label--floating" for="imdb">
IMDB ID
</label>
</p>
<p class="form__group">
<input
id="autotvdb"
class="form__text"
inputmode="numeric"
name="tvdb"
pattern="[0-9]*"
placeholder=""
type="text"
value="{{ $rss->object_torrent->tvdb }}"
>
<label class="form__label form__label--floating" for="tvdb">
TVDB ID
</label>
</p>
<p class="form__group">
<input type="hidden" name="mal" value="0" />
<input
id="automal"
class="form__text"
inputmode="numeric"
name="mal"
pattern="[0-9]*"
placeholder=""
type="text"
value="{{ $rss->object_torrent->mal }}"
>
<label class="form__label form__label--floating" for="mal">
MAL ID
</label>
</p>
</div>
<div class="form-group">
<label for="name">{{ __('rss.feed') }} {{ __('common.position') }}</label>
<label for="position"></label><input type="number" id="position" name="position"
value="{{ $rss->position }}" class="form-control">
</div>
<div class="form-group">
<label for="search">{{ __('torrent.torrent') }} {{ __('torrent.name') }}</label>
<input type="text" class="form-control" id="search" name="search"
value="{{ $rss->object_torrent->search }}">
</div>
<div class="form-group">
<label for="description">{{ __('torrent.torrent') }} {{ __('torrent.description') }}</label>
<input type="text" class="form-control" id="description" name="description"
value="{{ $rss->object_torrent->description }}">
</div>
<div class="form-group">
<label for="uploader">{{ __('torrent.torrent') }} {{ __('torrent.uploader') }}</label>
<input type="text" class="form-control" id="uploader" name="uploader"
value="{{ $rss->object_torrent->uploader }}">
</div>
<div class="form-group">
<label for="imdb">ID</label>
<input type="text" class="form-control" id="imdb" name="imdb" value="{{ $rss->object_torrent->imdb }}">
<label for="tvdb"></label><input type="text" class="form-control" id="tvdb" name="tvdb"
value="{{ $rss->object_torrent->tvdb }}">
<label for="tmdb"></label><input type="text" class="form-control" id="tmdb" name="tmdb"
value="{{ $rss->object_torrent->tmdb }}">
<label for="mal"></label><input type="text" class="form-control" id="mal" name="mal"
value="{{ $rss->object_torrent->mal }}">
</div>
<div class="form-group">
<label for="category">{{ __('torrent.category') }}</label>
<div>
@foreach ($categories as $category)
<span class="badge-user">
<label class="inline">
@if(is_array($rss->object_torrent->categories) && in_array((string)$category->id, $rss->object_torrent->categories, true))
<input type="checkbox" id="{{ $category->name }}" name="categories[]"
value="{{ $category->id }}"
class="category" CHECKED> {{ $category->name }}
@else
<input type="checkbox" id="{{ $category->name }}" name="categories[]"
value="{{ $category->id }}"
class="category"> {{ $category->name }}
@endif
</label>
</span>
@endforeach
<div class="form__group--horizontal">
<div class="form__group">
<fieldset class="form__fieldset">
<legend class="form__legend">{{ __('torrent.category') }}</legend>
<div class="form__fieldset-checkbox-container">
@foreach ($categories as $category)
<p class="form__group">
<label class="form__label">
<input
id="{{ $category->name }}"
class="form__checkbox"
name="categories[]"
type="checkbox"
value="{{ $category->id }}"
@checked(is_array($rss->object_torrent->categories) && in_array((string)$category->id, $rss->object_torrent->categories, true))
>
{{ $category->name }}
</label>
</p>
@endforeach
</div>
</fieldset>
</div>
<div class="form__group">
<fieldset class="form__fieldset">
<legend class="form__legend">{{ __('torrent.type') }}</legend>
<div class="form__fieldset-checkbox-container">
@foreach ($types as $type)
<p class="form__group">
<label class="form__label">
<input
id="{{ $type->name }}"
class="form__checkbox"
name="types[]"
type="checkbox"
value="{{ $type->id }}"
@checked(is_array($rss->object_torrent->types) && in_array((string)$type->id, $rss->object_torrent->types, true))
>
{{ $type->name }}
</label>
</p>
@endforeach
</div>
</fieldset>
</div>
<div class="form__group">
<fieldset class="form__fieldset">
<legend class="form__legend">{{ __('torrent.resolution') }}</legend>
<div class="form__fieldset-checkbox-container">
@foreach ($resolutions as $resolution)
<p class="form__group">
<label class="form__label">
<input
id="{{ $resolution->name }}"
class="form__checkbox"
name="resolutions[]"
type="checkbox"
value="{{ $resolution->id }}"
@checked(is_array($rss->object_torrent->resolutions) && in_array((string)$resolution->id, $rss->object_torrent->resolutions, true))
>
{{ $resolution->name }}
</label>
</p>
@endforeach
</div>
</fieldset>
</div>
<div class="form__group">
<fieldset class="form__fieldset">
<legend class="form__legend">{{ __('torrent.genre') }}</legend>
<div class="form__fieldset-checkbox-container">
@foreach ($genres as $genre)
<p class="form__group">
<label class="form__label">
<input
id="{{ $genre->name }}"
class="form__checkbox"
name="genres[]"
type="checkbox"
value="{{ $genre->id }}"
@checked(is_array($rss->object_torrent->genres) && in_array($genre->id, $rss->object_torrent->genres, true))
>
{{ $genre->name }}
</label>
</p>
@endforeach
</div>
</fieldset>
</div>
<div class="form__group">
<fieldset class="form__fieldset">
<legend class="form__legend">{{ __('torrent.discounts') }}</legend>
<div class="form__fieldset-checkbox-container">
<p class="form__group">
<label class="form__label">
<input
id="freeleech"
class="form__checkbox"
name="freeleech"
type="checkbox"
value="1"
@checked($rss->object_torrent->freeleech)
>
<span class="{{ config('other.font-awesome') }} fa-star text-gold"></span>
{{ __('torrent.freeleech') }}
</label>
</p>
<p class="form__group">
<label class="form__label">
<input
id="doubleupload"
class="form__checkbox"
name="doubleupload"
type="checkbox"
value="1"
@checked($rss->object_torrent->doubleupload)
>
<span class="{{ config('other.font-awesome') }} fa-gem text-green"></span>
{{ __('torrent.double-upload') }}
</label>
</p>
<p class="form__group">
<label class="form__label">
<input
id="featured"
class="form__checkbox"
name="featured"
type="checkbox"
value="1"
@checked($rss->object_torrent->featured)
>
<span class="{{ config('other.font-awesome') }} fa-certificate text-pink"></span>
{{ __('torrent.featured') }}
</label>
</p>
</div>
</fieldset>
</div>
<div class="form__group">
<fieldset class="form__fieldset">
<legend class="form__legend">{{ __('torrent.special') }}</legend>
<div class="form__fieldset-checkbox-container">
<p class="form__group">
<label class="form__label">
<input
id="stream"
class="form__checkbox"
name="stream"
type="checkbox"
value="1"
@checked($rss->object_torrent->stream)
>
<span class="{{ config('other.font-awesome') }} fa-play text-red"></span>
{{ __('torrent.stream-optimized') }}
</label>
</p>
<p class="form__group">
<label class="form__label">
<input
id="highspeed"
class="form__checkbox"
name="highspeed"
type="checkbox"
value="1"
@checked($rss->object_torrent->highspeed)
>
<span class="{{ config('other.font-awesome') }} fa-tachometer text-red"></span>
{{ __('common.high-speeds') }}
</label>
</p>
<p class="form__group">
<label class="form__label">
<input
id="sd"
class="form__checkbox"
name="sd"
type="checkbox"
value="1"
@checked($rss->object_torrent->sd)
>
<span class="{{ config('other.font-awesome') }} fa-ticket text-orange"></span>
{{ __('torrent.sd-content') }}
</label>
</p>
<p class="form__group">
<label class="form__label">
<input
id="internal"
class="form__checkbox"
name="internal"
type="checkbox"
value="1"
@checked($rss->object_torrent->internal)
>
<span class="{{ config('other.font-awesome') }} fa-magic" style="color: #baaf92;"></span>
{{ __('torrent.internal') }}
</label>
</p>
<p class="form__group">
<label class="form__label">
<input
id="bookmark"
class="form__checkbox"
name="bookmark"
type="checkbox"
value="1"
@checked($rss->object_torrent->bookmark)
>
<span class="{{ config('other.font-awesome') }} fa-bookmark text-blue"></span>
{{ __('torrent.bookmark') }}
</label>
</p>
</div>
</fieldset>
</div>
<div class="form__group">
<fieldset class="form__fieldset">
<legend class="form__legend">{{ __('torrent.health') }}</legend>
<div class="form__fieldset-checkbox-container">
<p class="form__group">
<label class="form__label">
<input
id="alive"
class="form__checkbox"
name="alive"
type="checkbox"
value="1"
@checked($rss->object_torrent->alive)
>
<span class="{{ config('other.font-awesome') }} fa-smile text-green"></span>
{{ __('torrent.alive') }}
</label>
</p>
<p class="form__group">
<label class="form__label">
<input
id="dying"
class="form__checkbox"
name="dying"
type="checkbox"
value="1"
@checked($rss->object_torrent->dying)
>
<span class="{{ config('other.font-awesome') }} fa-meh text-orange"></span>
{{ __('torrent.dying-torrent') }}
</label>
</p>
<p class="form__group">
<label class="form__label">
<input
id="dead"
class="form__checkbox"
name="dead"
type="checkbox"
value="1"
@checked($rss->object_torrent->dead)
>
<span class="{{ config('other.font-awesome') }} fa-frown text-red"></span>
{{ __('torrent.dead-torrent') }}
</label>
</p>
</div>
</fieldset>
</div>
</div>
<div class="form-group">
<label for="type">{{ __('torrent.type') }}</label>
<div>
@foreach ($types as $type)
<span class="badge-user">
<label class="inline">
@if(is_array($rss->object_torrent->types) && in_array((string)$type->id, $rss->object_torrent->types, true))
<input type="checkbox" id="{{ $type->name }}" name="types[]" value="{{ $type->id }}"
class="type"
CHECKED> {{ $type->name }}
@else
<input type="checkbox" id="{{ $type->name }}" name="types[]" value="{{ $type->id }}"
class="type">
{{ $type->name }}
@endif
</label>
</span>
@endforeach
</div>
</div>
<div class="form-group">
<label for="resolution">{{ __('torrent.resolution') }}</label>
<div>
@foreach ($resolutions as $resolution)
<span class="badge-user">
<label class="inline">
@if(is_array($rss->object_torrent->resolutions) && in_array((string)$resolution->id, $rss->object_torrent->resolutions, true))
<input type="checkbox" id="{{ $resolution->name }}" name="resolutions[]"
value="{{ $resolution->id }}" class="resolution" CHECKED>
{{ $resolution->name }}
@else
<input type="checkbox" id="{{ $resolution->name }}" name="resolutions[]"
value="{{ $resolution->id }}" class="resolution">
{{ $resolution->name }}
@endif
</label>
</span>
@endforeach
</div>
</div>
<div class="form-group">
<label for="genre">{{ __('torrent.genre') }}</label>
<div>
@foreach ($genres as $genre)
<span class="badge-user">
<label class="inline">
@if(is_array($rss->object_torrent->genres) && in_array($genre->id, $rss->object_torrent->genres, true))
<input type="checkbox" id="{{ $genre->name }}" name="genres[]"
value="{{ $genre->id }}"
class="genre" CHECKED> {{ $genre->name }}
@else
<input type="checkbox" id="{{ $genre->name }}" name="genres[]"
value="{{ $genre->id }}"
class="genre"> {{ $genre->name }}
@endif
</label>
</span>
@endforeach
</div>
</div>
<div class="form-group">
<label for="type">{{ __('torrent.discounts') }}</label>
<div>
<span class="badge-user">
<label class="inline">
@if($rss->object_torrent->freeleech)
<input type="checkbox" id="freeleech" name="freeleech" value="1" CHECKED><span
class="{{ config('other.font-awesome') }} fa-star text-gold"></span>
{{ __('torrent.freeleech') }}
@else
<input type="checkbox" id="freeleech" name="freeleech" value="1"><span
class="{{ config('other.font-awesome') }} fa-star text-gold"></span>
{{ __('torrent.freeleech') }}
@endif
</label>
</span>
<span class="badge-user">
<label class="inline">
@if($rss->object_torrent->doubleupload)
<input type="checkbox" id="doubleupload" name="doubleupload" value="1" CHECKED><span
class="{{ config('other.font-awesome') }} fa-gem text-green"></span>
{{ __('torrent.double-upload') }}
@else
<input type="checkbox" id="doubleupload" name="doubleupload" value="1"><span
class="{{ config('other.font-awesome') }} fa-gem text-green"></span>
{{ __('torrent.double-upload') }}
@endif
</label>
</span>
<span class="badge-user">
<label class="inline">
@if($rss->object_torrent->featured)
<input type="checkbox" id="featured" name="featured" value="1" CHECKED><span
class="{{ config('other.font-awesome') }} fa-certificate text-pink"></span>
{{ __('torrent.featured') }}
@else
<input type="checkbox" id="featured" name="featured" value="1"><span
class="{{ config('other.font-awesome') }} fa-certificate text-pink"></span>
{{ __('torrent.featured') }}
@endif
</label>
</span>
</div>
</div>
<div class="form-group">
<label for="type">{{ __('torrent.special') }}</label>
<div>
<span class="badge-user">
<label class="inline">
@if($rss->object_torrent->stream)
<input type="checkbox" id="stream" name="stream" value="1" CHECKED><span
class="{{ config('other.font-awesome') }} fa-play text-red"></span>
{{ __('torrent.stream-optimized') }}
@else
<input type="checkbox" id="stream" name="stream" value="1"><span
class="{{ config('other.font-awesome') }} fa-play text-red"></span>
{{ __('torrent.stream-optimized') }}
@endif
</label>
</span>
<span class="badge-user">
<label class="inline">
@if($rss->object_torrent->highspeed)
<input type="checkbox" id="highspeed" name="highspeed" value="1" CHECKED><span
class="{{ config('other.font-awesome') }} fa-tachometer text-red"></span>
{{ __('common.high-speeds') }}
@else
<input type="checkbox" id="highspeed" name="highspeed" value="1"><span
class="{{ config('other.font-awesome') }} fa-tachometer text-red"></span>
{{ __('common.high-speeds') }}
@endif
</label>
</span>
<span class="badge-user">
<label class="inline">
@if($rss->object_torrent->sd)
<input type="checkbox" id="sd" name="sd" value="1" CHECKED><span
class="{{ config('other.font-awesome') }} fa-ticket text-orange"></span>
{{ __('torrent.sd-content') }}
@else
<input type="checkbox" id="sd" name="sd" value="1"><span
class="{{ config('other.font-awesome') }} fa-ticket text-orange"></span>
{{ __('torrent.sd-content') }}
@endif
</label>
</span>
<span class="badge-user">
<label class="inline">
@if($rss->object_torrent->internal)
<input type="checkbox" id="internal" name="internal" value="1" CHECKED><span
class="{{ config('other.font-awesome') }} fa-magic"
style="color: #baaf92;"></span>
{{ __('torrent.internal') }}
@else
<input type="checkbox" id="internal" name="internal" value="1"><span
class="{{ config('other.font-awesome') }} fa-magic"
style="color: #baaf92;"></span>
{{ __('torrent.internal') }}
@endif
</label>
</span>
<span class="badge-user">
<label class="inline">
@if($rss->object_torrent->bookmark)
<input type="checkbox" id="bookmark" name="bookmark" value="1" CHECKED><span
class="{{ config('other.font-awesome') }} fa-bookmark text-blue"></span>
{{ __('torrent.bookmark') }}
@else
<input type="checkbox" id="bookmark" name="bookmark" value="1"><span
class="{{ config('other.font-awesome') }} fa-bookmark text-blue"></span>
{{ __('torrent.bookmark') }}
@endif
</label>
</span>
</div>
</div>
<div class="form-group">
<label for="type">{{ __('torrent.health') }}</label>
<div>
<span class="badge-user">
<label class="inline">
@if($rss->object_torrent->alive)
<input type="checkbox" id="alive" name="alive" value="1" CHECKED><span
class="{{ config('other.font-awesome') }} fa-smile text-green"></span>
{{ __('torrent.alive') }}
@else
<input type="checkbox" id="alive" name="alive" value="1"><span
class="{{ config('other.font-awesome') }} fa-smile text-green"></span>
{{ __('torrent.alive') }}
@endif
</label>
</span>
<span class="badge-user">
<label class="inline">
@if($rss->object_torrent->dying)
<input type="checkbox" id="dying" name="dying" value="1" CHECKED><span
class="{{ config('other.font-awesome') }} fa-meh text-orange"></span>
{{ __('torrent.dying-torrent') }}
@else
<input type="checkbox" id="dying" name="dying" value="1"><span
class="{{ config('other.font-awesome') }} fa-meh text-orange"></span>
{{ __('torrent.dying-torrent') }}
@endif
</label>
</span>
<span class="badge-user">
<label class="inline">
@if($rss->object_torrent->dead)
<input type="checkbox" id="dead" name="dead" value="1" CHECKED><span
class="{{ config('other.font-awesome') }} fa-frown text-red"></span>
{{ __('torrent.dead-torrent') }}
@else
<input type="checkbox" id="dead" name="dead" value="1"><span
class="{{ config('other.font-awesome') }} fa-frown text-red"></span>
{{ __('torrent.dead-torrent') }}
@endif
</label>
</span>
</div>
</div>
<br>
<div class="text-center">
<button type="submit" class="btn btn-primary">{{ __('common.edit') }}</button>
</div>
<p class="form__group">
<button class="form__button form__button--filled">
{{ __('common.edit') }}
</button>
</p>
</form>
</div>
@endsection
+142 -77
View File
@@ -11,83 +11,148 @@
</li>
@endsection
@section('content')
<div class="container box">
<div class="block">
<h2>{{ __('rss.public') }} {{ __('rss.rss-feed') }}</h2>
<a href="{{ route('staff.rss.create') }}"
class="btn btn-primary">{{ __('common.create') }} {{ __('rss.rss-feed') }}</a>
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered table-hover">
<thead>
<tr>
<th>{{ __('common.name') }}</th>
<th>{{ __('common.position') }}</th>
<th>{{ __('common.categories') }}</th>
<th>{{ __('common.types') }}</th>
<th>{{ __('common.resolutions') }}</th>
<th>{{ __('common.genres') }}</th>
<th>{{ __('torrent.discounts') }}</th>
<th>{{ __('common.special') }}</th>
<th>{{ __('torrent.health') }}</th>
<th>{{ __('common.action') }}</th>
</tr>
</thead>
<tbody>
@foreach($public_rss as $rss)
<tr>
<td>
<a href="{{ route('rss.show.rsskey', ['id' => $rss->id, 'rsskey' => auth()->user()->rsskey]) }}"
target="_blank">{{ $rss->name }}</a></td>
<td>{{ $rss->position }}</td>
@if($rss->object_torrent)
<td>@if ($rss->object_torrent->categories)<i
class="{{ config('other.font-awesome') }} fa-check text-green"></i>@else<i
class="{{ config('other.font-awesome') }} fa-times text-red"></i>@endif</td>
<td>@if ($rss->object_torrent->types)<i
class="{{ config('other.font-awesome') }} fa-check text-green"></i>@else<i
class="{{ config('other.font-awesome') }} fa-times text-red"></i>@endif</td>
<td>@if ($rss->object_torrent->resolutions)<i
class="{{ config('other.font-awesome') }} fa-check text-green"></i>@else<i
class="{{ config('other.font-awesome') }} fa-times text-red"></i>@endif</td>
<td>@if ($rss->object_torrent->genres)<i
class="{{ config('other.font-awesome') }} fa-check text-green"></i>@else<i
class="{{ config('other.font-awesome') }} fa-times text-red"></i>@endif</td>
<td>@if ($rss->object_torrent->freeleech || $rss->object_torrent->doubleupload ||
$rss->object_torrent->featured)<i
class="{{ config('other.font-awesome') }} fa-check text-green"></i>@else<i
class="{{ config('other.font-awesome') }} fa-times text-red"></i>@endif</td>
<td>@if ($rss->object_torrent->stream || $rss->object_torrent->highspeed ||
$rss->object_torrent->sd || $rss->object_torrent->internal ||
$rss->object_torrent->bookmark)<i
class="{{ config('other.font-awesome') }} fa-check text-green"></i>@else<i
class="{{ config('other.font-awesome') }} fa-times text-red"></i>@endif</td>
<td>@if ($rss->object_torrent->alive || $rss->object_torrent->dying ||
$rss->object_torrent->dead)<i
class="{{ config('other.font-awesome') }} fa-check text-green"></i>@else<i
class="{{ config('other.font-awesome') }} fa-times text-red"></i>@endif</td>
@else
<td><i class="{{ config('other.font-awesome') }} fa-times text-red"></i></td>
<td><i class="{{ config('other.font-awesome') }} fa-times text-red"></i></td>
<td><i class="{{ config('other.font-awesome') }} fa-times text-red"></i></td>
<td><i class="{{ config('other.font-awesome') }} fa-times text-red"></i></td>
<td><i class="{{ config('other.font-awesome') }} fa-times text-red"></i></td>
<td><i class="{{ config('other.font-awesome') }} fa-times text-red"></i></td>
@endif
<td>
<form action="{{ route('staff.rss.destroy', ['id' => $rss->id]) }}" method="POST">
@csrf
@method('DELETE')
<a href="{{ route('staff.rss.edit', ['id' => $rss->id]) }}"
class="btn btn-warning">{{ __('common.edit') }}</a>
<button type="submit" class="btn btn-danger">{{ __('common.delete') }}</button>
</form>
</td>
</tr>
@endforeach
</tbody>
</table>
@section('page', 'page__rss-admin--index')
@section('main')
<section class="panelV2">
<header class="panel__header">
<h2 class="panel__heading">{{ __('rss.public') }} {{ __('rss.rss-feed') }}</h2>
<div class="panel__actions">
<a
href="{{ route('staff.rss.create') }}"
class="form__button form__button--text"
>
{{ __('common.add') }}
</a>
</div>
</header>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th>{{ __('common.name') }}</th>
<th>{{ __('common.position') }}</th>
<th>{{ __('common.categories') }}</th>
<th>{{ __('common.types') }}</th>
<th>{{ __('common.resolutions') }}</th>
<th>{{ __('common.genres') }}</th>
<th>{{ __('torrent.discounts') }}</th>
<th>{{ __('common.special') }}</th>
<th>{{ __('torrent.health') }}</th>
<th>{{ __('common.action') }}</th>
</tr>
</thead>
<tbody>
@foreach($public_rss as $rss)
<tr>
<td>
<a
href="{{ route('staff.rss.edit', ['id' => $rss->id]) }}"
>
{{ $rss->name }}
</a>
</td>
<td>{{ $rss->position }}</td>
<td>
@if ($rss->object_torrent?->categories)
<i class="{{ config('other.font-awesome') }} fa-check text-green"></i>
@else
<i class="{{ config('other.font-awesome') }} fa-times text-red"></i>
@endif
</td>
<td>
@if ($rss->object_torrent?->types)
<i class="{{ config('other.font-awesome') }} fa-check text-green"></i>
@else
<i class="{{ config('other.font-awesome') }} fa-times text-red"></i>
@endif
</td>
<td>
@if ($rss->object_torrent?->resolutions)
<i class="{{ config('other.font-awesome') }} fa-check text-green"></i>
@else
<i class="{{ config('other.font-awesome') }} fa-times text-red"></i>
@endif
</td>
<td>
@if ($rss->object_torrent?->genres)
<i class="{{ config('other.font-awesome') }} fa-check text-green"></i>
@else
<i class="{{ config('other.font-awesome') }} fa-times text-red"></i>
@endif
</td>
<td>
@if ($rss->object_torrent?->freeleech || $rss->object_torrent?->doubleupload || $rss->object_torrent?->featured)
<i class="{{ config('other.font-awesome') }} fa-check text-green"></i>
@else
<i class="{{ config('other.font-awesome') }} fa-times text-red"></i>
@endif
</td>
<td>
@if ($rss->object_torrent?->stream || $rss->object_torrent?->highspeed || $rss->object_torrent?->sd || $rss->object_torrent?->internal || $rss->object_torrent?->bookmark)
<i class="{{ config('other.font-awesome') }} fa-check text-green"></i>
@else
<i class="{{ config('other.font-awesome') }} fa-times text-red"></i>
@endif
</td>
<td>
@if ($rss->object_torrent->alive || $rss->object_torrent->dying || $rss->object_torrent->dead)
<i class="{{ config('other.font-awesome') }} fa-check text-green"></i>
@else
<i class="{{ config('other.font-awesome') }} fa-times text-red"></i>
@endif
</td>
<td>
<menu class="data-table__actions">
<li class="data-table__action">
<a
class="form__button form__button--text"
href="{{ route('rss.show.rsskey', ['id' => $rss->id, 'rsskey' => auth()->user()->rsskey]) }}"
target="_blank"
>
{{ __('common.view') }}
</a>
</li>
<li class="data-table__action">
<a
href="{{ route('staff.rss.edit', ['id' => $rss->id]) }}"
class="form__button form__button--text"
>
{{ __('common.edit') }}
</a>
</li>
<li class="data-table__action">
<form
action="{{ route('staff.rss.destroy', ['id' => $rss->id]) }}"
method="POST"
x-data
>
@csrf
@method('DELETE')
<button
x-on:click.prevent="Swal.fire({
title: 'Are you sure?',
text: 'Are you sure you want to delete this public RSS feed: {{ $rss->name }}?',
icon: 'warning',
showConfirmButton: true,
showCancelButton: true,
}).then((result) => {
if (result.isConfirmed) {
$root.submit();
}
})"
class="form__button form__button--text"
>
{{ __('common.delete') }}
</button>
</form>
</li>
</menu>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</section>
@endsection
+65 -47
View File
@@ -19,56 +19,74 @@
</li>
@endsection
@section('content')
<div class="container-fluid">
<div class="block">
<h2>{{ __('staff.seedboxes') }}</h2>
<hr>
<p class="text-red"><strong><i class="{{ config('other.font-awesome') }} fa-list"></i>
{{ __('staff.seedboxes') }}</strong></p>
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered">
<thead>
@section('page', 'page__seedbox--index')
@section('main')
<section class="panelV2">
<h2 class="panel__heading">{{ __('staff.seedboxes') }}</h2>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th>{{ __('common.no') }}</th>
<th>{{ __('common.user') }}</th>
<th>{{ __('common.ip') }}</th>
<th>{{ __('user.created-on') }}</th>
<th>{{ __('common.action') }}</th>
</tr>
</thead>
<tbody>
@forelse ($seedboxes as $seedbox)
<tr>
<th>{{ __('common.no') }}</th>
<th>{{ __('common.user') }}</th>
<th>{{ __('common.ip') }}</th>
<th>{{ __('user.created-on') }}</th>
<th>{{ __('common.action') }}</th>
</tr>
</thead>
<tbody>
@if ($seedboxes->count())
@foreach ($seedboxes as $key => $seedbox)
<tr>
<td>{{ ++$key }}</td>
<td><a href="{{ route('users.show', ['username' => $seedbox->user->username]) }}">
{{ $seedbox->user->username }}
</a>
</td>
<td class="text-success">{{ $seedbox->ip }}</td>
<td>
{{ $seedbox->created_at->toDayDateTimeString() }}
({{ $seedbox->created_at->diffForHumans() }})
</td>
<td>
<form action="{{ route('staff.seedboxes.destroy', ['id' => $seedbox->id]) }}"
method="POST">
<td>{{ $loop->iteration }}</td>
<td>
<x-user_tag :anon="false" :user="$seedbox->user" />
</td>
<td>{{ $seedbox->ip }}</td>
<td>
<time datetime="{{ $seedbox->created_at }}" title="{{ $seedbox->created_at }}">
{{ $seedbox->created_at->diffForHumans() }}
</time>
</td>
<td>
<menu class="data-table__actions">
<li class="data-table__action">
<form
action="{{ route('staff.seedboxes.destroy', ['id' => $seedbox->id]) }}"
method="POST"
x-data
>
@csrf
@method('DELETE')
<button type="submit" class="btn btn-xs btn-danger"><i
class="{{ config('other.font-awesome') }} fa-trash"></i></button>
<button
x-on:click.prevent="Swal.fire({
title: 'Are you sure?',
text: 'Are you sure you want to delete this seedbox: {{ $seedbox->ip }} (owned by {{ $seedbox->user->username }})?',
icon: 'warning',
showConfirmButton: true,
showCancelButton: true,
}).then((result) => {
if (result.isConfirmed) {
$root.submit();
}
})"
class="form__button form__button--text"
>
{{ __('common.delete') }}
</button>
</form>
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
<div class="text-center">
{{ $seedboxes->links() }}
</div>
</div>
</li>
</menu>
</td>
</tr>
@empty
<tr>
<td colspan="5">No seedboxes</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
{{ $seedboxes->links('partials.pagination') }}
</section>
@endsection
+46 -21
View File
@@ -16,30 +16,55 @@
</li>
@endsection
@section('content')
<div class="container box">
<h2>
@section('page', 'page__type--create')
@section('main')
<section class="panelV2">
<h2 class="panel__heading">
{{ __('common.add') }}
{{ trans_choice('common.a-an-art',false) }}
{{ __('torrent.torrent') }}
{{ __('common.type') }}
</h2>
<form role="form" method="POST" action="{{ route('staff.types.store') }}">
@csrf
<div class="form-group">
<label for="name">{{ __('common.name') }}</label>
<label>
<input type="text" class="form-control" name="name">
</label>
</div>
<div class="form-group">
<label for="name">{{ __('common.position') }}</label>
<label>
<input type="text" class="form-control" name="position">
</label>
</div>
<button type="submit" class="btn btn-default">{{ __('common.add') }}</button>
</form>
</div>
<div class="panel__body">
<form
class="form"
method="POST"
action="{{ route('staff.types.store') }}"
>
@csrf
<p class="form__group">
<input
id="name"
class="form__text"
name="name"
required
type="text"
>
<label class="form__label form__label--floating" for="name">
{{ __('common.name') }}
</label>
</p>
<p class="form__group">
<input
id="position"
class="form__text"
inputmode="numeric"
name="position"
pattern="[0-9]*"
required
type="text"
>
<label class="form__label form__label--floating" for="name">
{{ __('common.position') }}
</label>
</p>
<p class="form__group">
<button class="form__button form__button--filled">
{{ __('common.add') }}
</button>
</p>
</form>
</div>
</section>
@endsection
+47 -19
View File
@@ -11,37 +11,65 @@
{{ __('staff.torrent-types') }}
</a>
</li>
<li class="breadcrumbV2">
{{ $type->name }}
</li>
<li class="breadcrumb--active">
{{ __('common.edit') }}
</li>
@endsection
@section('content')
<div class="container box">
<h2>
@section('page', 'page__type--edit')
@section('main')
<section class="panelV2">
<h2 class="panel__heading">
{{ __('common.edit') }}
{{ trans_choice('common.a-an-art',false) }}
{{ __('torrent.torrent') }}
{{ __('common.type') }}
{{ __('common.type') }}:
{{ $type->name }}
</h2>
<form role="form" method="POST" action="{{ route('staff.types.update', ['id' => $type->id]) }}">
<div class="panel__body">
<form
class="form"
method="POST"
action="{{ route('staff.types.update', ['id' => $type->id]) }}"
>
@method('PATCH')
@csrf
<div class="form-group">
<label for="name">{{ __('common.name') }}</label>
<label>
<input type="text" class="form-control" name="name" value="{{ $type->name }}">
<p class="form__group">
<input
id="name"
class="form__text"
name="name"
required
type="text"
value="{{ $type->name }}"
>
<label class="form__label form__label--floating" for="name">
{{ __('common.name') }}
</label>
</div>
<div class="form-group">
<label for="name">{{ __('common.position') }}</label>
<label>
<input type="text" class="form-control" name="position" value="{{ $type->position }}">
</p>
<p class="form__group">
<input
id="position"
class="form__text"
inputmode="numeric"
name="position"
pattern="[0-9]*"
required
type="text"
value="{{ $type->position }}"
>
<label class="form__label form__label--floating" for="name">
{{ __('common.position') }}
</label>
</div>
<button type="submit" class="btn btn-default">{{ __('common.submit') }}</button>
</p>
<p class="form__group">
<button class="form__button form__button--filled">
{{ __('common.submit') }}
</button>
</p>
</form>
</div>
@endsection
+54 -21
View File
@@ -11,17 +11,23 @@
</li>
@endsection
@section('content')
<div class="container box">
<h2>{{ __('common.types') }}</h2>
<a href="{{ route('staff.types.create') }}" class="btn btn-primary">
{{ __('common.add') }}
{{ trans_choice('common.a-an-art',false) }}
{{ __('common.type') }}
</a>
@section('page', 'page__type--index')
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered table-hover">
@section('main')
<section class="panelV2">
<header class="panel__header">
<h2 class="panel__heading">{{ __('common.types') }}</h2>
<div class="panel__actions">
<a
href="{{ route('staff.types.create') }}"
class="panel__action form__button form__button--text"
>
{{ __('common.add') }}
</a>
</div>
</header>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th>{{ __('common.position') }}</th>
@@ -32,27 +38,54 @@
<tbody>
@foreach ($types as $type)
<tr>
<td>
{{ $type->position }}
</td>
<td>{{ $type->position }}</td>
<td>
<a href="{{ route('staff.types.edit', ['id' => $type->id]) }}">
{{ $type->name }}
</a>
</td>
<td>
<form action="{{ route('staff.types.destroy', ['id' => $type->id]) }}" method="POST">
@csrf
@method('DELETE')
<a href="{{ route('staff.types.edit', ['id' => $type->id]) }}"
class="btn btn-warning">{{ __('common.edit') }}</a>
<button type="submit" class="btn btn-danger">{{ __('common.delete') }}</button>
</form>
<menu class="data-table__actions">
<li class="data-table__action">
<a
href="{{ route('staff.types.edit', ['id' => $type->id]) }}"
class="form__button form__button--text"
>
{{ __('common.edit') }}
</a>
</li>
<li class="data-table__action">
<form
action="{{ route('staff.types.destroy', ['id' => $type->id]) }}"
method="POST"
x-data
>
@csrf
@method('DELETE')
<button
x-on:click.prevent="Swal.fire({
title: 'Are you sure?',
text: 'Are you sure you want to delete this type: {{ $type->name }}?',
icon: 'warning',
showConfirmButton: true,
showCancelButton: true,
}).then((result) => {
if (result.isConfirmed) {
$root.submit();
}
})"
class="form__button form__button--text"
>
{{ __('common.delete') }}
</button>
</form>
</li>
</menu>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</section>
@endsection
+356 -262
View File
@@ -20,281 +20,375 @@
{{ __('common.users') }}
</a>
</li>
<li class="breadcrumbV2">
<a href="{{ route('users.show', ['username' => $user->username]) }}" class="breadcrumb__link">
{{ $user->username }}
</a>
</li>
<li class="breadcrumb--active">
{{ __('common.edit') }}
</li>
@endsection
@section('content')
<div class="container">
<h1 class="title">
<i class="{{ config('other.font-awesome') }} fa-gear"></i>
{{ __('common.edit') }} {{ __('common.user') }}
<a href="{{ route('users.show', ['username' => $user->username]) }}">{{ $user->username }}</a>
</h1>
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#account" aria-controls="account" role="tab"
data-toggle="tab"
aria-expanded="true">{{ __('common.account') }}</a></li>
<li role="presentation" class=""><a href="#permissions" aria-controls="permissions" role="tab"
data-toggle="tab"
aria-expanded="false">{{ __('user.id-permissions') }}</a></li>
<li role="presentation" class=""><a href="#notes" aria-controls="notes" role="tab" data-toggle="tab"
aria-expanded="false">{{ __('staff.user-notes') }}</a></li>
<li role="presentation" class=""><a href="#password" aria-controls="notes" role="tab" data-toggle="tab"
aria-expanded="false">{{ __('user.change-password') }}</a></li>
</ul>
@section('page', 'page__users--edit')
<div class="tab-content block block-titled">
<div role="tabpanel" class="tab-pane active" id="account">
<h3>{{ __('common.account') }}</h3>
<hr>
<form role="form" method="POST" action="{{ route('user_edit', ['username' => $user->username]) }}">
@csrf
<div class="form-group">
<label for="username">{{ __('common.username') }}</label>
<label>
<input name="username" type="text" value="{{ $user->username }}" class="form-control">
</label>
</div>
<div class="form-group">
<label for="email">{{ __('common.email') }}</label>
<label>
<input name="email" type="email" value="{{ $user->email }}" class="form-control">
</label>
</div>
<div class="form-group">
<label for="uploaded">{{ __('user.total-upload') }} (Bytes)</label>
<label>
<input name="uploaded" type="number" value="{{ $user->uploaded }}" class="form-control">
</label>
</div>
<div class="form-group">
<label for="downloaded">{{ __('user.total-download') }} (Bytes)</label>
<label>
<input name="downloaded" type="number" value="{{ $user->downloaded }}" class="form-control">
</label>
</div>
<div class="form-group">
<label for="join-date">{{ __('user.member-since') }}</label>
<label>
<input name="join-date" type="join-date"
value="{{ date('d/m/Y', strtotime($user->created_at)) }}" class="form-control">
</label>
</div>
<div class="form-group">
<label for="downloaded">{{ __('user.title') }}</label>
<label>
<input name="title" type="text" value="{{ $user->title }}" class="form-control">
</label>
</div>
<div class="form-group">
<label for="about">{{ __('user.about-me') }}</label>
<label>
<textarea name="about" cols="30" rows="10"
class="form-control">{{ $user->about }}</textarea>
</label>
</div>
<div class="form-group">
<label for="about">{{ __('common.group') }}</label>
<label>
<select name="group_id" class="form-control">
<option value="{{ $user->group->id }}">{{ $user->group->name }} (Default)</option>
@foreach ($groups as $g)
<option value="{{ $g->id }}">{{ $g->name }}</option>
@section('main')
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(max(320px, 45%), 1fr)); gap: 1rem;">
<div style="display: flex; flex-direction: column; gap: 1rem;">
<section class="panelV2">
<h2 class="panel__heading">{{ __('common.account') }}</h2>
<div class="panel__body">
<form
class="form"
method="POST"
action="{{ route('user_edit', ['username' => $user->username]) }}"
>
@csrf
<p class="form__group">
<input
id="username"
class="form__text"
name="username"
required
type="text"
value="{{ $user->username }}"
>
<label class="form__label form__label--floating" for="username">
{{ __('common.username') }}
</label>
</p>
<p class="form__group">
<input
id="email"
class="form__text"
name="email"
required
type="email"
value="{{ $user->email }}"
>
<label class="form__label form__label--floating" for="email">
{{ __('common.email') }}
</label>
</p>
<p class="form__group">
<input
id="uploaded"
class="form__text"
inputmode="numeric"
name="uploaded"
pattern="[0-9]*"
required
type="text"
value="{{ $user->uploaded }}"
>
<label class="form__label form__label--floating" for="uploaded">
{{ __('user.total-upload') }} (Bytes)
</label>
</p>
<p class="form__group">
<input
id="downloaded"
class="form__text"
inputmode="numeric"
name="downloaded"
pattern="[0-9]*"
required
type="text"
value="{{ $user->downloaded }}"
>
<label class="form__label form__label--floating" for="downloaded">
{{ __('user.total-download') }} (Bytes)
</label>
</p>
<p class="form__group">
<input
id="downloaded"
class="form__text"
name="title"
placeholder=""
value="{{ $user->title }}"
>
<label class="form__label form__label--floating" for="downloaded">
{{ __('user.title') }}
</label>
</p>
@livewire('bbcode-input', ['name' => 'about', 'label' => __('user.about-me'), 'required' => false, 'content' => $user->about])
<p class="form__group">
<select
id="group_id"
class="form__select"
name="group_id"
>
<option class="form__option" value="{{ $user->group->id }}">
{{ $user->group->name }} (Default)
</option>
@foreach ($groups as $group)
<option class="form__option" value="{{ $group->id }}">
{{ $group->name }}
</option>
@endforeach
</select>
</label>
</div>
@if ($user->group->name == "Internal")
<div class="form-group">
<label for="about">Internal Group:</label>
<label>
<select name="internal_id" class="form-control">
<label class="form__label form__label--floating" for="group_id">
{{ __('common.group') }}
</label>
</p>
@if ($user->is_internal)
<p class="form__group">
<select
id="internal_id"
name="internal_id"
class="form__select"
>
@if ($user->internal != null)
<option value="{{ $user->internal->id }}">{{ $user->internal->name }}
(Default)
<option class="form__option" value="{{ $user->internal->id }}">
{{ $user->internal->name }} (Default)
</option>
@endif
<option value="i0">None</option>
@foreach ($internals as $i)
<option value="{{ $i->id }}">{{ $i->name }}</option>
<option class="form__option" value="i0">None</option>
@foreach ($internals as $internal)
<option class="form__option" value="{{ $internal->id }}">
{{ $internal->name }}
</option>
@endforeach
</select>
<label class="form__label form__label--floating" for="internal_id">
Internal Group
</label>
</p>
@endif
<p class="form__group">
<button class="form__button form__button--filled">
{{ __('common.save') }}
</button>
</p>
</form>
</div>
</section>
<section class="panelV2">
<h2 class="panel__heading">{{ __('user.change-password') }}</h2>
<div class="panel__body">
<form
class="form"
method="POST"
action="{{ route('user_password', ['username' => $user->username]) }}"
>
@csrf
<p class="form__group">
<input
id="new_password"
class="form__text"
minlength="6"
name="new_password"
type="password"
autocomplete="new-password"
placeholder=""
>
<label class="form__label form__label--floating" for="new_password">
{{ __('common.password') }}
</label>
</div>
@endif
<button type="submit" class="btn btn-default">{{ __('common.save') }}</button>
</form>
</div>
<div role="tabpanel" class="tab-pane" id="permissions">
<h3>{{ __('user.id-permissions') }}</h3>
<hr>
<form role="form" method="POST"
action="{{ route('user_permissions', ['username' => $user->username]) }}">
@csrf
<label for="hidden" class="control-label">{{ __('user.can-upload') }}?</label>
<div class="radio-inline">
<label><input type="radio" name="can_upload" @if ($user->can_upload == 1) checked @endif
value="1">{{ __('common.yes') }}</label>
</div>
<div class="radio-inline">
<label><input type="radio" name="can_upload" @if ($user->can_upload == 0) checked @endif
value="0">{{ __('common.no') }}</label>
</div>
<br>
<br>
<label for="hidden" class="control-label">{{ __('user.can-download') }}?</label>
<div class="radio-inline">
<label><input type="radio" name="can_download" @if ($user->can_download == 1) checked
@endif value="1">{{ __('common.yes') }}</label>
</div>
<div class="radio-inline">
<label><input type="radio" name="can_download" @if ($user->can_download == 0) checked
@endif value="0">{{ __('common.no') }}</label>
</div>
<br>
<br>
<label for="hidden" class="control-label">{{ __('user.can-comment') }}?</label>
<div class="radio-inline">
<label><input type="radio" name="can_comment" @if ($user->can_comment == 1) checked @endif
value="1">{{ __('common.yes') }}</label>
</div>
<div class="radio-inline">
<label><input type="radio" name="can_comment" @if ($user->can_comment == 0) checked @endif
value="0">{{ __('common.no') }}</label>
</div>
<br>
<br>
<label for="hidden" class="control-label">{{ __('user.can-invite') }}?</label>
<div class="radio-inline">
<label><input type="radio" name="can_invite" @if ($user->can_invite == 1) checked @endif
value="1">{{ __('common.yes') }}</label>
</div>
<div class="radio-inline">
<label><input type="radio" name="can_invite" @if ($user->can_invite == 0) checked @endif
value="0">{{ __('common.no') }}</label>
</div>
<br>
<br>
<label for="hidden" class="control-label">{{ __('user.can-request') }}?</label>
<div class="radio-inline">
<label><input type="radio" name="can_request" @if ($user->can_request == 1) checked @endif
value="1">{{ __('common.yes') }}</label>
</div>
<div class="radio-inline">
<label><input type="radio" name="can_request" @if ($user->can_request == 0) checked @endif
value="0">{{ __('common.no') }}</label>
</div>
<br>
<br>
<label for="hidden" class="control-label">{{ __('user.can-chat') }}?</label>
<div class="radio-inline">
<label><input type="radio" name="can_chat" @if ($user->can_chat == 1) checked
@endif value="1">{{ __('common.yes') }}</label>
</div>
<div class="radio-inline">
<label><input type="radio" name="can_chat" @if ($user->can_chat == 0) checked
@endif value="0">{{ __('common.no') }}</label>
</div>
<br>
<div class="form-group">
<div class="text-center">
<button type="submit" class="btn btn-primary">{{ __('common.save') }}</div>
</div>
</form>
</div>
<div role="tabpanel" class="tab-pane" id="notes">
<h3>{{ __('common.add') }} {{ __('staff.user-notes') }}</h3>
<hr>
<form role="form" method="POST"
action="{{ route('staff.notes.store', ['username' => $user->username]) }}">
@csrf
<div class="form-group">
<label for="message">{{ __('staff.user-notes') }}</label>
<label>
<textarea name="message" class="form-control"></textarea>
</label>
</div>
<br>
<button type="submit" class="btn btn-primary">{{ __('common.save') }}</button>
</form>
<hr>
<h2>{{ __('user.note') }}<span class="text-blue"><strong><i
class="{{ config('other.font-awesome') }} fa-note"></i>
{{ $notes->count() }} </strong></span></h2>
<table class="table table-condensed table-striped table-bordered table-hover">
<thead>
<tr>
<th>{{ __('common.user') }}</th>
<th>{{ __('common.staff') }}</th>
<th>{{ __('user.note') }}</th>
<th>{{ __('user.created-on') }}</th>
<th>{{ __('common.delete') }}</th>
</tr>
</thead>
<tbody>
@if (count($notes) == 0)
<p>The are no notes in database for this user!</p>
@else
@foreach ($notes as $note)
<tr>
<td>
{{ $note->noteduser->username }}
</td>
<td>
{{ $note->staffuser->username }}
</td>
<td>
{{ $note->message }}
</td>
<td>
{{ $note->created_at->toDayDateTimeString() }}
({{ $note->created_at->diffForHumans() }})
</td>
<td>
<form action="{{ route('staff.notes.destroy', ['id' => $note->id]) }}"
method="POST">
@csrf
@method('DELETE')
<button type="submit" class="btn btn-xs btn-danger"><i
class="{{ config('other.font-awesome') }} fa-trash"></i></button>
</form>
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
<div role="tabpanel" class="tab-pane" id="password">
<h3>{{ __('user.change-password') }}</h3>
<hr>
<form role="form" method="POST" action="{{ route('user_password', ['username' => $user->username]) }}">
@csrf
<div class="form-group">
<label for="new_password">{{ __('common.new-adj') }} {{ __('passwords.password') }}</label>
<label>
<input type="password" name="new_password" class="form-control"
placeholder="{{ __('common.new-adj') }} {{ __('common.password') }}">
</label>
</div>
<br>
<button type="submit" class="btn btn-primary">{{ __('common.save') }}</button>
</form>
</div>
</p>
<p class="form__group">
<button
x-data
x-on:click.prevent="Swal.fire({
title: 'Are you sure?',
text: 'Are you sure you want to change this user\'s password?',
icon: 'warning',
showConfirmButton: true,
showCancelButton: true,
}).then((result) => {
if (result.isConfirmed) {
$root.submit();
}
})"
class="form__button form__button--filled"
>
{{ __('common.save') }}
</button>
</p>
</form>
</div>
</section>
</div>
<div style="display: flex; flex-direction: column; gap: 1rem;">
<section class="panelV2">
<h2 class="panel__heading">{{ __('user.id-permissions') }}</h2>
<div class="panel__body">
<form
class="form"
method="POST"
action="{{ route('user_permissions', ['username' => $user->username]) }}"
>
@csrf
<p class="form__group">
<input type="hidden" name="can_upload" value="0">
<input
type="checkbox"
class="form__checkbox"
id="can_upload"
name="can_upload"
value="1"
@checked($user->can_upload)
>
<label for="can_upload">{{ __('user.can-upload') }}?</label>
</p>
<p class="form__group">
<input type="hidden" name="can_download" value="0">
<input
type="checkbox"
class="form__checkbox"
id="can_download"
name="can_download"
value="1"
@checked($user->can_download)
>
<label for="can_download">{{ __('user.can-download') }}?</label>
</p>
<p class="form__group">
<input type="hidden" name="can_comment" value="0">
<input
type="checkbox"
class="form__checkbox"
id="can_comment"
name="can_comment"
value="1"
@checked($user->can_comment)
>
<label for="can_comment">{{ __('user.can-comment') }}?</label>
</p>
<p class="form__group">
<input type="hidden" name="can_invite" value="0">
<input
type="checkbox"
class="form__checkbox"
id="can_invite"
name="can_invite"
value="1"
@checked($user->can_invite)
>
<label for="can_invite">{{ __('user.can-invite') }}?</label>
</p>
<p class="form__group">
<input type="hidden" name="can_request" value="0">
<input
type="checkbox"
class="form__checkbox"
id="can_request"
name="can_request"
value="1"
@checked($user->can_request)
>
<label for="can_request">{{ __('user.can-request') }}?</label>
</p>
<p class="form__group">
<input type="hidden" name="can_chat" value="0">
<input
type="checkbox"
class="form__checkbox"
id="can_chat"
name="can_chat"
value="1"
@checked($user->can_chat)
>
<label for="can_chat">{{ __('user.can-chat') }}?</label>
</p>
<p class="form__group">
<button class="form__button form__button--filled">
{{ __('common.save') }}
</button>
</p>
</form>
</div>
</section>
<section class="panelV2">
<h2 class="panel__heading">{{ __('staff.user-notes') }}</h2>
<div class="panel__body">
<form
class="form"
method="POST"
action="{{ route('staff.notes.store', ['username' => $user->username]) }}"
>
@csrf
<p class="form__group">
<textarea
id="message"
class="form__textarea"
name="message"
placeholder=""
></textarea>
<label class="form__label form__label--floating" for="message">
{{ __('staff.user-notes') }}
</label>
</p>
<p class="form__group">
<button class="form__button form__button--filled">
{{ __('common.save') }}
</button>
</p>
</form>
</div>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th>{{ __('common.staff') }}</th>
<th>{{ __('user.note') }}</th>
<th>{{ __('user.created-on') }}</th>
<th>{{ __('common.action') }}</th>
</tr>
</thead>
<tbody>
@forelse ($notes as $note)
<tr>
<td>
<x-user_tag :anon="false" :user="$note->staffuser" />
</td>
<td>{{ $note->message }}</td>
<td>
<time datetime="{{ $note->created_at }}" title="{{ $note->created_at }}">
{{ $note->created_at->diffForHumans() }}
</time>
</td>
<td>
<menu class="data-table__actions">
<li class="data-table__action">
<form
action="{{ route('staff.notes.destroy', ['id' => $note->id]) }}"
method="POST"
x-data
>
@csrf
@method('DELETE')
<button
x-on:click.prevent="Swal.fire({
title: 'Are you sure?',
text: 'Are you sure you want to delete this note?: {{ $note->message }}',
icon: 'warning',
showConfirmButton: true,
showCancelButton: true,
}).then((result) => {
if (result.isConfirmed) {
$root.submit();
}
})"
class="form__button form__button--text"
>
{{ __('common.delete') }}
</button>
</form>
</li>
</menu>
</td>
</tr>
@empty
<tr>
<td colspan="5">No notes</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</section>
</div>
</div>
@endsection
@endsection
+4 -9
View File
@@ -20,13 +20,8 @@
</li>
@endsection
@section('content')
<style>
td {
vertical-align: middle !important;
}
</style>
<div class="box container">
@livewire('user-search')
</div>
@section('page', 'page__users--index')
@section('main')
@livewire('user-search')
@endsection
+63 -82
View File
@@ -19,86 +19,67 @@
</li>
@endsection
@section('content')
<div class="container">
<div class="block">
<h2>{{ __('staff.warnings-log') }}</h2>
<hr>
<div class="row">
<div class="col-sm-12">
<h2>
<span class="text-blue"> {{ __('common.warnings') }}
<strong><i class="{{ config('other.font-awesome') }} fa-note"></i> {{ $warningcount }} </strong>
</span>
</h2>
<div class="table-responsive">
<table class="table table-condensed table-striped table-bordered table-hover">
<thead>
<tr>
<th>{{ __('common.user') }}</th>
<th>{{ __('user.warned-by') }}</th>
<th>{{ __('torrent.torrent') }}</th>
<th>{{ __('common.reason') }}</th>
<th>{{ __('user.created-on') }}</th>
<th>{{ __('user.expires-on') }}</th>
<th>{{ __('common.active') }}</th>
</tr>
</thead>
<tbody>
@if (count($warnings) == 0)
<p>The are no warnings in the database!</p>
@else
@foreach ($warnings as $warning)
<tr>
<td>
<a class="text-bold"
href="{{ route('users.show', ['username' => $warning->warneduser->username]) }}">
{{ $warning->warneduser->username }}
</a>
</td>
<td>
<a class="text-bold"
href="{{ route('users.show', ['username' => $warning->staffuser->username]) }}">
{{ $warning->staffuser->username }}
</a>
</td>
<td>
@if(isset($warning->torrent))
<a class="text-bold"
href="{{ route('torrent', ['id' => $warning->torrenttitle->id]) }}">
{{ $warning->torrenttitle->name }}
</a>
@else
n/a
@endif
</td>
<td>
{{ $warning->reason }}
</td>
<td>
{{ $warning->created_at }}
</td>
<td>
{{ $warning->expires_on }}
</td>
<td>
@if ($warning->active == 1)
<span class='label label-success'>{{ __('common.yes') }}</span>
@else
<span class='label label-danger'>{{ __('common.expired') }}</span>
@endif
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
</div>
</div>
<div class="text-center">
{{ $warnings->links() }}
</div>
</div>
</div>
@section('page', 'page__warning-log--index')
@section('main')
<section class="panelV2">
<h2 class="panel__heading">{{ __('staff.warnings-log') }} ({{ $warningcount }})</h2>
<table class="table table-condensed table-striped table-bordered table-hover">
<thead>
<tr>
<th>{{ __('common.user') }}</th>
<th>{{ __('user.warned-by') }}</th>
<th>{{ __('torrent.torrent') }}</th>
<th>{{ __('common.reason') }}</th>
<th>{{ __('user.created-on') }}</th>
<th>{{ __('user.expires-on') }}</th>
<th>{{ __('common.active') }}</th>
</tr>
</thead>
<tbody>
@forelse ($warnings as $warning)
<tr>
<td>
<x-user_tag :anon="false" :user="$warning->warneduser" />
</td>
<td>
<x-user_tag :anon="false" :user="$warning->staffuser" />
</td>
<td>
@isset($warning->torrent)
<a href="{{ route('torrent', ['id' => $warning->torrenttitle->id]) }}">
{{ $warning->torrenttitle->name }}
</a>
@else
n/a
@endisset
</td>
<td>{{ $warning->reason }}</td>
<td>
<time datetime="{{ $warning->created_at }}">
{{ $warning->created_at }}
</time>
</td>
<td>
<time datetime="{{ $warning->expires_on }}">
{{ $warning->expires_on }}
</time>
</td>
<td>
@if ($warning->active)
<span class='text-green'>{{ __('common.yes') }}</span>
@else
<span class='text-red'>{{ __('common.expired') }}</span>
@endif
</td>
</tr>
@empty
<tr>
<td colspan="7">No warnings</td>
</tr>
@endforelse
</tbody>
</table>
{{ $warnings->links('partials.pagination') }}
</section>
@endsection
@@ -19,13 +19,8 @@
</li>
@endsection
@section('content')
<style>
td {
vertical-align: middle !important;
}
</style>
<div class="box container">
@livewire('watchlist-search')
</div>
@section('page', 'page__watchlist--index')
@section('main')
@livewire('watchlist-search')
@endsection
@@ -0,0 +1,57 @@
@props([
'style' => '',
'anon' => true,
'appendedIcons' => '',
'user' => (object) [
'username' => __('common.anonymous'),
'id' => null,
'group' => (object) [
'icon' => '',
'color' => 'inherit',
'effect' => 'none',
'name' => '',
],
]
])
@if ($anon)
@if (auth()->user()->id === $user->id || auth()->user()->group->is_modo)
<span
{{ $attributes->class('chip--user fas fa-eye-slash') }}
{{ $attributes->merge(['style' => 'background-image: '.$user->group->effect.';'.$style]) }}
>
(
<a
class="chip--user__link chip--anonymous__link {{ $user->group->icon }}"
href="{{ route('users.show', ['username' => $user->username]) }}"
style="color: {{ $user->group->color }}"
title="{{ $user->group->name }}"
>
{{ $user->username }}
</a>
{{ $appendedIcons }}
)
</span>
@else
<span
{{ $attributes->class('chip--user fas fa-eye-slash') }}
>
({{ __('common.anonymous') }})
</span>
@endif
@else
<span
{{ $attributes->class('chip--user') }}
{{ $attributes->merge(['style' => 'background-image: '.$user->group->effect.';'.$style]) }}
>
<a
class="chip--user__link {{ $user->group->icon }}"
href="{{ route('users.show', ['username' => $user->username]) }}"
style="color: {{ $user->group->color }}"
title="{{ $user->group->name }}"
>
{{ $user->username }}
</a>
{{ $appendedIcons }}
</span>
@endif
+122 -133
View File
@@ -1,145 +1,134 @@
<div class="container">
<div class="block">
<div style="float: left; display: inline-block;">
<span>UNIT3D Backup Manager</span>
</div>
<div style="float: right; display: inline-block;">
<button id="create-backup" class="btn btn-primary btn-xs" style="margin-right: 16px;">
{{ __('backup.create_a_new_backup') }}
</button>
<div class="dropdown" style="display: inline-block; margin-right: 16px;">
<a class="dropdown btn btn-xs btn-success" data-toggle="dropdown" href="#" aria-expanded="true">
<i class="{{ config('other.font-awesome') }} fa-line-columns"></i>
<div>
<section class="panelV2" x-data>
<header class="panel__header">
<h2 class="panel__heading">UNIT3D Backup Manager</h2>
<div class="panel__actions">
<button id="create-backup" class="panel__action form__button form__button--text" x-on:click="backupFun()">
{{ __('backup.create_a_new_backup') }}
</button>
<a class="panel__action form__button form__button--text" id="create-backup-only-db"
wire:click.prevent="">
{{ __('backup.create_a_new_db_backup') }}
</a>
<ul class="dropdown-menu">
<li role="presentation">
<a role="menuitem" class="dropdown-item" href="#" id="create-backup-only-db"
wire:click.prevent="">
{{ __('backup.create_a_new_db_backup') }}
</a>
<a role="menuitem" class="dropdown-item" href="#" id="create-backup-only-files"
wire:click.prevent="">
{{ __('backup.create_a_new_files_backup') }}
</a>
</li>
</ul>
</div>
<button class="btn btn-info btn-xs btn-refresh"
<a class="panel__action form__button form__button--text" id="create-backup-only-files"
wire:click.prevent="">
{{ __('backup.create_a_new_files_backup') }}
</a>
<button
class="form__contained-icon-button form__contained-icon-button--filled"
wire:loading.attr="disabled"
wire:click="updateBackupStatuses"
>
<i class="{{ config('other.font-awesome') }} fa-sync" wire:loading.class="fa-spin"></i>
</button>
>
<i class="{{ config('other.font-awesome') }} fa-sync" wire:loading.class="fa-spin"></i>
</button>
</div>
</header>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th scope="col">Disk</th>
<th scope="col">Healthy</th>
<th scope="col">Amount of backups</th>
<th scope="col">Newest backup</th>
<th scope="col">Used storage</th>
</tr>
</thead>
<tbody>
@foreach($backupStatuses as $backupStatus)
<tr>
<td>{{ $backupStatus['disk'] }}</td>
<td>
@if($backupStatus['healthy'])
<i class="{{ config('other.font-awesome') }} fa-check-circle text-success"></i>
@else
<i class="{{ config('other.font-awesome') }} fa-times-circle text-danger"></i>
@endif
</td>
<td>{{ $backupStatus['amount'] }}</td>
<td>{{ $backupStatus['newest'] }}</td>
<td>{{ $backupStatus['usedStorage'] }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<hr>
<div class="row mt-4">
<div class="col-12">
<div class="shadow-sm mb-4">
<table class="table table-condensed table-striped table-bordered">
<thead>
<tr>
<th scope="col">Disk</th>
<th scope="col">Healthy</th>
<th scope="col">Amount of backups</th>
<th scope="col">Newest backup</th>
<th scope="col">Used storage</th>
</tr>
</thead>
<tbody>
@foreach($backupStatuses as $backupStatus)
<tr>
<td>{{ $backupStatus['disk'] }}</td>
<td>
@if($backupStatus['healthy'])
<i class="{{ config('other.font-awesome') }} fa-check-circle text-success"></i>
@else
<i class="{{ config('other.font-awesome') }} fa-times-circle text-danger"></i>
@endif
</td>
<td>{{ $backupStatus['amount'] }}</td>
<td>{{ $backupStatus['newest'] }}</td>
<td>{{ $backupStatus['usedStorage'] }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="shadow-sm">
<div class="text-center">
{{ __('backup.existing_backups') }}
</div>
<table class="table table-condensed table-striped table-bordered">
<thead>
<tr>
<th scope="col">{{ __('backup.location') }}</th>
<th scope="col">{{ __('backup.date') }}</th>
<th scope="col">{{ __('backup.file_size') }}</th>
<th scope="col">{{ __('backup.actions') }}</th>
</tr>
</thead>
<tbody>
@foreach($files as $file)
<tr>
<td>{{ $file['path'] }}</td>
<td>{{ $file['date'] }}</td>
<td>{{ $file['size'] }}</td>
<td class="text-center">
<a class="btn btn-xs btn-success pr-5" href="#" target="_blank"
wire:click.prevent="downloadFile('{{ $file['path'] }}')">
<i class="{{ config('other.font-awesome') }} fa-download"></i>
</section>
<section class="panelV2">
<h2 class="panel__heading">
{{ __('backup.existing_backups') }}
</h2>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th scope="col">{{ __('backup.location') }}</th>
<th scope="col">{{ __('backup.date') }}</th>
<th scope="col">{{ __('backup.file_size') }}</th>
<th scope="col">{{ __('backup.actions') }}</th>
</tr>
</thead>
<tbody>
@forelse($files as $file)
<tr>
<td>{{ $file['path'] }}</td>
<td>{{ $file['date'] }}</td>
<td>{{ $file['size'] }}</td>
<td>
<menu class="data-table__actions">
<li class="data-table__action"
<a
class="form__button form__button--text"
target="_blank"
wire:click.prevent="downloadFile('{{ $file['path'] }}')"
>
{{ __('common.download') }}
</a>
<a class="btn btn-xs btn-danger" href="#" target="_blank"
wire:click.prevent="showDeleteModal({{ $loop->index }})">
<i class="{{ config('other.font-awesome') }} fa-trash"></i>
</li>
<li class="data-table__action">
<a
class="form__button form__button--text"
href="#"
target="_blank"
wire:click.prevent="showDeleteModal({{ $loop->index }})"
>
{{ __('common.delete') }}
</a>
</td>
</tr>
@endforeach
@if(!count($files))
<tr>
<td class="text-center" colspan="4">
{{ 'No backups present' }}
</td>
</tr>
</li>
</menu>
</td>
</tr>
@empty
<tr>
<td colspan="4">No backups present</td>
</tr>
@endforelse
</tbody>
</table>
</div>
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-body">
<h5 class="modal-title mb-3">Delete backup</h5>
@if($deletingFile)
<span class="text-muted">
Are you sure you want to delete the backup created at {{ $deletingFile['date'] }} ?
</span>
@endif
</tbody>
</table>
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog"
aria-labelledby="exampleModalCenterTitle"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-body">
<h5 class="modal-title mb-3">Delete backup</h5>
@if($deletingFile)
<span class="text-muted">
Are you sure you want to delete the backup created at {{ $deletingFile['date'] }} ?
</span>
@endif
</div>
<div class="modal-footer">
<button type="button" class="btn btn-outline-secondary cancel-button"
data-dismiss="modal">
Cancel
</button>
<button type="button" class="btn btn-danger delete-button" wire:click="deleteFile">
Delete
</button>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-outline-secondary cancel-button" data-dismiss="modal">
Cancel
</button>
<button type="button" class="btn btn-danger delete-button" wire:click="deleteFile">
Delete
</button>
</div>
</div>
</div>
</div>
</div>
</section>
<script nonce="{{ HDVinnie\SecureHeaders\SecureHeaders::nonce('script') }}">
document.addEventListener('livewire:load', function () {
const Toast = Swal.mixin({
@@ -191,6 +180,6 @@
@this.deletingFile
= null
})
})
})
</script>
</div>
</div>
@@ -200,6 +200,9 @@
placeholder=""
x-ref="bbcode"
wire:model.defer="contentBbcode"
@if ($isRequired)
required
@endif
></textarea>
<label class="form__label form__label--floating" for="{{ $name }}">
{{ $label }}
@@ -1,7 +1,12 @@
<div style="display: inline;">
<a wire:click="store({{ $post->id }})" class="text-red" data-toggle="tooltip"
data-original-title="{{ __('forum.dislike-post') }}">
<i class="icon-dislike {{ config('other.font-awesome') }} fa-thumbs-down fa-2x @if(auth()->user()->likes()->where('post_id', '=', $post->id)->where('dislike', '=', 1)->first()) fa-beat @endif"></i>
<span class="count" style="font-size: 20px;">{{ $post->dislikes()->count() }}</span>
</a>
</div>
<button
class="votes__dislike"
wire:click="store({{ $post->id }})"
title="{{ __('forum.dislike-post') }}"
>
@if(auth()->user()->likes()->where('post_id', '=', $post->id)->where('dislike', '=', 1)->first())
<i class="votes__dislike-icon {{ config('other.font-awesome') }} fa-thumbs-down fa-beat"></i>
@else
<i class="votes__dislike-icon {{ config('other.font-awesome') }} fa-thumbs-down"></i>
@endif
<span class="votes__dislike-count">{{ $post->dislikes()->count() }}</span>
</button>
@@ -17,15 +17,14 @@
</li>
@endsection
<div class="container-fluid">
<div class="block">
<h2><i class="{{ config('other.font-awesome') }} fa-list"></i> Laravel Log Viewer</h2>
<hr>
<div class="text-center">
{{ $entries->links() }}
</div>
<div style="display: grid; grid-template-columns: 1fr min-content; gap: 12px; align-items: flex-start">
<table class="table table-condensed table-bordered table-striped">
<div style="display: grid; grid-template-columns: 1fr max-content; gap: 12px; align-items: flex-start">
<section class="panelV2">
<h2 class="panel__heading">
<i class="{{ config('other.font-awesome') }} fa-list"></i>
Laravel Log Viewer
</h2>
<div class="data-table-wrapper">
<table class="data-table">
<thead>
<tr>
<th>Date</th>
@@ -66,7 +65,10 @@
<td>{{ $entry['in'] }}</td>
<td>{{ $entry['line'] }}</td>
<td>
<button class="btn btn-primary" x-on:click.stop="navigator.clipboard.writeText($refs.stacktrace.textContent)">
<button
class="form__button form__button--text"
x-on:click.stop="navigator.clipboard.writeText($refs.stacktrace.textContent)"
>
Copy
</button>
</td>
@@ -85,16 +87,17 @@
</tbody>
@endforelse
</table>
<select multiple wire:model="logs" style="height: 320px; padding: 8px; border-radius: 4px;">
@foreach($files as $file)
<option value="{{ $loop->index }}" style="padding: 6px; border-radius: 4px; cursor: pointer;">
{{ $file->getFilename() }}
</option>
@endforeach
</select>
</div>
<div class="text-center">
{{ $entries->links() }}
</div>
</div>
{{ $entries->links('partials.pagination') }}
</section>
<section class="panelV2">
<h2 class="panel__heading">Entries</h2>
<select multiple wire:model="logs" style="height: 320px; padding: 8px; border-radius: 4px; width: 100%">
@foreach($files as $file)
<option value="{{ $loop->index }}" style="padding: 6px; border-radius: 4px; cursor: pointer;">
{{ $file->getFilename() }}
</option>
@endforeach
</select>
</section>
</div>
+12 -7
View File
@@ -1,7 +1,12 @@
<div style="display: inline;">
<a wire:click="store({{ $post->id }})" class="text-green" data-toggle="tooltip" style="margin-right: 16px;"
data-original-title="{{ __('forum.like-post') }}">
<i class="icon-like {{ config('other.font-awesome') }} fa-thumbs-up fa-2x @if(auth()->user()->likes()->where('post_id', '=', $post->id)->where('like', '=', 1)->first()) fa-beat @endif"></i>
<span class="count" style="font-size: 20px;">{{ $post->likes()->count() }}</span>
</a>
</div>
<button
class="votes__like"
wire:click="store({{ $post->id }})"
title="{{ __('forum.like-post') }}"
>
@if(auth()->user()->likes()->where('post_id', '=', $post->id)->where('like', '=', 1)->first())
<i class="votes__like-icon {{ config('other.font-awesome') }} fa-thumbs-up fa-beat"></i>
@else
<i class="votes__like-icon {{ config('other.font-awesome') }} fa-thumbs-up"></i>
@endif
<span class="votes__like-count">{{ $post->likes()->count() }}</span>
</button>
+83 -98
View File
@@ -1,121 +1,106 @@
<div>
<div class="mb-10 form-inline pull-right">
<div class="form-group">
{{ __('common.quantity') }}
<select wire:model="perPage" class="form-control">
<option>25</option>
<option>50</option>
<option>100</option>
</select>
<section class="panelV2">
<header class="panel__header">
<h2 class="panel__heading">{{ __('common.users') }}</h2>
<div class="panel__actions">
<div class="panel__action">
<div class="form__group">
<select
id="quantity"
class="form__select"
wire:model="perPage"
required
>
<option>25</option>
<option>50</option>
<option>100</option>
</select>
<label class="form__label form__label--floating">
{{ __('common.quantity') }}
</label>
</div>
</div>
<div class="panel__action">
<div class="form__group">
<input
id="search"
class="form__text"
type="text"
wire:model="search"
placeholder=""
/>
<label class="form__label form__label--floating">
{{ __('user.search') }}
</label>
</div>
</div>
</div>
<div class="form-group">
<input type="text" wire:model="search" class="form-control" style="width: 275px;"
placeholder="{{ __('user.search') }}"/>
</div>
</div>
<div class="box-body no-padding">
<table class="table vertical-align table-hover">
</header>
<div class="data-table-wrapper">
<table class="data-table">
<tbody>
<tr>
<th>Avatar</th>
<th>
<div sortable wire:click="sortBy('username')"
:direction="$sortField === 'username' ? $sortDirection : null" role="button">
{{ __('common.username') }}
@include('livewire.includes._sort-icon', ['field' => 'username'])
</div>
<th wire:click="sortBy('username')" role="columnheader button">
{{ __('common.username') }}
@include('livewire.includes._sort-icon', ['field' => 'username'])
</th>
<th>
<div sortable wire:click="sortBy('group_id')"
:direction="$sortField === 'group_id' ? $sortDirection : null" role="button">
{{ __('common.group') }}
@include('livewire.includes._sort-icon', ['field' => 'group_id'])
</div>
<th wire:click="sortBy('group_id')" role="columnheader button">
{{ __('common.group') }}
@include('livewire.includes._sort-icon', ['field' => 'group_id'])
</th>
<th class="hidden-sm hidden-xs">
<div sortable wire:click="sortBy('email')"
:direction="$sortField === 'email' ? $sortDirection : null"
role="button">
{{ __('common.email') }}
@include('livewire.includes._sort-icon', ['field' => 'email'])
</div>
<th wire:click="sortBy('email')" role="columnheader button">
{{ __('common.email') }}
@include('livewire.includes._sort-icon', ['field' => 'email'])
</th>
<th class="hidden-sm hidden-xs">
<div sortable wire:click="sortBy('created_at')"
:direction="$sortField === 'created_at' ? $sortDirection : null"
role="button">
<th wire:click="sortBy('created_at')" role="columnheader button">
{{ __('user.registration-date') }}
@include('livewire.includes._sort-icon', ['field' => 'created_at'])
</div>
@include('livewire.includes._sort-icon', ['field' => 'created_at'])
</th>
<th class="hidden-sm hidden-xs">
<div sortable wire:click="sortBy('last_login')"
:direction="$sortField === 'last_login' ? $sortDirection : null"
role="button">
{{ __('user.last-login') }}
@include('livewire.includes._sort-icon', ['field' => 'last_login'])
</div>
<th wire:click="sortBy('last_login')" role="columnheader button">
{{ __('user.last-login') }}
@include('livewire.includes._sort-icon', ['field' => 'last_login'])
</th>
<th>{{ __('common.action') }}</th>
</tr>
@foreach ($users as $user)
@forelse ($users as $user)
<tr>
<td>
@if ($user->image != null)
<img src="{{ url('files/img/' . $user->image) }}" alt="{{ $user->username }}"
class="img-circle" style="width: 40px; height: 40px;">
@else
<img src="{{ url('img/profile.png') }}" alt="{{ $user->username }}"
class="img-circle" style="width: 40px; height: 40px;">
@endif
<img
src="{{ url($user->image === null ? 'img/profile.png' : 'files/img/' . $user->image) }}"
alt="{{ $user->username }}"
class="user-search__avatar"
>
</td>
<td colspan="2">
<x-user_tag :anon="false" :user="$user" />
</td>
<td>{{ $user->email }}</td>
<td>
<time datetime="{{ $user->created_at }}">{{ $user->created_at }}</time>
</td>
<td>
<span class="badge-user text-bold">
{{ $user->username }}
</span>
<time datetime="{{ $user->last_login }}">{{ $user->last_login ?? 'Never' }}</time>
</td>
<td>
<span class="badge-user text-bold"
style="color:{{ $user->group->color }}; background-image:{{ $user->group->effect }};">
<i class="{{ $user->group->icon }}"></i>
{{ $user->group->name }}
</span>
</td>
<td class="hidden-sm hidden-xs">{{ $user->email }}</td>
<td class="hidden-sm hidden-xs">{{ $user->created_at }}</td>
<td class="hidden-sm hidden-xs">{{ $user->last_login ?? 'Never' }}</td>
<td>
<div class="dropdown">
<a class="dropdown-toggle btn btn-default btn-xs" data-toggle="dropdown" href="#"
aria-expanded="true">
{{ __('common.actions') }}
<i class="fas fa-caret-circle-right"></i>
</a>
<ul class="dropdown-menu">
<li role="presentation">
<a role="menuitem" tabindex="-1" target="_blank"
href="{{ route('users.show', ['username' => $user->username]) }}">{{ __('common.view') }} {{ __('user.profile') }}</a>
</li>
<li role="presentation">
<a role="menuitem" tabindex="-1"
href="{{ route('user_setting', ['username' => $user->username, 'id' => $user->id]) }}">{{ __('user.edit') }}</a>
</li>
</ul>
</div>
<menu class="data-table__actions">
<li class="data-table__action">
<a
class="form__button form__button--text"
href="{{ route('user_setting', ['username' => $user->username, 'id' => $user->id]) }}"
>
{{ __('common.edit') }}
</a>
</li>
</menu>
</td>
</tr>
@endforeach
@empty
<tr>
<td colspan="7">No users</td>
</tr>
@endforelse
</tbody>
</table>
@if (! $users->count())
<div class="margin-10">
{{ __('common.no-result') }}
</div>
@endif
<br>
<div class="text-center">
{{ $users->links() }}
</div>
</div>
</div>
{{ $users->links('partials.pagination') }}
</section>
@@ -1,93 +1,112 @@
<div>
<div class="mb-10 form-inline pull-right">
<div class="form-group">
{{ __('common.quantity') }}
<select wire:model="perPage" class="form-control">
<option>25</option>
<option>50</option>
<option>100</option>
</select>
<section class="panelV2">
<header class="panel__header">
<h2 class="panel__heading">Watchlist</h2>
<div class="panel__actions">
<div class="panel__action">
<p class="form__group">
<select
id="quantity"
class="form__select"
wire:model="perPage"
required
>
<option>25</option>
<option>50</option>
<option>100</option>
</select>
<label class="form__label form__label--floating" for="quantity">
{{ __('common.quantity') }}
</label>
</p>
</div>
<div class="panel__action">
<p class="form__group">
<input
id="search"
class="form__text"
type="text"
wire:model="search"
placeholder=""
/>
<label class="form__label form__label--floating" for="search">
Search by message
</label>
</p>
</div>
</div>
<div class="form-group">
<input type="text" wire:model="search" class="form-control" style="width: 275px;"
placeholder="Search by message"/>
</div>
</div>
<div class="box-body no-padding">
<table class="table vertical-align table-hover">
</header>
<div class="data-table-wrapper">
<table class="data-table">
<tbody>
<tr>
<th style="width: 15%;">
<div sortable wire:click="sortBy('user_id')"
:direction="$sortField === 'user_id' ? $sortDirection : null" role="button">
Watching
@include('livewire.includes._sort-icon', ['field' => 'user_id'])
</div>
<th wire:click="sortBy('user_id')" role="columnheader button">
Watching
@include('livewire.includes._sort-icon', ['field' => 'user_id'])
</th>
<th style="width: 15%;">
<div sortable wire:click="sortBy('staff_id')"
:direction="$sortField === 'staff_id' ? $sortDirection : null" role="button">
Watched By
@include('livewire.includes._sort-icon', ['field' => 'staff_id'])
</div>
<th wire:click="sortBy('staff_id')" role="columnheader button">
Watched By
@include('livewire.includes._sort-icon', ['field' => 'staff_id'])
</th>
<th style="width: 40%;" class="hidden-sm hidden-xs">
<div sortable wire:click="sortBy('message')"
:direction="$sortField === 'message' ? $sortDirection : null"
role="button">
Message
@include('livewire.includes._sort-icon', ['field' => 'message'])
</div>
<th wire:click="sortBy('message')" role="columnheader button">
Message
@include('livewire.includes._sort-icon', ['field' => 'message'])
</th>
<th style="width: 15%;">
<div sortable wire:click="sortBy('created_at')"
:direction="$sortField === 'created_at' ? $sortDirection : null" role="button">
Created At
@include('livewire.includes._sort-icon', ['field' => 'created_at'])
</div>
<th wire:click="sortBy('created_at')" role="columnheader button">
Created At
@include('livewire.includes._sort-icon', ['field' => 'created_at'])
</th>
<th style="width: 15%;">{{ __('common.action') }}</th>
<th>{{ __('common.action') }}</th>
</tr>
@foreach ($watchedUsers as $watching)
@forelse ($watchedUsers as $watching)
<tr>
<td>
<a href="{{ route('users.show', ['username' => $watching->user->username]) }}">
<span class="badge-user text-bold">
{{ $watching->user->username }}
</span>
</a>
<x-user_tag :anon="false" :user="$watching->user" />
</td>
<td>
<a href="{{ route('users.show', ['username' => $watching->author->username]) }}">
<span class="badge-user text-bold">
{{ $watching->author->username }}
</span>
</a>
<x-user_tag :anon="false" :user="$watching->author" />
</td>
<td class="hidden-sm hidden-xs">{{ $watching->message }}</td>
<td class="hidden-sm hidden-xs">{{ $watching->created_at }}</td>
<td>{{ $watching->message }}</td>
<td>
<form action="{{ route('staff.watchlist.destroy', ['id' => $watching->id]) }}" method="POST">
@csrf
@method('DELETE')
<button class="btn btn-xs btn-info" type="submit">
<i class="{{ config('other.font-awesome') }} fa-eye-slash"></i> Unwatch
</button>
</form>
<time datetime="{{ $watching->created_at }}">{{ $watching->created_at }}</time>
</td>
<td>
<menu class="data-table__actions">
<li class="data-table__action">
<form
action="{{ route('staff.watchlist.destroy', ['id' => $watching->id]) }}"
method="POST"
x-data
>
@csrf
@method('DELETE')
<button
x-on:click.prevent="Swal.fire({
title: 'Are you sure?',
text: 'Are you sure you want to unwatch this user: {{ $watching->user->username }}?',
icon: 'warning',
showConfirmButton: true,
showCancelButton: true,
}).then((result) => {
if (result.isConfirmed) {
$root.submit();
}
})"
class="form__button form__button--text"
>
Unwatch
</button>
</form>
</li>
</menu>
</td>
</tr>
@endforeach
@empty
<tr>
<td colspan="5">No watched users</td>
</tr>
@endforelse
</tbody>
</table>
@if (! $watchedUsers->count())
<div class="margin-10">
{{ __('common.no-result') }}
</div>
@endif
<br>
<div class="text-center">
{{ $watchedUsers->links() }}
</div>
</div>
</div>
{{ $watchedUsers->links('partials.pagination') }}
</section>
@@ -0,0 +1,115 @@
@if($paginator->hasPages())
<nav class="pagination" role="navigation" aria-label="Pagination Navigation">
<ul class="pagination__items">
@if ($paginator->onFirstPage())
<li class="pagination__previous pagination__previous--disabled">
&lsaquo; {{ __('common.previous') }}
</li>
@else
<li class="pagination__previous">
<a
class="pagination__previous"
href="{{ $paginator->previousPageUrl() }}"
wire:click.prevent="previousPage"
rel="prev"
>
&lsaquo; {{ __('common.previous') }}
</a>
</li>
@endif
<li class="pagination__page-wrapper">
<ul class="pagination__pages">
@if ($paginator->onFirstPage())
<li class="pagination__current">1</li>
@else
<li>
<a
class="pagination__link"
href="{{ $paginator->url(1) }}"
wire:click.prevent="gotoPage(1)"
rel="prev"
>
1
</a>
</li>
@endif
@if ($paginator->currentPage() - 3 > 2)
@if ($paginator->currentPage() - 4 === 2)
<li>
<a
class="pagination__link"
href="{{ $paginator->url(2) }}"
wire:click.prevent="gotoPage(2)"
>
2
</a>
</li>
@else
<li class="pagination__ellipsis">&middot;&middot;&middot;</li>
@endif
@endif
@for ($page = max(2, $paginator->currentPage() - 3); $page <= min($paginator->currentPage() + 3, $paginator->lastPage() - 1); $page++)
@if ($page === $paginator->currentPage())
<li class="pagination__current">{{ $page }}</li>
@else
<li>
<a
class="pagination__link"
href="{{ $paginator->url($page) }}"
wire:click.prevent="gotoPage({{ $page }})"
>
{{ $page }}
</a>
</li>
@endif
@endfor
@if ($paginator->currentPage() + 3 < $paginator->lastPage() - 1)
@if ($paginator->currentPage() + 4 === $paginator->lastPage() - 1)
<li>
<a
class="pagination__link"
href="{{ $paginator->url($paginator->currentPage() + 4) }}"
wire:click.prevent="gotoPage({{ $paginator->currentPage() + 4 }})"
>
{{ $paginator->currentPage() + 4 }}
</a>
</li>
@else
<li class="pagination__ellipsis">&middot;&middot;&middot;</li>
@endif
@endif
@if ($paginator->hasMorePages())
<li>
<a
class="pagination__link"
href="{{ $paginator->url($paginator->lastPage()) }}"
wire:click.prevent="gotoPage({{ $paginator->lastPage() }})"
rel="next"
>
{{ $paginator->lastPage() }}
</a>
</li>
@else
<li class="pagination__current">{{ $paginator->lastPage() }}</li>
@endif
</ul>
</li>
@if ($paginator->hasMorePages())
<li class="pagination__next">
<a
class="pagination__next"
href="{{ $paginator->nextPageUrl() }}"
wire:click.prevent="nextPage"
rel="next"
>
{{ __('common.next') }} &rsaquo;
</a>
</li>
@else
<li class="pagination__next pagination__next--disabled">
{{ __('common.next') }} &rsaquo;
</li>
@endif
</ul>
</nav>
@endif
+1 -1
View File
@@ -336,7 +336,7 @@
{{ __('torrent.keywords') }} (<i>{{ __('torrent.keywords-example') }}</i>)
</label>
</p>
@livewire('bbcode-input', ['name' => 'description', 'label' => __('common.description') ])
@livewire('bbcode-input', ['name' => 'description', 'label' => __('common.description'), 'required' => true])
<p class="form__group" x-show="cats[cat].type === 'movie' || cats[cat].type === 'tv'">
<textarea
id="upload-form-mediainfo"