diff --git a/lang/de.json b/lang/de.json index 4e007cb9f..2edad283e 100644 --- a/lang/de.json +++ b/lang/de.json @@ -777,5 +777,23 @@ "settings.find-users": "User finden", "stationboard.friends-none": "Du hast keine Freunde.", "stationboard.friends-set": "Hier kannst du Freunde verwalten:", - "stationboard.friend-filter": "Tippen, um nach Freunden zu filtern" + "stationboard.friend-filter": "Tippen, um nach Freunden zu filtern", + "report-something": "Etwas melden", + "report.reason": "Grund", + "report.description": "Beschreibung", + "report.subjectType": "Was möchtest du melden?", + "report.subjectId": "ID des Objekts", + "report.submit": "Absenden", + "report.success": "Deine Meldung wurde erfolgreich übermittelt. Wir schauen uns das an.", + "report.error": "Beim Übermitteln deiner Meldung ist ein Fehler aufgetreten.", + "report-reason.inappropriate": "Unangemessen", + "report-reason.implausible": "Unplausibel", + "report-reason.spam": "Spam", + "report-reason.illegal": "Illegal", + "report-reason.other": "Sonstiges", + "report-subject.Event": "Veranstaltung", + "report-subject.User": "User", + "report-subject.Status": "Status", + "report-subject.Trip": "Fahrt", + "status.report": "Status melden" } diff --git a/lang/en.json b/lang/en.json index 2394d3f7d..ae0d9f6eb 100644 --- a/lang/en.json +++ b/lang/en.json @@ -777,5 +777,23 @@ "settings.find-users": "Find users", "stationboard.friends-none": "You don't have any friends.", "stationboard.friends-set": "You can manage your friends here:", - "stationboard.friend-filter": "Filter for friends" + "stationboard.friend-filter": "Filter for friends", + "report-something": "Report something", + "report.reason": "Reason", + "report.description": "Description", + "report.subjectType": "Type of subject", + "report.subjectId": "ID of subject", + "report.submit": "Submit", + "report.success": "Your report has been submitted successfully. We will take care of it as soon as possible.", + "report.error": "An error occurred while submitting your report.", + "report-reason.inappropriate": "Inappropriate", + "report-reason.implausible": "Implausible", + "report-reason.spam": "Spam", + "report-reason.illegal": "Illegal", + "report-reason.other": "Other", + "report-subject.Event": "Event", + "report-subject.User": "User", + "report-subject.Status": "Status", + "report-subject.Trip": "Trip", + "status.report": "Report status" } diff --git a/resources/views/includes/status.blade.php b/resources/views/includes/status.blade.php index 10bf2594e..50528924b 100644 --- a/resources/views/includes/status.blade.php +++ b/resources/views/includes/status.blade.php @@ -280,6 +280,15 @@ class="like {{ auth()->user() && $status->likes->where('user_id', auth()->user() +
  • + + + {{__('status.report')}} + +
  • @endif @admin
  • diff --git a/resources/views/report.blade.php b/resources/views/report.blade.php new file mode 100644 index 000000000..96ad803e7 --- /dev/null +++ b/resources/views/report.blade.php @@ -0,0 +1,100 @@ +@php + use App\Enum\Report\ReportableSubject; + use App\Enum\Report\ReportReason; +@endphp + +@extends('layouts.app') + +@section('title', __('report-something')) + +@section('content') +
    +
    +
    +

    {{__('report-something')}}

    + +
    + +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + +
    + + +
    + +
    + + +
    + + + +
    + + + +
    +
    +
    +@endsection diff --git a/routes/web.php b/routes/web.php index c19a5cbd9..462085411 100644 --- a/routes/web.php +++ b/routes/web.php @@ -113,6 +113,9 @@ ->middleware(['can:create-manual-trip']) ->name('trip.create'); + Route::view('/report', 'report') + ->name('report'); + Route::post('/ics/createToken', [IcsController::class, 'createIcsToken']) ->name('ics.createToken'); //TODO: Replace with API Endpoint Route::post('/ics/revokeToken', [IcsController::class, 'revokeIcsToken']) @@ -129,7 +132,7 @@ Route::get('/daily/{dateString}', [DailyStatsController::class, 'renderDailyStats']) ->name('stats.daily'); }); - + Route::prefix('open-data')->group(function() { Route::get('/wikidata', [WikidataController::class, 'indexHelpPage']) ->name('open-data.wikidata');