1
0
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:
ro
2024-02-21 16:47:05 -06:00
parent b761a2405e
commit 659983af82
9 changed files with 87 additions and 34 deletions

View File

@ -29,7 +29,8 @@ class DenController extends Controller
$member = Auth::user();
return view('back.start', [
'handle' => $member->handle,
'title' => "This is The Den"
'title' => "This is The Den",
'role' => $member->role
]);
}
@ -41,7 +42,15 @@ class DenController extends Controller
'title' => "Manage Members"]);
}
public function location(Request $request, $pageNum = 1)
public function locations(Request $request)
{
$member = Auth::user();
return view('back.locations', [
'handle' => $member->handle,
'title' => "Manage Locations"]);
}
public function listings(Request $request, $pageNum = 1)
{
$member = Auth::user();
$page = $this->pagination->getPage($pageNum);

View File

@ -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
]);
}