From ccd0a7a3a9ce237cd568e9a65fc603396e85eeab Mon Sep 17 00:00:00 2001 From: ro Date: Fri, 4 Oct 2024 14:04:49 -0600 Subject: [PATCH] added notes to locations, exports comments fix locations needed another data point for notes to additional information about instances that aren't covered by public comments, i.e. if the site is still live, additional concerns, etc, so that's been added and the appropriate template files added also, public comments where not being included in the CSV exports, so that's been patched as well --- app/Http/Controllers/ExportController.php | 2 +- app/Models/Location.php | 3 ++- app/Repositories/LocationRepository.php | 4 ++-- resources/views/back/location.blade.php | 8 ++++---- resources/views/front/location.blade.php | 7 ++++++- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/app/Http/Controllers/ExportController.php b/app/Http/Controllers/ExportController.php index 89c79d6..1908146 100644 --- a/app/Http/Controllers/ExportController.php +++ b/app/Http/Controllers/ExportController.php @@ -60,7 +60,7 @@ class ExportController extends Controller if ($rate * 100 >= $percent) { if ($type == 'mastodon') { //comman break teh CSV so just take them out - $comments = str_replace(",", ";", $location->description); + $comments = str_replace(",", ";", $location->public_comments); //remove extra white space $comments = str_replace(["\n\r", "\n", "\r"], " ", $comments); diff --git a/app/Models/Location.php b/app/Models/Location.php index aeeb54d..a13d6d7 100644 --- a/app/Models/Location.php +++ b/app/Models/Location.php @@ -35,6 +35,7 @@ class Location extends Model "created_at", "updated_at", "actions_count", - "archive_links" + "archive_links", + "notes", ]; } diff --git a/app/Repositories/LocationRepository.php b/app/Repositories/LocationRepository.php index 771ed0d..f654b44 100644 --- a/app/Repositories/LocationRepository.php +++ b/app/Repositories/LocationRepository.php @@ -76,8 +76,8 @@ class LocationRepository $location->images = json_encode($images); } - $location->name = $request->name; - //$location->description = $request->description; + $location->name = $request->name; + $location->notes = $request->notes; $location->archive_links = $request->archive_links; $result = []; diff --git a/resources/views/back/location.blade.php b/resources/views/back/location.blade.php index 03076c7..483767c 100644 --- a/resources/views/back/location.blade.php +++ b/resources/views/back/location.blade.php @@ -11,10 +11,10 @@ @csrf

- + +
+
+


diff --git a/resources/views/front/location.blade.php b/resources/views/front/location.blade.php index a1e131d..e8e2522 100644 --- a/resources/views/front/location.blade.php +++ b/resources/views/front/location.blade.php @@ -12,6 +12,8 @@ {{trim($comment)}}

@endif @endforeach +

Notes

+ {{$location->notes}}

References

Images

@if($images != null) @@ -54,8 +56,11 @@
Heat Rating is the percentage of Current Sources that have taken action against an instance. The higher the number of Sources that have silenced and/or suspended an instance, the higher the Heat Rating. - +

UPDATED : {{$updated}} +
+
+ @endsection \ No newline at end of file