mirror of
https://koodu.h-i.works/projects/thebadspace
synced 2025-06-25 16:04:37 -05:00
Front End Templating
Began the process of getting the front end together by adding about and listing pages and applied some light styling to it doesn't look like garbage. Still need to turn on the indivial instance display pages, so that will be next.
This commit is contained in:
@ -48,13 +48,14 @@ class HandleLocations
|
||||
return $this->entityManager->getRepository(Location::class)->findBy(["uuid" => $uuid]);
|
||||
}
|
||||
|
||||
public function getLocationsPage(int $page)
|
||||
public function getLocationsPage(int $page, string $active = "all")
|
||||
{
|
||||
$locations = $this->entityManager->getRepository(Location::class);
|
||||
$list = $locations->findBy(
|
||||
[],
|
||||
["id" => "ASC"]
|
||||
);
|
||||
if ($active == "true" || $active == "false") {
|
||||
$list = $locations->findBy(["active" => $active], ["id" => "ASC"]);
|
||||
} else {
|
||||
$list = $locations->findBy([], ["id" => "ASC"]);
|
||||
}
|
||||
|
||||
$count = ceil(count($list) / $this->limit);
|
||||
$totalCount = count($list);
|
||||
@ -121,7 +122,7 @@ class HandleLocations
|
||||
$location->setAddedBy($memberId);
|
||||
$this->entityManager->persist($location);
|
||||
} else {
|
||||
$active = ($request->request->get("rating") == "true" ? true : false);
|
||||
$active = ($request->request->get("active") == "true" ? true : false);
|
||||
$location->setActive($active);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user