mirror of
https://koodu.h-i.works/projects/thebadspace
synced 2025-06-25 16:04:37 -05:00
Den reorganizing, edit location link, form styles
The admin area needed to be reorganized as it was a bit all over the place to accomodate new features. And edit link was added to location detail pages so authorized members can edit when necessary. Form elements were loosened up a bit to give them a bit more breathing room
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use App\Repositories\LocationRepository;
|
||||
use App\Repositories\SourceRepository;
|
||||
use App\Services\PaginationService;
|
||||
@ -68,9 +69,16 @@ class FrontIndexController extends Controller
|
||||
$location = $this->location->getLocation($uuid);
|
||||
$sources = $this->source->getActive();
|
||||
$name = "NO LOCATION FOUND";
|
||||
$member = Auth::user();
|
||||
$edit = false;
|
||||
if ($location) {
|
||||
$name = $location->name;
|
||||
}
|
||||
|
||||
if (isset($member->role)) {
|
||||
($member->role == 1 || $member->role == 2) ? $edit = true : $edit = false;
|
||||
}
|
||||
|
||||
return view('front.location', [
|
||||
'title' => str_replace(".", " ", $name),
|
||||
'location' => $location,
|
||||
@ -78,6 +86,7 @@ class FrontIndexController extends Controller
|
||||
'sources_count' => count($sources),
|
||||
'images' => json_decode($location->images),
|
||||
'updated' => $location->updated_at->format('Y M d'),
|
||||
'edit' => $edit
|
||||
]);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user