-
Notifications
You must be signed in to change notification settings - Fork 387
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4360 from HDInnovations/Request-4353
(Add) Display reports on torrent page
- Loading branch information
Showing
4 changed files
with
98 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<div class="panelV2" x-data="toggle"> | ||
<h2 class="panel__heading" style="cursor: pointer" x-on:click="toggle"> | ||
<i class="{{ config('other.font-awesome') }} fa-clipboard-list"></i> | ||
Reports | ||
<i | ||
class="{{ config('other.font-awesome') }} fa-plus-circle fa-pull-right" | ||
x-show="isToggledOff" | ||
></i> | ||
<i | ||
class="{{ config('other.font-awesome') }} fa-minus-circle fa-pull-right" | ||
x-show="isToggledOn" | ||
x-cloak | ||
></i> | ||
</h2> | ||
<div class="data-table-wrapper" x-show="isToggledOn" x-cloak> | ||
<table class="data-table"> | ||
<thead> | ||
<tr> | ||
<th>{{ __('common.title') }}</th> | ||
<th>Reported</th> | ||
<th> | ||
{{ __('common.reporter') }} | ||
</th> | ||
<th> | ||
{{ __('common.created_at') }} | ||
</th> | ||
<th> | ||
{{ __('common.staff') }} | ||
</th> | ||
<th>{{ __('forum.solved') }}</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
@forelse ($torrent->reports as $report) | ||
<tr> | ||
<td> | ||
<a href="{{ route('staff.reports.show', ['report' => $report]) }}"> | ||
{{ $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" /> | ||
@else | ||
Unassigned | ||
@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> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters