Update web routes, add report routes

This commit is contained in:
Daniel Supernault 2018-08-26 12:59:50 -06:00
parent 2d26ad1968
commit 76fe2bff6e
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 77 additions and 21 deletions

View file

@ -5,41 +5,90 @@
<div class="container mt-4 mb-5 pb-5"> <div class="container mt-4 mb-5 pb-5">
<div class="col-12 col-md-8 offset-md-2"> <div class="col-12 col-md-8 offset-md-2">
<div class="card my-5"> <div class="card">
<div class="card-body"> <div class="card-header lead font-weight-bold bg-white">
<p class="mb-0 font-weight-bold">This feature is not yet ready for production. Please try again later.</p>
</div>
</div>
<div class="card sr-only">
<div class="card-header lead font-weight-bold">
Report Report
</div> </div>
<div class="card-body"> <div class="card-body">
<div class="p-5 text-center"> <div class="p-3 text-center">
<p class="lead">Please select one of the following options.</p> <p class="lead">Please select one of the following options. </p>
</div> </div>
<div class="row"> <div class="row">
<div class="col-12 col-md-8 offset-md-2 my-3"> <div class="col-12 col-md-8 offset-md-2 my-3">
<p><a class="btn btn-light btn-block p-4 font-weight-bold" disabled> <p><a class="btn btn-light btn-block p-4 font-weight-bold" href="{{route('report.not-interested', ['type' => request()->query('type'),'id' => request()->query('id')])}}">
Im not interested in this content I'm not interested in this content
</a></p>
</div>
@switch(request()->query('type'))
@case('comment')
<div class="col-12 col-md-8 offset-md-2 mb-3">
<p><a class="btn btn-light btn-block p-4 font-weight-bold" href="{{route('report.spam.comment', ['type' => request()->query('type'),'id' => request()->query('id')])}}">
This comment contains spam
</a></p> </a></p>
</div> </div>
<div class="col-12 col-md-8 offset-md-2 my-3"> <div class="col-12 col-md-8 offset-md-2 my-3">
<p><a class="btn btn-light btn-block p-4 font-weight-bold"> <p>
Its spam <a class="btn btn-light btn-block p-4 font-weight-bold" href="{{route('report.sensitive.comment', ['type' => request()->query('type'),'id' => request()->query('id')])}}">
</a></p> This comment contains sensitive content
</a>
</p>
</div> </div>
<div class="col-12 col-md-8 offset-md-2 my-3"> <div class="col-12 col-md-8 offset-md-2 my-3">
<p><a class="btn btn-light btn-block p-4 font-weight-bold"> <p>
It displays a sensitive image <a class="btn btn-light btn-block p-4 font-weight-bold" href="{{route('report.abusive.comment', ['type' => request()->query('type'),'id' => request()->query('id')])}}">
</a></p> Its abusive or harmful
</a>
</p>
</div>
@break
@case('post')
<div class="col-12 col-md-8 offset-md-2 mb-3">
<p>
<a class="btn btn-light btn-block p-4 font-weight-bold" href="{{route('report.spam.post', ['type' => request()->query('type'),'id' => request()->query('id')])}}">
This post contains spam
</a>
</p>
</div> </div>
<div class="col-12 col-md-8 offset-md-2 my-3"> <div class="col-12 col-md-8 offset-md-2 my-3">
<p><a class="btn btn-light btn-block p-4 font-weight-bold"> <p>
Its abusive or harmful <a class="btn btn-light btn-block p-4 font-weight-bold" href="{{route('report.sensitive.post', ['type' => request()->query('type'),'id' => request()->query('id')])}}">
</a></p> This post contains sensitive content
</a>
</p>
</div> </div>
<div class="col-12 col-md-8 offset-md-2 my-3">
<p>
<a class="btn btn-light btn-block p-4 font-weight-bold" href="{{route('report.abusive.post', ['type' => request()->query('type'),'id' => request()->query('id')])}}">
This post is abusive or harmful
</a>
</p>
</div>
@break
@case('user')
<div class="col-12 col-md-8 offset-md-2 mb-3">
<p>
<a class="btn btn-light btn-block p-4 font-weight-bold" href="{{route('report.spam.profile', ['type' => request()->query('type'),'id' => request()->query('id')])}}">
This users profile contains spam
</a>
</p>
</div>
<div class="col-12 col-md-8 offset-md-2 my-3">
<p>
<a class="btn btn-light btn-block p-4 font-weight-bold" href="{{route('report.sensitive.profile', ['type' => request()->query('type'),'id' => request()->query('id')])}}">
This users profile contains sensitive content
</a>
</p>
</div>
<div class="col-12 col-md-8 offset-md-2 my-3">
<p>
<a class="btn btn-light btn-block p-4 font-weight-bold" href="{{route('report.abusive.profile', ['type' => request()->query('type'),'id' => request()->query('id')])}}">
This profile is abusive or harmful
</a>
</p>
</div>
@break
@endswitch
<div class="col-12 col-md-8 offset-md-2 my-3"> <div class="col-12 col-md-8 offset-md-2 my-3">
<p><a class="font-weight-bold" href="#"> <p><a class="font-weight-bold" href="#">
Learn more Learn more

View file

@ -67,11 +67,18 @@ Route::domain(config('pixelfed.domain.app'))->middleware('validemail')->group(fu
Route::group(['prefix' => 'report'], function() { Route::group(['prefix' => 'report'], function() {
Route::get('/', 'ReportController@showForm')->name('report.form'); Route::get('/', 'ReportController@showForm')->name('report.form');
Route::post('/', 'ReportController@formStore');
Route::get('not-interested', 'ReportController@notInterestedForm')->name('report.not-interested'); Route::get('not-interested', 'ReportController@notInterestedForm')->name('report.not-interested');
Route::get('spam', 'ReportController@spamForm')->name('report.spam'); Route::get('spam', 'ReportController@spamForm')->name('report.spam');
Route::get('spam/comment', 'ReportController@spamCommentForm')->name('report.spam.comment'); Route::get('spam/comment', 'ReportController@spamCommentForm')->name('report.spam.comment');
Route::get('spam/post', 'ReportController@spamPostForm')->name('report.spam.post'); Route::get('spam/post', 'ReportController@spamPostForm')->name('report.spam.post');
Route::get('spam/profile', 'ReportController@spamProfileForm')->name('report.spam.profile'); Route::get('spam/profile', 'ReportController@spamProfileForm')->name('report.spam.profile');
Route::get('sensitive/comment', 'ReportController@sensitiveCommentForm')->name('report.sensitive.comment');
Route::get('sensitive/post', 'ReportController@sensitivePostForm')->name('report.sensitive.post');
Route::get('sensitive/profile', 'ReportController@sensitiveProfileForm')->name('report.sensitive.profile');
Route::get('abusive/comment', 'ReportController@abusiveCommentForm')->name('report.abusive.comment');
Route::get('abusive/post', 'ReportController@abusivePostForm')->name('report.abusive.post');
Route::get('abusive/profile', 'ReportController@abusiveProfileForm')->name('report.abusive.profile');
}); });
}); });