|
|
@ -104,14 +104,20 @@ class DashControl
|
|
|
|
$uuid = $args["fourth"];
|
|
|
|
$uuid = $args["fourth"];
|
|
|
|
switch ($mode) {
|
|
|
|
switch ($mode) {
|
|
|
|
case "edit":
|
|
|
|
case "edit":
|
|
|
|
$customPages = (new Themes())->getCustomViews();
|
|
|
|
$page = (new Book("../content/pages"))->findPageById($uuid);
|
|
|
|
|
|
|
|
$views = [];
|
|
|
|
|
|
|
|
if (str_contains($page["layout"], "index")) {
|
|
|
|
|
|
|
|
$views = (new Themes())->getCustomIndex();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$views = (new Themes())->getCustomViews();
|
|
|
|
|
|
|
|
}
|
|
|
|
$pageOptions = [
|
|
|
|
$pageOptions = [
|
|
|
|
"title" => "Fipamo | Edit Page",
|
|
|
|
"title" => "Fipamo | Edit Page",
|
|
|
|
"page" => (new Book("../content/pages"))->findPageById($uuid),
|
|
|
|
"page" => $page,
|
|
|
|
"mode" => $mode,
|
|
|
|
"mode" => $mode,
|
|
|
|
"token" => Session::get("form_token"),
|
|
|
|
"token" => Session::get("form_token"),
|
|
|
|
"status" => Session::active(),
|
|
|
|
"status" => Session::active(),
|
|
|
|
"views" => $customPages,
|
|
|
|
"views" => $views,
|
|
|
|
];
|
|
|
|
];
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case "preview":
|
|
|
|
case "preview":
|
|
|
|