mirror of
https://koodu.h-i.works/projects/thebadspace
synced 2025-05-06 14:41:02 -05:00
DB edit: description to public_comments
the update process now compiles public comments from instance blocklists and displays them, so the name of the table that stores these comments has been changed so it's not confusing. also made the appropriate changes on the backend and in the template that shows that information
This commit is contained in:
parent
04c397a301
commit
d5c4a3c714
@ -80,7 +80,7 @@ class FrontIndexController extends Controller
|
||||
}
|
||||
|
||||
$links = explode(',', $location->archive_links);
|
||||
$comments = explode('+', $location->description);
|
||||
$comments = explode('+', $location->public_comments);
|
||||
return view('front.location', [
|
||||
'title' => str_replace(".", " ", $name),
|
||||
'location' => $location,
|
||||
|
@ -24,7 +24,7 @@ class Location extends Model
|
||||
"uuid",
|
||||
"name",
|
||||
"url",
|
||||
"description",
|
||||
"public_comments",
|
||||
"images",
|
||||
"active",
|
||||
"rating",
|
||||
|
@ -83,7 +83,7 @@ class UpdateService
|
||||
|
||||
//clear out all previous descriptions
|
||||
foreach ($locations as $loc) {
|
||||
$loc->description = ' ';
|
||||
$loc->public_comments = ' ';
|
||||
$loc->save();
|
||||
}
|
||||
|
||||
@ -101,9 +101,9 @@ class UpdateService
|
||||
$location->silence_vote = $item['silence_vote'];
|
||||
//clear descriptions
|
||||
if (!is_null($item['comment']) || !$item['comment'] != " ") {
|
||||
$location->description = $item['comment'];
|
||||
$location->public_comments = $item['comment'];
|
||||
} else {
|
||||
$location->description = 'description pending';
|
||||
$location->public_comments = 'Comments Pending';
|
||||
}
|
||||
|
||||
$location->actions_count = $item['block_count'] + $item['silence_count'];
|
||||
@ -134,7 +134,7 @@ class UpdateService
|
||||
'uuid' => Uuid::uuid4(),
|
||||
'name' => $item['url'],
|
||||
'url' => $item['url'],
|
||||
'description' => ($item['comment'] != null) ? $item['comment'] : "no description",
|
||||
'public_comments' => ($item['comment'] != null) ? $item['comment'] : "comments pending",
|
||||
'active' => $status,
|
||||
'rating' => $rating,
|
||||
'added_by' => 1,
|
||||
|
@ -11,8 +11,10 @@
|
||||
@csrf
|
||||
<label>Edit Location Name</label><br>
|
||||
<input type="text" name="name" value="{{$location->name}}" /><br>
|
||||
<!--
|
||||
<label>Edit Location Comments</label><br>
|
||||
<textarea name="description">{{$location->description}}</textarea><br>
|
||||
-->
|
||||
<label>Edit Reference Links (comma seperated)</label><br>
|
||||
<textarea name="archive_links">{{$location->archive_links}}</textarea><br>
|
||||
<label>Edit Reference Images</label><br>
|
||||
|
@ -6,7 +6,7 @@
|
||||
@parent
|
||||
<section>
|
||||
<article>
|
||||
<h2>Description</h2>
|
||||
<h2>Public Comments</h2>
|
||||
@foreach($comments as $comment)
|
||||
@if($comment != " " && $comment != '')
|
||||
{{trim($comment)}}<br /><br />
|
||||
|
Loading…
x
Reference in New Issue
Block a user